Skip to content

Update to current Python (3.11)#77

Merged
skyelaird merged 1 commit intomainfrom
claude/python-version-discussion-01JDAeeQZfJQkPrRGF3Hanf8
Nov 15, 2025
Merged

Update to current Python (3.11)#77
skyelaird merged 1 commit intomainfrom
claude/python-version-discussion-01JDAeeQZfJQkPrRGF3Hanf8

Conversation

@skyelaird
Copy link
Copy Markdown
Owner

Major improvements:

  • Update minimum Python requirement from 3.8 to 3.11
  • Modernize all type hints to use Python 3.11+ syntax:
    • Replace Dict[] with dict[]
    • Replace List[] with list[]
    • Replace Tuple[] with tuple[]
    • Replace Optional[T] with T | None
    • Remove typing imports where no longer needed
  • Update CI/CD to test Python 3.11, 3.12, 3.13
  • Add @cache decorator to make_sincos_array() for performance
  • Return tuple instead of list from make_sincos_array() for immutability

Benefits:

  • Cleaner, more readable type hints
  • Better performance (cached trig calculations)
  • Automatic 10-60% speedup from Python 3.11+ interpreter
  • Modern best practices aligned with current Python standards

Files modified:

  • pyproject.toml: Updated requires-python, classifiers, tool versions
  • .github/workflows/validation.yml: Test Python 3.11-3.13
  • All 13 source files: Modernized type hints throughout
  • geomagnetic.py: Added @cache for performance

Major improvements:
- Update minimum Python requirement from 3.8 to 3.11
- Modernize all type hints to use Python 3.11+ syntax:
  * Replace Dict[] with dict[]
  * Replace List[] with list[]
  * Replace Tuple[] with tuple[]
  * Replace Optional[T] with T | None
  * Remove typing imports where no longer needed
- Update CI/CD to test Python 3.11, 3.12, 3.13
- Add @cache decorator to make_sincos_array() for performance
- Return tuple instead of list from make_sincos_array() for immutability

Benefits:
- Cleaner, more readable type hints
- Better performance (cached trig calculations)
- Automatic 10-60% speedup from Python 3.11+ interpreter
- Modern best practices aligned with current Python standards

Files modified:
- pyproject.toml: Updated requires-python, classifiers, tool versions
- .github/workflows/validation.yml: Test Python 3.11-3.13
- All 13 source files: Modernized type hints throughout
- geomagnetic.py: Added @cache for performance
@skyelaird skyelaird merged commit 993dbf7 into main Nov 15, 2025
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.

2 participants