bpo-1635741: Port itertools module to multiphase initialization.#19044
bpo-1635741: Port itertools module to multiphase initialization.#19044vstinner merged 4 commits intopython:masterfrom
Conversation
223b1c0 to
ce22af3
Compare
ce22af3 to
6980d78
Compare
|
@shihai1991 Can you please take a look? |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. But I will wait for @shihai1991 review ;-)
|
You forgot a typelist[i], I fixed it ;-) |
Thanks :) |
|
there is one thing to be confirmed: race condition of identifier in typelists can be avoid too? no potential risk? |
Can you explain more concrete situation? |
Currently, the GIL magically protects C extensions against race conditions. But the GIL can be released when executing arbitrary code. I don't think that it's the case here. |
|
Static types initialized by PyType_Ready() are bad. Types allocated on the heap using PyType_FromSpec() are better: But this should be addressed in a separated change ;-) |
https://bugs.python.org/issue1635741