Upgrade Python Project to Version 3.10 #21
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 version from 3.9 to 3.10
Summary
This PR upgrades the Python version from 3.9 to 3.10 across the entire codebase, including CI/CD workflows, Docker images, and package configurations.
Changes Made
CI/CD Updates
ci-release.yml
,ci-staging.yml
, andci-testing-deploy.yml
workflowsPackage Configuration Updates
python_requires
in allsetup.py
files to support Python 3.9-3.10 range (>=3.9,<3.11
)dask-task-models-library
models-library
postgres-database
pytest-simcore
service-integration
service-library
settings-library
simcore-sdk
Docker Image Updates
scripts/maintenance/migrate_project/
to use Python 3.10Code Compatibility Updates
traceback.format_exception()
calls to use newexc
parameter instead ofetype
distutils.util.strtobool
with custom implementationpackaging.version.parse
instead of deprecateddistutils.version.StrictVersion
loop
parameter fromasyncio.ensure_future()
callsloop
parameter from database connection setup|
) withfrom __future__ import annotations
Dependencies
uvloop
constraint to support Python 3.10 (>=0.15.0
for Python 3.10+)Motivation
Python 3.9 reached end-of-life and Python 3.10 provides:
For more details, see the official Python 3.10 release notes.
Testing
All existing tests should continue to pass with Python 3.10. The upgrade includes compatibility fixes for deprecated APIs to ensure smooth migration.
Impact
This is a foundational upgrade that affects the entire codebase. All services and libraries will now run on Python 3.10, providing better performance and access to newer language features.
Link to run
Requested by: [email protected]