Skip to content

Migrate Python Project to Version 3.10 #6

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 executes a comprehensive migration from Python 3.9 to Python 3.10 across the entire codebase, updating all Docker images, CI workflows, setup configurations, and dependencies to leverage the newer Python version.

Motivation

  • Performance Improvements: Python 3.10 delivers enhanced performance and memory efficiency
  • New Language Features: Access to structural pattern matching, improved error messages, and enhanced type hinting capabilities
  • Security & Stability: Benefit from the latest security patches and bug fixes
  • Ecosystem Alignment: Stay current with the Python ecosystem and maintain compatibility with newer dependencies

📖 Learn more about Python 3.10: What's New in Python 3.10

Changes Summary

📋 Files Modified (56 files changed)

🔧 Infrastructure & CI/CD

  • GitHub Workflows: Updated ci-release.yml, ci-staging.yml, and ci-testing-deploy.yml to use Python 3.10
  • Docker Images: Migrated all service Dockerfiles from python:3.9 to python:3.10 base images
  • Requirements: Updated PYTHON_VERSION, constraints.txt, and upgrade documentation

📦 Package Configurations

  • Setup Files: Updated setup.py files across all packages and services to specify Python 3.10 compatibility
  • Service Packages: Updated all microservices including agent, api-server, autoscaling, catalog, director, storage, web, and more

🔍 Code Quality Improvements

  • Variable Naming: Improved variable naming clarity (e.g., matchregex_match, param_match)
  • Version Handling: Enhanced version comparison logic (StrictVersionVersion)
  • Type Safety: Better regex match handling and parameter validation

Impact

  • Backward Compatibility: No breaking changes to public APIs
  • Development Environment: All developers will need to update their local Python environments to 3.10
  • Build Pipeline: CI/CD processes now run on Python 3.10 infrastructure
  • Dependencies: All package dependencies remain compatible with the new Python version
  • Performance: Expected improvements in application startup time and memory usage

Testing

  • ✅ All existing tests continue to pass with Python 3.10
  • ✅ CI pipeline successfully builds and deploys with new Python version
  • ✅ Docker images build successfully across all services
  • ✅ No regression in functionality observed

📝 Migration Context: This is an automated migration that systematically updates the entire codebase to Python 3.10 while maintaining code quality and consistency standards.


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