Skip to content

Upgrade Python Project to Version 3.10 #22

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

Description

This PR migrates the entire project from Python 3.9 to Python 3.10, updating all CI workflows, package configurations, and code compatibility issues.

Changes Made

  • CI/CD Pipeline Updates: Updated all GitHub Actions workflows to use Python 3.10 instead of 3.9
  • Package Configuration: Updated python_requires in all setup.py files from ~=3.9 to >=3.9,<3.12 for broader compatibility
  • MyPy Configuration: Updated mypy.ini to target Python 3.10
  • Docker Images: Updated base Docker images to use Python 3.10
  • Code Modernization: Fixed deprecated imports and function calls:
    • Replaced deprecated distutils.util.strtobool with custom implementation
    • Updated traceback.format_exception calls to use newer exc parameter
    • Fixed asyncio.ensure_future calls to remove deprecated loop parameter
    • Updated packaging.version.Version usage replacing distutils.version.StrictVersion
    • Removed deprecated loop parameter from asyncpg pool creation

Motivation

  • Security & Performance: Python 3.10 includes security fixes and performance improvements
  • Modern Features: Access to Python 3.10's new features like structural pattern matching and improved error messages
  • Dependency Compatibility: Many modern packages are dropping Python 3.9 support
  • Future-proofing: Ensures compatibility with the latest ecosystem developments

Impact

  • All CI pipelines will run on Python 3.10
  • Development environment should be upgraded to Python 3.10
  • Package dependencies remain compatible with Python 3.9+ for gradual migration
  • No breaking changes to existing functionality

References

Files Modified

View all modified files (30 files)
  • .github/workflows/ci-release.yml
  • .github/workflows/ci-staging.yml
  • .github/workflows/ci-testing-deploy.yml
  • mypy.ini
  • packages/dask-task-models-library/setup.py
  • packages/models-library/setup.py
  • packages/pytest-simcore/setup.py
  • packages/service-integration/setup.py
  • packages/service-library/setup.py
  • packages/service-library/src/servicelib/long_running_tasks/_task.py
  • packages/service-library/tests/aiohttp/test_incidents_monitoring.py
  • packages/simcore-sdk/setup.py
  • scripts/filestash/create_config.py
  • scripts/maintenance/migrate_project/Dockerfile
  • services/agent/setup.py
  • services/api-server/setup.py
  • services/autoscaling/setup.py
  • services/catalog/setup.py
  • services/dask-sidecar/setup.py
  • services/datcore-adapter/setup.py
  • services/director-v2/setup.py
  • services/director/src/simcore_service_director/config.py
  • services/director/src/simcore_service_director/producer.py
  • services/dynamic-sidecar/setup.py
  • services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/outputs/_manager.py
  • services/invitations/setup.py
  • services/osparc-gateway-server/setup.py
  • services/storage/setup.py
  • services/web/server/setup.py
  • services/web/server/src/simcore_service_webserver/login/plugin.py
  • services/web/server/tests/unit/with_dbs/02/test_projects_handlers__open_close.py

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