Skip to content

Upgrade Python Project to Version 3.10 #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gitar-bot-staging[bot]
Copy link

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

  • Updated all GitHub Actions workflows to use Python 3.10 instead of 3.9
  • Modified ci-release.yml, ci-staging.yml, and ci-testing-deploy.yml workflows
  • Updated matrix configurations in testing workflows to use Python 3.10 as the base version
  • Removed Python 3.9 from multi-version test matrix, keeping 3.10 and 3.11

Package Configuration Updates

  • Updated python_requires in all setup.py files to support Python 3.9-3.10 range (>=3.9,<3.11)
  • Modified package requirements across all services and libraries:
    • dask-task-models-library
    • models-library
    • postgres-database
    • pytest-simcore
    • service-integration
    • service-library
    • settings-library
    • simcore-sdk
    • All services (agent, api-server, autoscaling, catalog, etc.)

Docker Image Updates

  • Updated Dockerfile in scripts/maintenance/migrate_project/ to use Python 3.10

Code Compatibility Updates

  • traceback module: Updated deprecated traceback.format_exception() calls to use new exc parameter instead of etype
  • distutils.util: Replaced deprecated distutils.util.strtobool with custom implementation
  • packaging: Updated version parsing to use packaging.version.parse instead of deprecated distutils.version.StrictVersion
  • asyncio: Removed deprecated loop parameter from asyncio.ensure_future() calls
  • aiopg: Removed deprecated loop parameter from database connection setup
  • type hints: Updated to use modern union syntax (|) with from __future__ import annotations

Dependencies

  • Updated 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:

  • Better error messages and debugging capabilities
  • Structural pattern matching (PEP 634)
  • Improved type hinting with union types
  • Performance improvements
  • Enhanced security features

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]

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.

1 participant