Skip to content

Migrate Python Codebase to Version 3.10 #17

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 from Python 3.9 to Python 3.10

Description

This PR migrates the entire codebase from Python 3.9 to Python 3.10, updating all services, packages, and infrastructure components to support the latest Python version.

Motivation

  • Enhanced Performance: Python 3.10 includes significant performance improvements and optimizations
  • Modern Language Features: Access to new Python 3.10 features like structural pattern matching, improved error messages, and enhanced typing capabilities
  • Security & Maintenance: Stay current with the latest Python release for improved security and long-term maintainability
  • Ecosystem Support: Ensure compatibility with the latest versions of Python libraries and frameworks

Changes Made

Infrastructure Updates

  • GitHub Actions: Updated all CI/CD workflows from Python 3.9 to 3.10
  • Docker Images: Updated base Python images across all Dockerfiles
  • Package Configuration: Updated python_requires in all setup.py files

Services & Packages Updated

  • All microservices (api-server, catalog, director, storage, etc.)
  • Core libraries (models-library, service-library, settings-library, etc.)
  • Development tools and scripts
  • Testing infrastructure
📋 Complete list of updated components (53 files)

GitHub Workflows:

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

Services:

  • agent, api-server, autoscaling, catalog, dask-sidecar, datcore-adapter
  • director, director-v2, dynamic-sidecar, invitations, migration
  • osparc-gateway-server, storage, web

Packages:

  • dask-task-models-library, models-library, postgres-database
  • pytest-simcore, service-integration, service-library, settings-library, simcore-sdk

Infrastructure & Scripts:

  • Docker configurations, ERD scripts, migration tools, development utilities

Key Python 3.10 Features Now Available

  • Structural Pattern Matching: New match/case syntax for advanced pattern matching
  • Improved Error Messages: More precise and helpful error reporting
  • Enhanced Type Hints: Better support for union types with | operator
  • Performance Improvements: Overall runtime performance enhancements

For more details on Python 3.10 features, see the official release notes.

Testing

  • All existing tests should pass with Python 3.10
  • CI/CD pipelines updated to run on Python 3.10
  • Docker builds verified for all services
  • No breaking changes expected as this is a minor version upgrade within Python 3.x

Impact

  • Low Risk: Python 3.10 maintains backward compatibility with Python 3.9 code
  • Infrastructure: All services and development environments now use Python 3.10
  • Future Development: Enables use of modern Python features in future development
  • Performance: Expected minor performance improvements across the platform

🔄 This is a comprehensive platform migration ensuring all components are aligned on Python 3.10


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