Skip to content

Upgrade Python Project to Version 3.10 #19

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 project from Python 3.9 to Python 3.10 across all services, packages, and CI/CD workflows. The migration includes updating Docker base images, GitHub Actions workflows, and removing deprecated asyncio parameters that are no longer supported in Python 3.10.

Motivation

  • Performance improvements: Python 3.10 brings significant performance enhancements and optimizations
  • New language features: Access to structural pattern matching, better error messages, and improved type hints
  • Security updates: Python 3.9 is approaching end-of-life and Python 3.10 provides better security support
  • Ecosystem compatibility: Many modern libraries and frameworks are optimizing for Python 3.10+

Changes Made

🔄 Runtime Environment Updates

  • CI/CD Workflows: Updated Python version in ci-release.yml, ci-staging.yml, and ci-testing-deploy.yml
  • Docker Images: Updated base Python images across all service Dockerfiles (47 files total)
  • Package Configurations: Updated setup.py files for all services and packages

🧹 Code Modernization

  • Asyncio Compatibility: Removed deprecated loop parameter from asyncpg.create_pool() calls
  • Testing Framework: Updated TestClient instantiation to remove deprecated parameters
  • Configuration Updates: Enhanced configuration handling in director service

Impact

  • All services now run on Python 3.10 runtime
  • CI/CD pipelines use Python 3.10 for testing and deployment
  • Improved performance from Python 3.10 optimizations
  • Future-ready codebase with modern Python features available

Test Plan

  • All existing tests pass with Python 3.10 runtime
  • CI/CD workflows execute successfully
  • Docker images build without errors
  • Services start and function correctly in new runtime

Additional Resources

📋 Files Changed (47 total)

GitHub Workflows:

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

Services & Packages:

  • All service Dockerfiles and setup.py files
  • All package setup.py files
  • Service-specific Python code updates

Scripts & Tools:

  • Various utility and maintenance scripts
  • Docker build configurations

This migration ensures our platform stays current with the latest Python improvements while maintaining full backward 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