-
Notifications
You must be signed in to change notification settings - Fork 24
chore: update minimum python version to 3.9 #138
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
chore: update minimum python version to 3.9 #138
Conversation
WalkthroughThe minimum required Python version for the project was raised from 3.7 (or 3.8/3.10 in some places) to 3.9 across all documentation, configuration, and CI workflow files. Related version strings, linter targets, and workflow triggers were updated for consistency. The project version was incremented to 1.29.0, and changelogs were updated accordingly. Additionally, type annotations in Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CI Workflow
participant Python Environment
User->>CI Workflow: Trigger workflow (push, tag, etc.)
CI Workflow->>Python Environment: Set up Python 3.9.x
Python Environment-->>CI Workflow: Python 3.9.x ready
CI Workflow->>CI Workflow: Run build, lint, test, or publish steps
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
setup.cfg (1)
26-38
: Drop theimportlib_resources
back-port & add an explicit Python 3.9 classifierNow that the minimum supported version is 3.9, the
importlib_resources
back-port is no longer required (it’s in the stdlib asimportlib.resources
).
Removing it trims one dependency and avoids shipping redundant code.
While touching the metadata, consider addingProgramming Language :: Python :: 3.9
under theclassifiers
block for clarity.@@ python_requires = >=3.9 @@ - importlib_resources + # importlib.resources is built-in from 3.9 +@@ classifiers = Programming Language :: Python :: 3 + Programming Language :: Python :: 3.9
🧹 Nitpick comments (9)
PACKAGE.md (1)
140-142
: Ensure ancillary version references remain consistent across the docThe Python-version bump on L141 is correct. However, the CLI snippet above (L64) still shows
Ver: 1.6.1
, which diverges from the new1.29.0
insrc/scanoss/__init__.py
. Please sweep the file (and other docs) for stale version strings to avoid confusing users.-64 | SCANOSS Python CLI. Ver: 1.6.1, License: MIT, Fast Winnowing: True +64 | SCANOSS Python CLI. Ver: 1.29.0, License: MIT, Fast Winnowing: True.github/workflows/container-local-test.yml (1)
26-32
: Consider a test matrix instead of a single Python versionChanging the runtime to
3.9.x
aligns with your new minimum requirement, but CI now provides zero coverage for newer CPython releases (3.10-3.12). Bugs that surface only on newer interpreters will go undetected at release time. A simple matrix keeps confidence high:strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12"].github/workflows/python-local-test.yml (1)
22-26
: Same single-version limitation applies hereOnly testing on
3.9.x
may hide incompatibilities with newer interpreters. Recommend introducing a version matrix (see previous comment)..github/workflows/container-publish-ghcr.yml (1)
30-34
: Align publish workflow with broader CI strategySame remark as other workflows: limiting the build host to
3.9.x
reduces early detection of issues on upcoming Python versions. A matrix (or at least 3.9 + latest) is advisable.CHANGELOG.md (1)
12-15
: Clarify the impact of dropping < 3.9 support
Mention explicitly that Python 3.7/3.8 are no longer supported so downstream users understand the breaking nature of the change..github/workflows/version-tag.yml (1)
21-26
: Quoting numericfetch-depth
is unnecessary
actions/checkout
expects an integer; keep it numeric for readability:- fetch-depth: "0" + fetch-depth: 0No functional change, purely style.
.github/workflows/python-publish-testpypi.yml (2)
4-4
: Trigger block is valid but uncommon
on: [workflow_dispatch]
works, yet the rest of your workflows use expanded YAML mapping style. Consider aligning formats for consistency.
68-69
: Verify test matrix on 3.9 only
If you intend to continue validating on 3.10/3.11, add a matrix; otherwise 👍..github/workflows/python-publish-pypi.yml (1)
53-53
: Left-over commented line
Ifskip-existing
is intentionally disabled, delete the line to avoid confusion.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (14)
.github/workflows/container-local-test.yml
(1 hunks).github/workflows/container-publish-ghcr.yml
(3 hunks).github/workflows/lint.yml
(1 hunks).github/workflows/python-local-test.yml
(1 hunks).github/workflows/python-publish-pypi.yml
(5 hunks).github/workflows/python-publish-testpypi.yml
(5 hunks).github/workflows/version-tag.yml
(1 hunks)CHANGELOG.md
(2 hunks)PACKAGE.md
(1 hunks)README.md
(1 hunks)docs/source/index.rst
(1 hunks)pyproject.toml
(1 hunks)setup.cfg
(1 hunks)src/scanoss/__init__.py
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (14)
pyproject.toml (1)
9-10
: LGTM – Ruff target bumped correctly
The linter will now assume 3.9 syntax and built-ins. No issues spotted.docs/source/index.rst (1)
38-38
: Docs in sync with runtime requirement
Requirement line updated to 3.9 – looks good.README.md (1)
27-27
: README reflects new minimum version
Change is correct and consistent with the rest of the PR..github/workflows/lint.yml (1)
20-20
: CI matrix narrowed to 3.9 – double-check other jobsThe linter job now runs on 3.9; make sure all remaining workflows (test, build, publish) were updated in lock-step so the whole pipeline still exercises the supported range.
src/scanoss/__init__.py (1)
25-25
: Version bump looks good
__version__
correctly reflects the planned 1.29.0 release..github/workflows/container-publish-ghcr.yml (1)
7-9
: Quoting style change: no functional issueSwitching to double quotes for the tag glob is benign; both quoting styles are valid in YAML.
CHANGELOG.md (1)
611-612
: Broken link anchor – remove leading “v”
Previous anchors omit the “v” prefix (e.g.[1.28.2]
). Use the same pattern or update every reference to stay consistent..github/workflows/version-tag.yml (1)
24-27
: Ensure repository scripts run on 3.9
The repo previously ran on 3.10; verify any 3.10-only syntax (match/case,str.removeprefix
, etc.) doesn’t exist intools/get_next_version.sh
or other invoked scripts..github/workflows/python-publish-testpypi.yml (2)
18-18
: Downgraded runner Python – double-check wheel metadata
Confirm thatmake dist
builds wheels withRequires-Python >=3.9
so TestPyPI metadata matches the new minimum.
59-60
: Whitespace cleanup looks good
Correctly removed extraneous spaces around the array literal..github/workflows/python-publish-pypi.yml (4)
8-9
: Quote pattern for tags – OK
Switching to double quotes is harmless; matches YAML spec.
19-19
: Wheel metadata must declare>=3.9
Same as TestPyPI workflow – ensurepyproject.toml
/setup.cfg
now declare the higher minimum.
65-66
: Needs array tidy-up looks good
The compact form is clearer.
73-74
: Same Python version caveat as above
Verify package install & runtime succeed under 3.9.
Summary by CodeRabbit