Skip to content

Migrate Python Codebase to Version 3.10 #13

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

Description

This PR upgrades the entire osparc-simcore project from Python 3.9 to Python 3.10, systematically updating all components to use the newer Python runtime.

Motivation

  • Platform Modernization: Migrate to Python 3.10 to take advantage of new language features, performance improvements, and security enhancements
  • Ecosystem Alignment: Keep the project current with the latest stable Python version to maintain compatibility with modern dependencies
  • Long-term Support: Python 3.9 reaches end-of-life in October 2025, while Python 3.10 provides extended support until October 2026

Key Features of Python 3.10

Python 3.10 introduces several significant improvements including:

  • Structural Pattern Matching: New match-case syntax for more expressive conditional logic
  • Better Error Messages: More precise error reporting and debugging information
  • Performance Optimizations: Various speed improvements and memory optimizations
  • Type System Enhancements: Improved type hints and static analysis capabilities

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

Changes Made

📋 Comprehensive upgrade across all project components

GitHub Workflows

  • Updated CI/CD pipelines to use Python 3.10 in matrix configurations
  • Modified ci-release.yml, ci-staging.yml, and ci-testing-deploy.yml

Docker Infrastructure

  • Upgraded base Python images from 3.9.12 to 3.10.12 across all service Dockerfiles
  • Updated 20+ Docker configurations for consistent runtime environment

Python Package Configuration

  • Modified python_requires constraints from ~=3.9 to ~=3.10 in all setup.py files
  • Updated mypy configuration for Python 3.10 compatibility

Services Updated

  • Core Services: api-server, director-v2, web server, storage
  • Specialized Services: autoscaling, catalog, dask-sidecar, dynamic-sidecar
  • Integration Services: agent, datcore-adapter, invitations, osparc-gateway-server
  • Supporting Tools: migration scripts, ERD generation, development tools

Impact

  • Runtime Environment: All services now run on Python 3.10 with improved performance and security
  • Development Experience: Developers can leverage new Python 3.10 features in future code
  • Maintenance: Positions the project for continued support and security updates
  • Compatibility: Maintains backward compatibility while enabling forward-looking enhancements

Testing

This migration maintains full API compatibility and existing functionality:

  • All existing tests should continue to pass
  • CI/CD pipelines updated to validate Python 3.10 compatibility
  • Docker builds verified across all services

Files Changed: 46 files across GitHub workflows, Docker configurations, and Python package setups
Services Affected: All microservices and supporting infrastructure
Breaking Changes: None expected - this is a runtime upgrade maintaining API compatibility


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