Upgrade Python from 3.8 to 3.13#2
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
Conversation
- Update pyproject.toml to require Python >=3.13,<3.14 - Update CI workflows to use Python 3.13 - Update pre-commit hooks to use --py313-plus - Update documentation to reference Python 3.13 - Update dependency constraints in requirements-py38.txt for Python 3.13 compatibility - Fix np.Inf deprecation in test_timeseries_toolkit.py (replaced with np.inf) - Fix unresponsive_flag function compatibility with Python 3.13/pandas - Add .python-version file for pyenv - Update ReadTheDocs and runtime configurations Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
… wheels Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
|
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.



Upgrade Python from 3.8 to 3.13
Summary
This PR upgrades the OpenOA project from Python 3.8 to Python 3.13, following the provided playbook. The upgrade includes updating all configuration files, CI workflows, documentation, and fixing compatibility issues with newer versions of pandas/numpy.
Key Changes:
pyproject.tomlto require Python >=3.13,<3.14.github/workflows/) to use Python 3.13--py313-plusrequirements-py38.txtfor Python 3.13 compatibilitynp.Infdeprecation (replaced withnp.inf) in testsunresponsive_flagfunction compatibility with Python 3.13/pandas behavior changes.python-versionfile for pyenvReview & Testing Checklist for Human
requirements-py38.txtwork correctly with Python 3.13 in production scenariosunresponsive_flagfunction fix with real data to ensure it behaves correctlyRecommended Test Plan:
Diagram
%%{ init : { "theme" : "default" }}%% graph TB subgraph "Configuration Files" A["pyproject.toml"]:::major-edit B[".python-version"]:::major-edit C["requirements-py38.txt"]:::major-edit D[".pre-commit-config.yaml"]:::major-edit end subgraph "CI/CD" E[".github/workflows/ci-tests.yml"]:::major-edit F[".github/workflows/pypi-publish.yml"]:::major-edit G[".readthedocs.yaml"]:::major-edit H["runtime.txt"]:::major-edit end subgraph "Code Changes" I["openoa/utils/filters.py"]:::major-edit J["test/unit/test_timeseries_toolkit.py"]:::minor-edit end subgraph "Documentation" K["README.md"]:::minor-edit L["sphinx/index.md"]:::minor-edit end A --> E A --> F C --> I I --> J subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
Critical Fix Details:
unresponsive_flagfunction inopenoa/utils/filters.pyrequired a compatibility fix becausenp.any()behavior changed with Python 3.13/newer pandas versions. The fix replaces the problematicnp.any()operation with manual OR operations across shifted flags.Dependency Updates:
pandas<2.0,numpy<1.25) fromrequirements-py38.txtto allow Python 3.13 compatible versionsSession Info: