bpo-46449: add more assertions to verify that deepfreeze modules are finalized properly#30985
bpo-46449: add more assertions to verify that deepfreeze modules are finalized properly#30985kumaraditya303 wants to merge 3 commits intopython:mainfrom
Conversation
0d44b58 to
d04fe64
Compare
|
cc @vstinner |
vstinner
left a comment
There was a problem hiding this comment.
assert(Py_REFCNT(code) == 1000000000); is very specific to deepfreeze currently implementation, whereas this code is a generic implementation of frozen modules which exists in Python 3.10 and older. I prefer to not leak too many deepfreeze implementation details here.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sure this code is generic implementation of frozen modules but if |
|
Sorry, I don't think that these assertions are correct. |
|
Tomorrow, a 3rd party code can decide to implement get_code() but use regular code objects, not use immortal code object. This code should remain generic. |
https://bugs.python.org/issue46449