Skip to content
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

Fix compatibility with Python 3.12 #537

Closed
avelanarius opened this issue Dec 7, 2023 · 5 comments · Fixed by #544
Closed

Fix compatibility with Python 3.12 #537

avelanarius opened this issue Dec 7, 2023 · 5 comments · Fixed by #544
Assignees

Comments

@avelanarius
Copy link

In https://github.com/scylladb/java-driver we run scylla-ccm for integration tests in GitHub Actions. Recently, GitHub Actions switched to using Python 3.12 by default and CCM fails to start with the following error:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.0/x64/bin/ccm", line 7, in <module>
    from ccmlib.cmds import command, cluster_cmds, node_cmds
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/ccmlib/cmds/command.py", line 6, in <module>
    from ccmlib.cluster_factory import ClusterFactory
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/ccmlib/cluster_factory.py", line 5, in <module>
    from ccmlib import common, repository
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/ccmlib/repository.py", line 15, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

distutils was removed in Python 3.12.

@avelanarius
Copy link
Author

(For now I'll probably resort to using Python 3.11 in that repo)

avelanarius added a commit to avelanarius/java-driver that referenced this issue Dec 7, 2023
scylla-ccm, which we use in integration tests does not support Python
3.12 (refs scylladb/scylla-ccm#537). Switch to using Python 3.11
specifically to fix the compatibility problem.
@fruch
Copy link
Contributor

fruch commented Dec 7, 2023

This is weird, since I've tested the python driver with 3.12 (but it was a release candidate)

avelanarius added a commit to muzarski/java-driver that referenced this issue Dec 13, 2023
scylla-ccm, which we use in integration tests does not support Python
3.12 (refs scylladb/scylla-ccm#537). Switch to using Python 3.11
specifically to fix the compatibility problem.
k0machi added a commit to k0machi/scylla-ccm that referenced this issue Dec 19, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or reimplementations (in the case of
strtobool). LooseVersion is replaced by packaging.Version and
dir_util.copy_tree is replaced by shutil.copytree

Fixes scylladb#537
k0machi added a commit to k0machi/scylla-ccm that referenced this issue Dec 19, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or reimplementations (in the case of
strtobool). LooseVersion is replaced by packaging.Version and
dir_util.copy_tree is replaced by shutil.copytree

Fixes scylladb#537
k0machi added a commit to k0machi/scylla-ccm that referenced this issue Dec 19, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or reimplementations (in the case of
strtobool). LooseVersion is replaced by packaging.Version and
dir_util.copy_tree is replaced by shutil.copytree

Fixes scylladb#537
k0machi added a commit to k0machi/scylla-ccm that referenced this issue Dec 19, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes scylladb#537
k0machi added a commit to k0machi/scylla-ccm that referenced this issue Dec 19, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes scylladb#537
k0machi added a commit to k0machi/scylla-ccm that referenced this issue Dec 19, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes scylladb#537
k0machi added a commit to k0machi/scylla-ccm that referenced this issue Dec 19, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes scylladb#537
@roydahan
Copy link
Contributor

Why didn't we just set it to use with python 3.11 for now?
At least so the CI won't be broken for so long.

@fruch
Copy link
Contributor

fruch commented Dec 24, 2023

Why didn't we just set it to use with python 3.11 for now?
At least so the CI won't be broken for so long.

Which CI ?

@roydahan
Copy link
Contributor

java-driver CI.

Can you please check this PR?
scylladb/java-driver#269

fruch pushed a commit to k0machi/scylla-ccm that referenced this issue Dec 25, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes scylladb#537
fruch pushed a commit to k0machi/scylla-ccm that referenced this issue Dec 25, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes scylladb#537
fruch pushed a commit that referenced this issue Dec 25, 2023
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes #537
avelanarius pushed a commit to avelanarius/scylla-ccm that referenced this issue Jan 12, 2024
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.

Fixes scylladb#537
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 a pull request may close this issue.

4 participants