Skip to content

Drop Python 3.10 and add Python 3.15 support - #1241

Merged
tefra merged 2 commits into
mainfrom
python-3.11-3.15
Oct 16, 2026
Merged

tefra merged 2 commits into
mainfrom
python-3.11-3.15

Conversation

@tefra

@tefra tefra commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Python 3.10 reaches end of life in October 2026, and 3.15 is out the same month. This moves the supported range to 3.11–3.15.

Changes

  • Require Python >=3.11. Drop the 3.10 classifier and add 3.15.
  • CI: drop 3.10 from the test matrix and add 3.15. The w3c and samples jobs that were pinned to 3.10 now run on 3.11.
  • Remove the _eval_type backport in xsdata/formats/dataclass/typing.py. Only 3.9 and 3.10 needed it (bpo-41370: Evaluate strings as forward refs in PEP 585 generics python/cpython#30900).
  • Set ruff target-version to py311, both for the codebase and in xsdata/formats/dataclass/ruff.toml, which formats generated code.
  • Switch datetime.timezone.utc to datetime.UTC, which ruff UP017 flags under the new target.
  • Docs now say Python 3.11+.
  • Drop the typing-extensions dependency. Nothing in xsdata or the generated code imports it. Code that imports typing_extensions but only got it installed through xsdata now needs to depend on it directly.
  • Track mise.toml, pinned to Python 3.11, the oldest supported version. mise now creates the venv with uv, and the install task uses uv pip.

Testing

  • pytest passes on 3.11 and 3.14. 3.15 is covered by the new CI job only.
  • mypy and ruff pass.

- Require Python >= 3.11 and add the 3.15 classifier
- Test 3.15 in CI and move the 3.10-pinned jobs to 3.11
- Remove the 3.10 _eval_type backport
- Target py311 in ruff for the codebase and generated code
- Use datetime.UTC (UP017)
- Track mise.toml, pinned to Python 3.11
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (4fae5cc) to head (ec097cf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1241      +/-   ##
==========================================
- Coverage   99.97%   99.97%   -0.01%     
==========================================
  Files         117      117              
  Lines        9421     9412       -9     
  Branches     1448     1446       -2     
==========================================
- Hits         9419     9410       -9     
  Misses          1        1              
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Nothing in xsdata or the generated code imports typing_extensions
- mise creates the venv with uv and the install task uses uv pip
@sonarqubecloud

Copy link
Copy Markdown

@tefra
tefra merged commit 0f7484c into main Oct 16, 2026
14 checks passed
@tefra
tefra deleted the python-3.11-3.15 branch October 16, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant