-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove Python 2 code from C extensions #10507
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
Conversation
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.
Have not gone over this with a fine-tooth comb, but in favor of getting this in sooner rather than later.
I'm going to mark this WIP not because it is, but just so that it doesn't accidentally get merged before the other 3. |
@@ -326,7 +326,6 @@ int load_tkinter_funcs(void) | |||
* tkinter uses these symbols, and the symbols are therefore visible in the | |||
* tkinter dynamic library (module). | |||
*/ | |||
#if PY_MAJOR_VERSION >= 3 |
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.
just inline the conditional stuff below?
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.
OK, will do when I next rebase.
This is now waiting only on #10426, which looks ready to go after a simple merge conflict fixup. |
Anything (approximately) starting with two underscores, or an underscore and a capital letter is reserved in the C++ standard.
Python 3 always uses the new buffer protocol.
It's still not closed, but at least we can reference it later.
Rebased now that everything else is merged. |
PR Summary
Remove a bunch of fallback code and macros that provided Python 2 compatibility in the C extensions.
Note, this is based on #7853, #10426 and #10383 because I did not want to work out the conflicts later.I'm putting this out there to prevent duplicate work later.PR Checklist