Skip to content

Upgrade to Python 3.10 and migrate deprecated distutils to setuptools #23

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

Conversation

gitar-bot-staging[bot]
Copy link

This PR upgrades the entire codebase to Python 3.10 and modernizes deprecated API usage to ensure compatibility with future Python versions.

Summary

  • Upgrade Docker base images from python:3.9 to python:3.10 across all Dockerfiles
  • Update CI/CD configurations to use Python 3.10 and GitHub Actions setup-python v4
  • Migrate distutils to setuptools following PEP 632 deprecation
  • Remove deprecated asyncio loop parameter from high-level API functions
  • Update traceback.format_exception parameter name from etype to exc

Motivation

Python 3.10 introduced several deprecations that will become breaking changes in Python 3.12:

  • distutils is deprecated and will be removed in Python 3.12
  • asyncio loop parameter is deprecated in high-level functions
  • traceback.format_exception parameter naming was updated

This migration ensures forward compatibility and eliminates deprecation warnings.

Impact

  • 52 files modified across the entire codebase
  • All Docker images, CI/CD pipelines, and Python packages updated
  • No breaking changes to existing functionality
  • Prepares codebase for Python 3.12 compatibility

Link to run
Requested by: [email protected]

gitar-bot added 5 commits July 5, 2025 19:19
…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.

Update Python Requirements to Support 3.10: Update `python_requires` in setup.py and pyproject.toml files to include Python 3.10 support (e.g., `>=3.8,<3.11` or `>=3.9`).
…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.
… 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.

Co-Authored-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