feat!: Migrate to Python 3.10+ with 3.13 support - #14
Merged
Conversation
BREAKING CHANGE: Minimum Python version increased from 3.8 to 3.10 Phases 1-3 Implementation: Phase 1: Update Configuration - Updated pyproject.toml requires-python to >=3.10 - Added Python 3.13 to classifiers - Updated black target-version to py310 - Updated ruff target-version to py310 - Updated mypy python_version to 3.10 - Bumped package version to 0.3.0 Phase 2: Update CI/CD - Updated GitHub Actions CI matrix to test Python 3.10, 3.11, 3.12, 3.13 - Removed Python 3.8 and 3.9 from CI testing Phase 3: Update Documentation - Updated README.md Python requirement to 3.10+ - Updated docs/DEVELOPMENT.md Python requirement to 3.10+ - Updated docs/ARCHITECTURE.md Python runtime to 3.10+ - Added comprehensive CHANGELOG entry with migration guide Rationale: - Python 3.8 reached EOL in October 2024 - Python 3.9 reaches EOL in October 2025 - Performance improvements in 3.11+ benefit batch processing - Better type hints and language features in 3.10+ - Aligns with modern scientific Python ecosystem Migration: Users on Python 3.8/3.9 should upgrade to 3.10+ and reinstall the package. See CHANGELOG.md for detailed migration instructions.
- Replace typing.Dict/List/Set with built-in dict/list/set (PEP 585) - Replace Optional[X] with X | None syntax (PEP 604) - Replace isinstance(x, (int, float)) with isinstance(x, int | float) (UP038) - Add strict=True to zip() calls for Python 3.10+ safety (B905) - Remove deprecated typing imports (UP035) - Applied via ruff --fix with UP and B905 rule sets All code quality checks pass: - ruff: All checks passed - black: Formatted 2 test files - mypy: No issues found - pytest: 149/149 tests pass, 71.77% coverage maintained This completes the Python 3.10+ migration Phase 4 code modernization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR migrates the minimum Python version requirement from 3.8 to 3.10 and adds support for Python 3.13.
🎯 Problem
Python 3.8 reached End of Life in October 2024, making it a security risk to continue supporting it. Additionally:
🔧 Approach
Implemented a phased migration strategy following best practices:
Phase 1: Update Configuration ✅
pyproject.toml:requires-python = ">=3.10"Phase 2: Update CI/CD ✅
["3.10", "3.11", "3.12", "3.13"]Phase 3: Update Documentation ✅
README.md- User-facing requirementsdocs/DEVELOPMENT.md- Developer prerequisitesdocs/ARCHITECTURE.md- Technical specificationsCHANGELOG.mdentry with migration guidePhase 4: Code Modernization ⏳
🧪 Tests
📊 Impact Analysis
Benefits
Performance:
Security:
Developer Experience:
dict[str, Any]vsDict[str, Any]Ecosystem Alignment:
User Migration Path
Users on Python 3.8 or 3.9 must upgrade:
Option 1: Using Conda (Recommended for scientific workflows)
conda install python=3.10 # or 3.11, 3.12, 3.13 pip install --upgrade eddypro-batch-processorOption 2: System Python
Option 3: Virtual Environment
Compatibility Matrix
🔄 Migration Notes
For Users
eddypro-batch validate --config config/config.yamlFor Developers
list[str]vsList[str])Backward Compatibility
📖 Documentation Updates
All documentation has been updated to reflect Python 3.10+ requirement:
✅ Definition of Done
🚀 Next Steps After Merge
Immediate:
Future PRs (Optional Code Modernization):
match/case)Closes: Python version modernization
Breaking Change: Yes - requires Python 3.10+
Semantic Version: 0.2.0 → 0.3.0
Recommended Action: Users should upgrade Python before installing v0.3.0