Keep removing pre-Python 3.8 code#218
Draft
DimitriPapadopoulos wants to merge 1 commit intopython-cffi:mainfrom
Draft
Keep removing pre-Python 3.8 code#218DimitriPapadopoulos wants to merge 1 commit intopython-cffi:mainfrom
DimitriPapadopoulos wants to merge 1 commit intopython-cffi:mainfrom
Conversation
e01b11a to
527949f
Compare
527949f to
36da74b
Compare
36da74b to
1f2f72b
Compare
UP036 Version block is outdated for minimum Python version Lots of manual fixes here, in order to discard Python 2 aliases. Co-authored-by: Matti Picus <matti.picus@gmail.com>
1f2f72b to
aaa88ae
Compare
mattip
reviewed
Mar 26, 2026
Contributor
mattip
left a comment
There was a problem hiding this comment.
I actually read the whole thing and only had two nits
| import __builtin__ | ||
| except ImportError: | ||
| import builtins as __builtin__ | ||
| import builtins |
Contributor
There was a problem hiding this comment.
I think this can be removed?
| try: | ||
| from _thread import allocate_lock | ||
| except ImportError: | ||
| from _dummy_thread import allocate_lock |
Contributor
There was a problem hiding this comment.
When might this fail? I think _thread is required for Python now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to #124 and #214.
Apply rule UP036, it implies lots of manual changes and requires extra care.
Needs #214 to be applied first.