generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 14
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 v3.7 support, upgrade deps, add Python v3.13 support #459
Open
jherland
wants to merge
12
commits into
main
Choose a base branch
from
jherland/drop-3.7-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
This decorator was a workaround for Python v3.7 missing functools.cached_property. Now that we no longer support v3.7, we can finally use the original from the standard library.
The "magic" ._sort_key attribute of a Location object (used to make Location objects automatically orderable, even when some of their attributes are None) can be more cleanly implemented as a cached property, now that these are available in Python >=v3.8.
After upgrading Ruff, we got this new error: fawltydeps/gitignore_parser.py:214:13: SIM103 Return the negated condition directly | 212 | match = self.regex.search(rel_path) 213 | if match: 214 | if self.dir_only and not is_dir and match.end() == match.endpos: | _____________^ 215 | | return False 216 | | return True | |_______________________^ SIM103 217 | return False | = help: Inline condition Reshaping the condition resulted in this: if match: return not self.dir_only or is_dir or match.end() < match.endpos return False But this logic is really cryptic when not already familiar with the context and surrounding code, so I tried to add some helpful comments and reshape it further, in order to attempt to better explain what's going on here.
jherland
changed the title
Drop Python v3.7 support and prepare for the future
Drop Python v3.7 support, upgrade deps, add Python v3.13 support
Oct 23, 2024
The investigations in issue #460 reveal that for now we are likely less backwards-compatible than we'd like to be. Until that situation is improved, let's tell users to open an issue if they encounter problems. This should help us gauge how to prioritize this.
jherland
commented
Nov 5, 2024
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.
Three themes in one PR:
poetry update
to update our dependencies within existing constraintsHappy to split this up into multiple PRs if that helps the review process.
Commits:
@calculated_once
decoratorpoetry update
codespell
Location._sort_key
as a@cached_property