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

Newest version si not compatible with python 3.12 #28

Open
wassupxP opened this issue Sep 24, 2024 · 0 comments
Open

Newest version si not compatible with python 3.12 #28

wassupxP opened this issue Sep 24, 2024 · 0 comments

Comments

@wassupxP
Copy link

Hello,
even though readme mentions that the package is available for python 3.12 as well, it always fails as distutils package is removed from python3.12. I tried to create pull request, but couldn't.

Solution 1 - external dependency, packaging, also dependency of pytest:

try:
    import xdist
except ImportError:
    pass
else:
    from packaging.version import Version
    xdist_version = Version(xdist.__version__)
    if xdist_version >= Version("1.14"):

Solution 2 - without external dependency

try:
    import xdist
except ImportError:
    pass
else:
    def versiontuple(v):
        return tuple(map(int, (v.split("."))))

    if versiontuple(xdist.__version__) >= versiontuple("1.14"):

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

No branches or pull requests

1 participant