-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
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 left some happy comments here and there.
Thank you for handling that and reducing the code complexity 🚀
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.
👍🏻
Just before we merge this we should drop the branch protection rule that mandates tests on Python 3.7. That would also be a good time to rework that into a Ruleset instead of a classic Branch Protection Rule. Are we ready to merge this otherwise @jherland ? |
Yes! Thanks for reminding me.
Yes, except I wanted to make another release with Conda support added, but before we remove support for running FD on Python 3.7 (this PR). See #462 for details. |
2defb0f
to
54adc04
Compare
Done
I setup a new ruleset in "evaluation" mode, and left the old branch protection rule (minus 3.7 checks) in place, for now. Let's have a closer look at it together in the status meeting? |
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.
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.
54adc04
to
64a544c
Compare
Pushed a minor update/rebase, mostly to trigger the new ruleset. Will merge when green. |
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