-
Notifications
You must be signed in to change notification settings - Fork 259
drop support for Python 3.9 #897
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
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideDrops Python 3.9 support across code, tests, configuration, and CI, enabling use of Python 3.10+ features and simplifying version-dependent logic (notably around temporary directories, subprocess encoding, typing, and version constraint utilities). Class diagram for updated typing constraints and aliasesclassDiagram
class BaseConstraint
class VersionConstraint
class SingleMarkerLike~T~
class SingleMarkerConstraint {
<<typevar>>
bound BaseConstraint | VersionConstraint
}
SingleMarkerLike <|-- SingleMarker
class SingleMarker {
<<generic>> SingleMarkerLike~BaseConstraint | VersionConstraint~
}
class DependencyConstraint {
<<typealias>>
str | Mapping~str, Any~
}
class DependencyConfig {
<<typealias>>
Mapping~str, list~DependencyConstraint~ | DependencyConstraint~
}
class LocalSegmentType {
<<typealias>>
str | int | tuple~str | int, ...~ | None
}
Flow diagram for updated temporary_directory helperflowchart TD
A[temporary_directory called] --> B[Set kwargs ignore_cleanup_errors true]
B --> C[Create TemporaryDirectory with kwargs]
C --> D[Yield Path of temporary directory name]
D --> E[TemporaryDirectory context exits and cleans up directory]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes - here's some feedback:
- In
constraint_regionsyou switched fromzip(edges, edges[1:])topairwise(edges)but there’s no corresponding import change in the diff—either addfrom itertools import pairwiseor qualify it asitertools.pairwiseto avoid aNameError.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `constraint_regions` you switched from `zip(edges, edges[1:])` to `pairwise(edges)` but there’s no corresponding import change in the diff—either add `from itertools import pairwise` or qualify it as `itertools.pairwise` to avoid a `NameError`.
## Individual Comments
### Comment 1
<location> `pyproject.toml:64-68` </location>
<code_context>
fix = true
line-length = 88
src = ["src"]
-target-version = "py39"
[tool.ruff.lint]
</code_context>
<issue_to_address>
**suggestion:** Ruff target-version could be updated to `py310` rather than removed for consistent linting across environments.
Because `requires-python = ">=3.10, <4.0"` is set, dropping `target-version` makes Ruff depend on the local runtime/tooling to infer the version, which can differ between environments. Keeping `target-version = "py310"` makes the applied lint rules (syntax support, built-ins, etc.) deterministic everywhere Ruff runs.
```suggestion
fix = true
line-length = 88
src = ["src"]
target-version = "py310"
[tool.ruff.lint]
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Drop support for Python 3.9 and clean up code, tests, and CI configuration to target Python 3.10+.
Enhancements:
Build:
CI:
Tests: