Skip to content

Upgrade Python runtime to 3.10 with code modernization #27

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 6 commits into
base: master
Choose a base branch
from

Conversation

gitar-bot-staging[bot]
Copy link

Description

This PR upgrades the Python runtime from 3.9 to 3.10 across the entire codebase and includes necessary code modernization changes to maintain compatibility.

Changes Made

  • Python Version Upgrade: Updated Python requirements from 3.9 to 3.10 in all setup.py files and CI/CD configurations
  • Docker Base Images: Updated Docker base images from python:3.9 to python:3.10
  • CI/CD Pipeline: Updated GitHub Actions workflows to use Python 3.10
  • Distutils Migration: Replaced deprecated distutils imports with setuptools equivalents
  • Asyncio Modernization: Removed deprecated loop parameter from asyncio API functions
  • Traceback API Update: Updated traceback.format_exception parameter name from etype to exc

Motivation

Python 3.10 brings several improvements including better error messages, structural pattern matching, and performance optimizations. This upgrade ensures we stay current with Python's evolution while addressing deprecated APIs that will be removed in future versions.

Impact

  • Compatibility: All services now run on Python 3.10
  • Future-proofing: Removes usage of deprecated APIs (distutils, asyncio loop parameter)
  • Performance: Potential performance improvements from Python 3.10 optimizations
  • Development: Better error messages and debugging capabilities

Testing

  • All CI/CD pipelines have been updated to test with Python 3.10
  • Existing test suite continues to pass with the new runtime

Link to run
Requested by: naveen@gitar.ai

gitar-bot and others added 6 commits July 6, 2025 01:26
…ions in CI/CD configuration files (GitHub Actions, GitLab CI, etc.) from `3.9` to `3.10`.

Update GitHub Actions setup-python to v4: Update GitHub Actions `setup-python` action versions to v4 or later for proper Python 3.10 support.
…rom `python:3.9` to `python:3.10` in Dockerfiles and docker-compose files.
…in setup.py and pyproject.toml files to include Python 3.10 support (e.g., `>=3.8,<3.11` or `>=3.9`).
… import` and `from distutils import` statements with `from setuptools import` equivalents, migrating setup.py files from distutils to setuptools.

Migrate distutils Extension to setuptools: Replace `from distutils.extension import Extension` with `from setuptools import Extension` and update related extension building code.
Migrate distutils.command imports to setuptools: Replace `from distutils.command import` imports with setuptools equivalents or custom command implementations.
Update distutils.util function calls with alternatives: Update `distutils.util` function calls like `strtobool()` and `convert_path()` with equivalent implementations or alternative libraries.
Replace distutils.spawn with subprocess.run calls: Replace `distutils.spawn.spawn()` calls with `subprocess.run()` or equivalent process execution methods.
Migrate distutils.version to packaging.version classes: Replace `distutils.version` classes like `LooseVersion` and `StrictVersion` with `packaging.version` equivalents.
Migrate distutils.sysconfig to sysconfig module: Replace `distutils.sysconfig` imports and function calls with `sysconfig` module equivalents for system configuration queries.
…eter from asyncio high-level API functions including `create_task()`, `gather()`, `shield()`, `wait_for()`, `wait()`, `as_completed()`, and `run_coroutine_threadsafe()`.
…e `traceback.format_exception(etype, value, tb)` parameter name `etype` with `exc` in traceback module function calls.

Co-authored-by: naveen@gitar.ai <naveen@gitar.ai>
@gitar-bot-staging
Copy link
Author

✅ Gitar will automatically:

  • Address comments that start with 'Gitar'.
  • Look at CI failures and help fix them

⚙️ Options:

  • Disable automatic comment and CI monitoring

🐛 (Staging) Report a Bug

If you notice any bugs or poor interactions with the bot, click these links to report them:

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