Repository navigation
python version strategy
github-actions[bot] edited this page Jun 27, 2025
·
1 revision
- Python 3.10: Released Oct 2021, Active support until Oct 2026
- Python 3.11: Released Oct 2022, Active support until Oct 2027
- Python 3.12: Released Oct 2023, Active support until Oct 2028
- Python 3.13: Released Oct 2024, Active support until Oct 2029
- Python 3.10 - Minimum version, guaranteed compatibility
- Python 3.12 - Recommended version for performance
- Python 3.11 - Should work but not primary focus
- Python 3.13 - Future-proofing, test when stable
- 3.10+ covers 95%+ of active Python installations in scientific computing
- Skip 3.9 - End of life Oct 2025, security updates only
- Focus resources on versions that matter most to users
strategy:
matrix:
python-version: ["3.10", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false- Core Tests (All versions): Import, basic functionality
- Integration Tests (Primary versions): Full API testing
- Performance Tests (Latest version): Benchmarking
-
requests: Supports 3.7+ (✅ Compatible) -
backoff: Supports 3.6+ (✅ Compatible) -
defusedxml: Supports 3.6+ (✅ Compatible) -
typing-extensions: Supports 3.7+ (✅ Compatible)
-
pytest: Supports 3.8+ (✅ Compatible) -
mypy: Supports 3.8+ (✅ Compatible) -
ruff: Supports 3.7+ (✅ Compatible)
- Verify code parses on all supported versions
- Test all imports succeed
- Check basic instantiation
- Run full test suite on primary versions (3.10, 3.12)
- Focus on core functionality
- Test edge cases and error handling
- Test against real Europe PMC API
- Verify network operations
- Test large data handling
- Benchmark on latest Python version
- Memory usage analysis
- Regression testing
- Benefits: Stable, widely adopted, pattern matching
- Focus: Ensure all features work reliably
- Testing: Full test suite, all features
- Benefits: 15% performance improvement, better error messages
- Focus: Performance validation, future features
- Testing: Full suite + performance benchmarks
- Benefits: Free-threaded Python (experimental), improved REPL
- Focus: Compatibility testing, no feature development yet
- Testing: Basic compatibility only
- Update pyproject.toml to support 3.10+
- Create comprehensive CI/CD matrix
- Add version-specific testing
- Implement multi-version GitHub Actions
- Add compatibility testing framework
- Create version support documentation
- Performance benchmarking across versions
- Automated compatibility reporting
- Version-specific optimizations
- ✅ All tests pass on Python 3.10
- ✅ All tests pass on Python 3.12
- ✅ Import tests pass on all supported versions
- ✅ No deprecation warnings on any version
- ✅ Performance benchmarks within 5% on 3.12 vs 3.10
- ✅ Memory usage stable across versions
- ✅ Full integration tests pass
- Clearly state minimum version (3.10+)
- Recommend Python 3.12 for best performance
- Provide migration guide for users on older versions
- Document version-specific benefits
- Full Support: Python 3.10
- Best Effort: Python 3.11, 3.12, 3.13
- No Support: Python 3.9 and below
This strategy balances thorough testing with practical resource allocation.