Upgrade Python from 3.11 to 3.12 across all services#11
Open
devin-ai-integration[bot] wants to merge 5 commits intodevelopfrom
Open
Upgrade Python from 3.11 to 3.12 across all services#11devin-ai-integration[bot] wants to merge 5 commits intodevelopfrom
devin-ai-integration[bot] wants to merge 5 commits intodevelopfrom
Conversation
- Update Docker base images (Dockerfile.worker, Dockerfile.pe) - Update GitHub Actions workflows (backend.yml, regression.yml, build.yml, security.yml) - Update pre-commit configuration - All changes maintain compatibility with Django 5.2.6 and FastAPI 0.116.2 Co-Authored-By: Zoheb Munshi <zohebmunshi@gmail.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:
|
Initial attempt to upgrade to Python 3.13 encountered multiple package compatibility issues: - numpy 1.24.3 failed with pkgutil.ImpImporter removal in Python 3.13 - zstandard/cffi failed with undefined symbol errors in Python 3.13 Python 3.12 provides better package ecosystem support and meets the 'latest compatible version' requirement. Changes: - Updated all Dockerfiles to use Python 3.12 (worker, python, pe) - Updated all GitHub Actions workflows to python-version: 3.12 - Updated .pre-commit-config.yaml to python3.12 - Updated backend/serverless.yml runtime to python3.12 - Updated numpy from 1.24.3 to 1.26.4 (compatible with Python 3.12) - Verified worker Docker build succeeds with Python 3.12 Note: Frontend npm audit failure is pre-existing and unrelated to Python upgrade. Co-Authored-By: Zoheb Munshi <zohebmunshi@gmail.com>
Co-Authored-By: Zoheb Munshi <zohebmunshi@gmail.com>
- Patch matplotlib==3.3.4 to matplotlib>=3.8,<3.9 before installing ATC-Framework - matplotlib 3.3.4 fails to build on Python 3.12 due to SafeConfigParser removal - matplotlib 3.8+ supports Python 3.12 Co-Authored-By: Zoheb Munshi <zohebmunshi@gmail.com>
- Previous sed pattern didn't match 'matplotlib == 3.3.4' (with spaces) in setup.py - Updated to use sed -E with \s* to match optional whitespace - Added verification steps to print matplotlib lines before/after patching - pip install . uses install_requires from setup.py, not requirements.txt files Co-Authored-By: Zoheb Munshi <zohebmunshi@gmail.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.11 to 3.12 across all services
Summary
This PR upgrades Python from version 3.11 to 3.12 across the entire XFD codebase, including Docker images, GitHub Actions workflows, pre-commit configuration, AWS Lambda runtime, and Python dependencies.
Key changes:
Note: This PR initially targeted Python 3.13 but pivoted to 3.12 due to ecosystem compatibility issues with numpy and zstandard/cffi packages. Python 3.12 provides better package ecosystem support with prebuilt wheels.
Review & Testing Checklist for Human
build_workerjob which previously failed with numpy compatibility issuespre-commit run --all-filesto ensure bandit works with pbr dependencyTest Plan
Notes
additional_dependencies: [pbr]as a workaround rather than upgrading bandit itself (keeping changes minimal)Link to Devin run: https://app.devin.ai/sessions/5bff2523f83540728718336abe92c688
Requested by: Zoheb Munshi (@zohebmunshi)