-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add support for Python 3.12 #2219
Conversation
8c87d6e
to
ec5899b
Compare
Amazing work !! |
Next: assess Windows failure. |
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.
Left some quick comments. Will be gone this weekend so probably won't have time to review (sorry!)
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2219 +/- ##
==========================================
+ Coverage 92.80% 92.92% +0.12%
==========================================
Files 94 95 +1
Lines 10840 10918 +78
==========================================
+ Hits 10060 10146 +86
+ Misses 780 772 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I'll squash the fixups now. Doesn't sound like anybody has pulled down the branch locally. Should be easier for the next person to review. |
8d477de
to
b9cf54b
Compare
timedelta was optimized in Python 3.12. Use a class from difflib to maintain the sense of the original test.
A C-accelerator was introduced for the typing module in Python 3.12 (see python/cpython#103764). Because a pure python source is no longer available, now we stub out the missing classes and provide some __class_getitem__ methods to allow subscripting like Type[int]. This may mean when 3.12 is the minimum, we can remove older brain features like infer_typing_alias().
The way ByteString was deprecated altered its mro(), breaking the way these tests located ABCMeta as a metaclass ancestor.
Follow the example of MatchStar and the like
Rebasing so that Coverage will pass (it's comparing against an older commit on main). |
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.
Lots of work here, this is great ! I think we can ignore the one line that is not covered as it wasn't covered before either.
(Weirdly, it's reporting that the docstring isn't covered.) |
Thanks for the reviews! If we cut an astroid alpha with this soon, I can get started on 3.12 compatibility for pylint. |
Type of Changes
Description
I suggest reviewing by commit to see the messages. (Let's rebase & merge.)
The major new feature (closes #2201): add
TypeVar
andTypeAlias
nodes.The others are small adjustments for python implementation details that changed in 3.12.