Repository navigation
Require Python 3.11 or newer - #455
Conversation
Align package metadata, CI, wheel builds, and documentation with the Python 3.11 minimum. Regenerate the lockfile and enforce pyupgrade --py311-plus; the existing Python sources already pass its checks.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #455 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 1032 1032
=========================================
Hits 1032 1032
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR makes Python 3.11 the minimum supported version for json2xml and its optional Rust extension, propagating the requirement through packaging metadata, lockfile, documentation, tooling, and CI. Older interpreter jobs and wheel discovery are removed or updated, while Python 3.15 coverage remains enabled. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="rust/pyproject.toml" line_range="10" />
<code_context>
description = "Simple Python Library to convert JSON to XML"
readme = "README.rst"
-requires-python = ">=3.10"
+requires-python = ">=3.11"
license = { text = "Apache Software License 2.0" }
keywords = ["json2xml"]
</code_context>
<issue_to_address>
**Locked Rust setup fails**
When a contributor runs a locked uv command from `rust/`, `rust/pyproject.toml` requires Python `>=3.11` while `rust/uv.lock` still records `>=3.9`, so uv reports the lock as stale and stops the locked setup.
Regenerate `rust/uv.lock` so its `requires-python` matches the project requirement.
</issue_to_address>
### Comment 2
<location path=".github/workflows/build-rust-wheels.yml" line_range="190" />
<code_context>
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
- python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
+ python-version: ['3.11', '3.12', '3.13', '3.14']
include:
- os: ubuntu-latest
</code_context>
<issue_to_address>
**Rust CI still tests 3.15 beta**
When CI runs after Python 3.15 has become stable, the Rust wheel tests and extension CI run against 3.15.0-beta.3 rather than the stable interpreter, so those checks can pass while the supported stable 3.15 runtime is broken.
Replace the beta interpreter entries in both Rust workflows with the stable 3.15 version.
Also at `.github/workflows/rust-ci.yml:65`.
</issue_to_address>| description = "Fast native JSON to XML conversion - Rust extension for json2xml" | ||
| readme = "README.md" | ||
| requires-python = ">=3.9" | ||
| requires-python = ">=3.11" |
There was a problem hiding this comment.
🟡 Medium · Locked Rust setup fails
When a contributor runs a locked uv command from rust/, rust/pyproject.toml requires Python >=3.11 while rust/uv.lock still records >=3.9, so uv reports the lock as stale and stops the locked setup.
Regenerate rust/uv.lock so its requires-python matches the project requirement.
Prompt for AI agents
In `rust/pyproject.toml` at line 10:
**Locked Rust setup fails**
When a contributor runs a locked uv command from `rust/`, `rust/pyproject.toml` requires Python `>=3.11` while `rust/uv.lock` still records `>=3.9`, so uv reports the lock as stale and stops the locked setup.
Regenerate `rust/uv.lock` so its `requires-python` matches the project requirement.Replace the beta interpreter pins so native extension and wheel checks exercise the supported stable runtime.
Require Python 3.11+ for both json2xml and its optional Rust extension. Remove older interpreters from CI and wheel tests, update installation docs, and regenerate the lockfile without Python 3.10 compatibility dependencies.
Set the pre-commit hook to
pyupgrade --py311-plus. Ran pyupgrade 3.19.1 across all tracked Python sources and stubs under Python 3.11; no source rewrites were needed. This branch also retains its existing Python 3.15 stable CI update.Validation:
make check-allon Python 3.11.17: Ruff and ty passed; 509 tests passed, 149 optional Rust integration tests skipped, 100% coverage.make test-rust: 47 passed.uv build: wheel and sdist built; both declareRequires-Python: >=3.11.lat checkandgit diff --check: passed.Summary by Sourcery
Require Python 3.11 or newer across the packages and supported development and CI environments.
Enhancements:
CI:
Documentation: