-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor code to use Python 3.9 and 3.10 syntax #598
Merged
Merged
Conversation
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
It's time to bump the minimum required Python version now that 3.11 was recently released. Also made it so that we only officially support the two latest versions (determined by the README and the versions tested in `python.yml`), as it reduces the time necessary (by roughly a year by average - looking at the release dates of the last minor versions of Python 3) before being able to use the newest language features - which is determined by the minimum required version, naturally.
...now that 3.10 is the minimum required Python version.
* Keyword-only dataclass fields (see https://docs.python.org/3/whatsnew/3.10.html#keyword-only-fields) * Union (merge) operator for dicts (see https://docs.python.org/3/whatsnew/3.9.html#dictionary-merge-update-operators) * The new `strict` flag for the `zip()` function (see https://docs.python.org/3/whatsnew/3.10.html#other-language-changes)
This fixes the recent failed tests and CodeQL workflow runs, like https://github.com/MAKENTNU/web/actions/runs/4273207612.
Codecov Report
@@ Coverage Diff @@
## dev #598 +/- ##
==========================================
- Coverage 87.76% 87.70% -0.06%
==========================================
Files 133 133
Lines 5572 5578 +6
==========================================
+ Hits 4890 4892 +2
- Misses 682 686 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Merging without explicit approval, as the Dev committee agreed to merge these changes and assume they're relatively bug-free, simply to get things done quicker. |
Merged
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.
Proposed changes
python.yml
), as it reduces the time necessary (by roughly a year by average - looking at the release dates of the last minor versions of Python 3) before being able to use the newest language features - which is determined by the minimum required version, naturallypython-dev
apt package (82cd546)Areas to review closely
That the refactored code retains the previous functionality.
Checklist
(If any of the points are not relevant, mark them as checked)