-
-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-1635741: Port itertools module to multiphase initialization. #19044
Conversation
223b1c0
to
ce22af3
Compare
ce22af3
to
6980d78
Compare
@shihai1991 Can you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I will wait for @shihai1991 review ;-)
You forgot a typelist[i], I fixed it ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ;)
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