-
Notifications
You must be signed in to change notification settings - Fork 27
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
Updating dependencies to support python 3.11 #351
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #351 +/- ##
===========================================
+ Coverage 85.13% 85.21% +0.07%
===========================================
Files 67 67
Lines 5113 5113
===========================================
+ Hits 4353 4357 +4
+ Misses 760 756 -4 see 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Looks good to me! I'm leaving a comment that does not prevent this from being merged.
The comment — the reason this PR won't fail for python 3.9 is because you're using from __future__ import annotation
whenever the operator |
is used to annotate the types. This operator for type annotations is actually supported in python3.10. From the documentation
The future statement is intended to ease migration to future versions of Python that introduce incompatible changes to the language. It allows use of the new features on a per-module basis before the release in which the feature becomes standard.
This is the reason why MrMustard in python3.9 is able to run with features of python3.10. Also, the documentation for future statements says (see PEP 236)
Note that there is no need to involve the future_statement machinery in new features unless they can break existing code; fully backward- compatible additions can– and should –be introduced without a corresponding future_statement.
Given that MrMustard is already supported in python3.10-3.11 and considering that the purpose of the statement from __future__ import annotation
is to ease migration to newer python versions and that it could introduce breaking changes in the future as new features are added to python, something to think about is the possibility of removing support for python3.9 —and hence removing the need for futures— if and only if no other dependent libraries use python3.9 (not the case for MrKite).
Context:
Updates dependencies so that MrMustard runs with python 3.11, and makes minimal changes to make all tests pass (check SisterPam)