Skip to content

Upgrade Python Project to Version 3.10 #18

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

Migrate Python version from 3.9 to 3.10 across the entire codebase

Description

This PR migrates the project from Python 3.9 to Python 3.10 across all services, packages, and infrastructure components. The changes ensure consistent Python version usage throughout the codebase while maintaining compatibility and enabling access to Python 3.10 features.

Key Changes

  • GitHub Actions: Updated CI/CD workflows to use Python 3.10 in testing matrices
  • Docker Images: Migrated all Dockerfiles from Python 3.9.12 to 3.10.12 base images
  • Package Configuration: Updated setup.py files to reflect Python 3.10 compatibility
    • Changed python_requires from ~=3.9 to >=3.9,<3.11
    • Updated Python version classifiers to Programming Language :: Python :: 3.10
  • Service Configuration: Updated configuration files where Python version is specified

Motivation

  • Performance: Python 3.10 brings significant performance improvements and optimizations
  • Language Features: Access to new Python 3.10 features including structural pattern matching, better error messages, and improved type hinting
  • Ecosystem Support: Better compatibility with newer versions of dependencies and libraries
  • Security: Benefit from security patches and improvements in Python 3.10

Impact

  • Compatibility: Maintains backward compatibility with Python 3.9 through the >=3.9,<3.11 requirement
  • Infrastructure: All Docker images and CI/CD pipelines now use Python 3.10
  • Development: Developers can leverage Python 3.10 features in new code

Files Modified

Complete list of modified files (46 total)

GitHub Actions Workflows

  • .github/workflows/ci-release.yml
  • .github/workflows/ci-staging.yml
  • .github/workflows/ci-testing-deploy.yml

Packages

  • packages/dask-task-models-library/setup.py
  • packages/models-library/setup.py
  • packages/postgres-database/setup.py
  • packages/service-integration/setup.py
  • packages/service-library/setup.py
  • packages/settings-library/setup.py

Services

  • services/agent/Dockerfile & setup.py
  • services/api-server/Dockerfile & setup.py
  • services/autoscaling/Dockerfile & setup.py
  • services/catalog/Dockerfile & setup.py
  • services/dask-sidecar/Dockerfile & setup.py
  • services/datcore-adapter/Dockerfile & setup.py
  • services/director-v2/Dockerfile & setup.py
  • services/dynamic-sidecar/Dockerfile & setup.py
  • services/invitations/Dockerfile & setup.py
  • services/osparc-gateway-server/Dockerfile & setup.py
  • services/storage/Dockerfile & setup.py
  • services/web/Dockerfile & setup.py

Scripts & Tools

  • requirements/tools/Dockerfile
  • scripts/docker/docker-compose-config.bash
  • scripts/erd/Dockerfile
  • scripts/filestash/create_config.py
  • scripts/maintenance/migrate_project/Dockerfile
  • scripts/mypy/Dockerfile
  • scripts/pydeps-docker/Dockerfile

Additional Files

  • packages/postgres-database/scripts/erd/Dockerfile
  • packages/service-library/src/servicelib/long_running_tasks/_task.py
  • services/director/src/simcore_service_director/config.py
  • services/director/src/simcore_service_director/producer.py
  • services/migration/Dockerfile

Testing

All existing tests should continue to pass with Python 3.10. The migration maintains backward compatibility while enabling forward-looking development practices.

Related Links


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