-
Notifications
You must be signed in to change notification settings - Fork 69
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
Drop Python 3.8 support #525
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add Python 3.12 and 3.13 support. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Drop Python 3.8 support. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Towncrier changelog records. | ||
|
||
Run ``towncrier create <num>.feature`` to add a new reacord. |
This file contains 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
Oops, something went wrong.
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.
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.
Please keep to older versions for lint job, it's more likely to catch mypy errors that user's of older Python versions may encounter.
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.
Good catch.
Ideally we should do mypy checks for all supported Pythons, it is not that hard.
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.
I'm not necessarily against it, but from I've seen it doesn't really provide any benefit. I don't think we've ever encountered errors on a newer Python version than what we tested with.
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.
A newer version could raise a deprecation warning.
Honestly I don't expect any error from testing mypy against the oldest supported version as well; but if we can and want providing the possible strongest typing -- why don't do 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.
mypy wouldn't give a deprecation warning, that's a runtime thing. If it did, we wouldn't be able to do anything as we still need the code working on the older version.
We've had a couple of occasions where this has happened. There's some slight oddities where mypy will produce an error (e.g. due to invalid syntax) when run on older versions of Python (as it's uses the Python parser), but won't produce those errors on newer versions.
Just because it's unlikely to add anything, but it will add CI time and might add some complexity when some internal code produces different errors on different versions (making it difficult to pass on all versions).
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.
It's a minor thing from my perspective, but...
I guess in typeshed it will be implemented as
if sys.version_info ...
, we can handle it as well.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.
I think that's still unsupported: https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html
My point is more that we can have an issue with syntax that only work in 3.12+ and mypy doesn't detect the problem unless it's being run with an older version that doesn't support the syntax. I think that's roughly what happened before, when we saw issues.
Feel free to experiment though.
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.
Wow, very cool table. I never saw anything like this.
Maybe we should switch to pyright if it is so good?
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.
I think mypy is a solid foundation that most of our users use. It might be worth adding pyright as a second tool, but most of those features we won't use for some time as we support older versions still (e.g. deprecated was added in 3.13). mypy should have those features long before we actually use them.