forked from ITISFoundation/osparc-simcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade Python version from 3.9 to 3.10 across project #26
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
gitar-bot-staging
wants to merge
6
commits into
master
Choose a base branch
from
gitar/0197dcf2-3cb5-78d2-8fc7-8342efda2005-0197dcf4-7d26-7341-982e-a9c386c1c08c
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Upgrade Python version from 3.9 to 3.10 across project #26
gitar-bot-staging
wants to merge
6
commits into
master
from
gitar/0197dcf2-3cb5-78d2-8fc7-8342efda2005-0197dcf4-7d26-7341-982e-a9c386c1c08c
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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()`.
…ls immediately followed by keywords by adding whitespace between the number and keyword (e.g., `0in` becomes `0 in`). Update traceback.format_exception parameter name etype to exc: Replace `traceback.format_exception(etype, value, tb)` parameter name `etype` with `exc` in traceback module function calls. Migrate formatter imports to string formatting: Replace `import formatter` and `from formatter import` statements by migrating to string formatting methods or removing formatter module usage entirely. Update threading.Thread deprecated name methods: Replace deprecated `threading.Thread.setName()` and `threading.Thread.getName()` with `threading.Thread.name` property access. Migrate ssl.match_hostname() to ssl context verification: Replace deprecated `ssl.match_hostname()` function calls with equivalent hostname verification using ssl context or urllib3. Replace importlib.abc.Loader.load_module with exec_module: Replace `importlib.abc.Loader.load_module()` calls with `importlib.abc.Loader.exec_module()` method implementations. Update importlib module loading patterns: Replace deprecated `importlib.util.module_for_loader` decorator with updated importlib patterns for module loading. Replace `imp` module with `importlib` equivalents: Replace deprecated `imp` module imports with `importlib` equivalents for dynamic module importing and loading. Replace asyncio.coroutine with async def syntax: Replace `asyncio.coroutine` decorator with native `async def` function definitions for coroutine creation. Co-authored-by: [email protected] <[email protected]>
✅ Gitar will automatically:
⚙️ Options:
🐛 (Staging) Report a BugIf 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR upgrades the entire project from Python 3.9 to Python 3.10, modernizing the codebase to take advantage of Python 3.10's improvements and maintaining compatibility with current Python standards.
Changes Made
python_requires
from~=3.9
to~=3.10
across all setup.py filespython:3.9
topython:3.10
asyncio.coroutine
decorator with nativeasync def
syntaxdistutils
imports tosetuptools
equivalentsthreading.Thread
deprecated name methodsimp
module withimportlib
equivalentstraceback.format_exception
parameter namesMotivation
Python 3.10 Key Features
Python 3.10 introduces several important improvements including structural pattern matching, union types with
|
operator, better error messages, and enhanced debugging capabilities. Official Python 3.10 Release NotesImpact
Link to run
Requested by: [email protected]