Skip to content

Upgrade Python Project to Version 3.10 #12

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

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

Conversation

gitar-bot-staging[bot]
Copy link

🐍 Migrate platform from Python 3.9 to Python 3.10

Description

This PR executes a comprehensive migration of the entire platform from Python 3.9 to Python 3.10.13, ensuring compatibility and taking advantage of improved performance and new language features.

Changes

  • Python Runtime Upgrade: Updated all services, scripts, and CI/CD workflows to use Python 3.10.13
  • Dependency Requirements: Updated python_requires in all setup.py files from ~=3.9 to >=3.10,<3.12
  • Docker Base Images: Migrated all Dockerfiles to use python:3.10.13-slim-buster
  • CI/CD Pipelines: Updated GitHub Actions workflows to run tests and deployments on Python 3.10
  • Deprecated Code Removal: Replaced deprecated distutils.util.strtobool with custom implementation to maintain Python 3.12+ compatibility

Motivation

  • Performance Improvements: Python 3.10 offers significant performance enhancements and optimizations
  • Language Features: Access to new features like structural pattern matching, improved error messages, and union type annotations
  • Future Compatibility: Preparation for eventual Python 3.12+ migration by removing deprecated distutils dependencies
  • Security: Benefit from security patches and improvements in the newer Python version

Files Changed

📁 View affected components (50 files)

CI/CD & Infrastructure

  • .github/workflows/ - Updated Python version in all GitHub Actions workflows
  • requirements/tools/ - Updated Python version in build tools
  • scripts/ - Updated Python version in maintenance and utility scripts

Services (All updated to Python 3.10.13)

  • services/agent/
  • services/api-server/
  • services/autoscaling/
  • services/catalog/
  • services/dask-sidecar/
  • services/datcore-adapter/
  • services/director/ (includes custom strtobool implementation)
  • services/director-v2/
  • services/dynamic-sidecar/
  • services/invitations/
  • services/migration/
  • services/osparc-gateway-server/
  • services/storage/
  • services/web/

Packages

  • packages/dask-task-models-library/
  • packages/models-library/
  • packages/service-integration/
  • packages/service-library/ (includes custom strtobool implementation)

Test Plan

  • ✅ All existing unit and integration tests pass with Python 3.10
  • ✅ CI/CD pipelines validate the migration across all services
  • ✅ Docker builds complete successfully with new Python base images
  • ✅ Service startup and health checks pass in testing environment

Links


This migration maintains backward compatibility while positioning the platform for future Python version upgrades.


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