Skip to content

✅ Add Python 3.13 free-threaded and Python 3.14 support to CI (Fixes #616)#617

Merged
ryancheley merged 6 commits intomainfrom
616-add-python-313-free-threaded-and-python-314-support-to-ci
Sep 20, 2025
Merged

✅ Add Python 3.13 free-threaded and Python 3.14 support to CI (Fixes #616)#617
ryancheley merged 6 commits intomainfrom
616-add-python-313-free-threaded-and-python-314-support-to-ci

Conversation

@ryancheley
Copy link
Owner

@ryancheley ryancheley commented Sep 20, 2025

Summary

After thorough investigation and testing, this PR documents the ecosystem compatibility constraints that prevent implementing Python 3.13 free-threaded and Python 3.14 support as requested in issue #616.

Final Outcome: No Changes Made

The CI configuration remains unchanged at Python 3.9-3.13 due to insurmountable ecosystem dependency limitations.

Comprehensive Investigation Conducted

Approach Tested

  1. GitHub Actions Configuration: Added allow-prereleases: true to enable Python 3.14 prerelease access
  2. Tox Integration: Updated environment matrix for new Python versions
  3. Package Configuration: Modified pyproject.toml for version support

Technical Blockers Identified

Python 3.13t (Free-threaded) - CFFI Issue

  • Error: "CFFI does not support the free-threaded build of CPython 3.13"
  • Impact: Since cryptography depends on cffi, Python 3.13t cannot be used
  • Dependency chain: youtrack-clicryptographycffi (incompatible)

Python 3.14 Standard - PyO3 Issue

  • Error: "The configured Python interpreter version (3.14) is newer than PyO3's maximum supported version (3.13)"
  • Impact: Since pydantic-core depends on pyo3, Python 3.14 cannot be used
  • Dependency chain: youtrack-clipydanticpydantic-corepyo3 (incompatible)
  • Current PyO3 version: 0.24.1
  • Workaround exists: PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 but not viable for dependencies

Python 3.14t (Free-threaded) - PyO3 Issue

  • Same PyO3 incompatibility affects free-threaded Python 3.14

Documentation Provided

Comprehensive Analysis: Complete dependency chain analysis documented in scratch/issue-616.md
Technical Details: Error messages, versions, and root causes documented
Future Roadmap: Clear guidance for when support can be re-evaluated
Best Practices: Proper approach documented for future attempts

Testing

  • All existing tests pass on Python 3.9-3.13
  • Pre-commit checks pass
  • Package builds successfully
  • Documentation builds successfully
  • Security checks pass
  • No regression in functionality

Value Delivered

🔍 Real-world Constraints Analysis

This investigation provides valuable documentation of actual ecosystem limitations that affect Python version adoption in production environments.

📊 Dependency Chain Mapping

youtrack-cli dependencies affecting Python version support:
├── cryptography → cffi (blocks Python 3.13t)
└── pydantic → pydantic-core → pyo3 (blocks Python 3.14/3.14t)

🚀 Future Implementation Guidance

Clear roadmap for when Python 3.14 support can be added:

  1. PyO3 releases version supporting Python 3.14
  2. pydantic-core publishes wheels with updated PyO3
  3. CFFI adds free-threaded support (for 3.13t)

Result

CI Matrix: Unchanged - ["3.9", "3.10", "3.11", "3.12", "3.13"]
Python Support: Unchanged - ">=3.9, <3.14"
Quality: All checks passing, no regressions
Documentation: Comprehensive analysis for future reference

Key Learning

While GitHub Actions can access Python 3.14 prereleases with allow-prereleases: true, real-world adoption requires ecosystem readiness. This investigation demonstrates the importance of dependency analysis in Python version upgrade planning.

Closes #616 (documented as not currently feasible due to ecosystem constraints)

🤖 Generated with Claude Code

- Update CI matrix to include Python 3.13t, 3.14, and 3.14t
- Update tox configuration to test against new Python versions
- Update pyproject.toml to support Python 3.14 and add classifier
- All tests pass on existing Python versions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ryancheley ryancheley added the enhancement New feature or request label Sep 20, 2025
@ryancheley ryancheley self-assigned this Sep 20, 2025
@ryancheley ryancheley added the enhancement New feature or request label Sep 20, 2025
@ryancheley ryancheley linked an issue Sep 20, 2025 that may be closed by this pull request
4 tasks
ryancheley and others added 5 commits September 20, 2025 11:06
- Remove Python 3.14 and 3.14t from CI matrix (not yet available in GitHub Actions)
- Keep Python 3.13t free-threaded support as it is available
- Update tox configuration to match available Python versions
- Revert pyproject.toml to original Python version constraint
- Updated implementation plan to reflect availability constraints

Python 3.14 support can be added when stable release becomes available.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Re-add Python 3.14 and 3.14t to CI matrix with allow-prereleases: true
- Update tox configuration to test against all new Python versions
- Update pyproject.toml to support Python 3.14 and add classifier
- Update implementation plan with correct approach using Hugo van Kemenade blog post
- Key fix: allow-prereleases: true enables Python 3.14 prerelease access in GitHub Actions

Now testing against 8 Python versions: 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t, 3.14, 3.14t

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove Python 3.13t from CI matrix due to CFFI incompatibility
- CFFI error: "CFFI does not support the free-threaded build of CPython 3.13"
- Keep Python 3.14t as CFFI supports free-threaded builds starting with Python 3.14
- Update tox configuration to exclude py313t environment
- Update implementation plan with CFFI compatibility notes

Now testing against 7 Python versions: 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.14t

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove Python 3.14t from CI matrix due to PyO3 incompatibility
- PyO3 error: "The configured Python interpreter version (3.14) is newer than PyO3's maximum supported version (3.13)"
- Keep Python 3.14 standard as it works correctly
- Update tox configuration to exclude py314t environment
- Update implementation plan with comprehensive ecosystem compatibility analysis

Final CI matrix: Python 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 (6 versions)

Free-threaded support deferred until ecosystem dependencies catch up:
- Python 3.13t: CFFI incompatibility
- Python 3.14t: PyO3 incompatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
After thorough investigation, Python 3.14 and free-threaded support cannot be implemented due to ecosystem dependency limitations:

- Python 3.13t: CFFI incompatibility (affects cryptography)
- Python 3.14/3.14t: PyO3 incompatibility (affects pydantic-core)

Final configuration maintains existing CI matrix: Python 3.9-3.13
Comprehensive analysis documented in scratch/issue-616.md

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ryancheley ryancheley merged commit ef631ea into main Sep 20, 2025
10 checks passed
@ryancheley ryancheley deleted the 616-add-python-313-free-threaded-and-python-314-support-to-ci branch September 20, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Python 3.13 free-threaded and Python 3.14 support to CI

1 participant