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

[Bug] Issue with python 3.12 support #30

Closed
PrinceJunkie opened this issue Oct 4, 2023 · 17 comments
Closed

[Bug] Issue with python 3.12 support #30

PrinceJunkie opened this issue Oct 4, 2023 · 17 comments

Comments

@PrinceJunkie
Copy link

PrinceJunkie commented Oct 4, 2023

I'm using the devcontainer mcr.microsoft.com/vscode/devcontainers/python:3.12-bullseye as an environment.

If I try to install the latest verson of uuid-utils it fails:

vscode ➜ /dev (master) $ pip install uuid-utils
Defaulting to user installation because normal site-packages is not writeable
Collecting uuid-utils
  Downloading uuid_utils-0.4.0.tar.gz (15 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Checking for Rust toolchain....
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

It works if you change the devcontainer to python:3.11-bullseye

@aminalaee
Copy link
Owner

I need to do a release to publish 3.12 wheels, apparently it's trying to download the Downloading uuid_utils-0.4.0.tar.gz and build it locally, but again complains that:

Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

I think the case is that if you switch to 3.11 it's not downloading the tar file but instead getting the wheel so you don't need Cargo.

@PrinceJunkie PrinceJunkie changed the title Issue with python 3.12 support [Bug] Issue with python 3.12 support Oct 4, 2023
@aminalaee
Copy link
Owner

This is done now.

@PrinceJunkie
Copy link
Author

@aminalaee

I'm having the same issue with the new version again:

Collecting uuid_utils==0.5.0 (from -r requirements-dev.txt (line 18))
  Downloading uuid_utils-0.5.0.tar.gz (15 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Checking for Rust toolchain....
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@aminalaee
Copy link
Owner

I think you should probably check here: https://pypi.org/project/uuid-utils/0.5.0/#files
As your OS might not be one of those which has 3.12 wheel ready.

@PrinceJunkie
Copy link
Author

@aminalaee

Could you please explain on what the "wheel readiness" depends?

Because the OS used in the devcontainer had no problems with python 3.11 and I see wheels called manylinux for python 3.11 but not for 3.12 😕

Anyway: Keep up the great work, thanks for everything what you did so far!

@aminalaee
Copy link
Owner

aminalaee commented Oct 5, 2023

I'm not really sure how long it'll take until Python3.12 wheels are available, but Python3.12 stable was just released a few days ago. the manylinux project it is updating to support 3.12 and after that the wheels can be built and published here.

Thank you for the kind words :)

@PrinceJunkie
Copy link
Author

@aminalaee pypa/manylinux#1484 added support for CPython 3.12.
Could you please add the wheels for the missing distros?

@opentyler
Copy link

I'm running into this error myself as well, but also thank you for putting this together library.

@aminalaee aminalaee reopened this Oct 24, 2023
@aminalaee
Copy link
Owner

Seems like Python 3.12 is still not available, there might be an issue with maturin-action project:
#36

@opentyler
Copy link

Yeah that makes sense, maturin was what was causing my build to fail last night. That being said, I noticed the maturin version it was trying to download was 0.14.17, which seems weird to be such an old version since newest maturin is version 1.3. Tho it is specified as such in the pyproject.toml ([build-system] requires = ["maturin>=0.14,<0.15"]). Is it possible it's just a maturin version issue?

Thanks again for responding so quickly and my apologies if the above is a stupid question.

@opentyler
Copy link

Thanks for the commits!

That pretty well solved it. Then I just had to do 1 more thing to be able to install successfully, which was enable access to the unstable features of the rust uuid crate (it was giving me errors it couldnt access these features), so I solved this by setting the following environment variable:
export RUSTFLAGS="--cfg uuid_unstable"

Your commits and then setting that environment variable has enabled me to get uuid_utils to install correctly, so thanks again!

@aminalaee
Copy link
Owner

I will do a release today so the wheels will be available and you won’t need to build locally.

@aminalaee
Copy link
Owner

This should be fixed in 0.6.0 release.

@PrinceJunkie
Copy link
Author

PrinceJunkie commented Nov 5, 2023

@aminalaee

Did I miss something? I'm getting this error with python 3.11 and 3.12

vscode ➜ /dev (master) $ pip install uuid-utils
Defaulting to user installation because normal site-packages is not writeable
Collecting uuid-utils
  Using cached uuid_utils-0.6.0.tar.gz (16 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Checking for Rust toolchain....
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@aminalaee
Copy link
Owner

what OS is that? they have all the wheels for Python 3.12 now.

@PrinceJunkie
Copy link
Author

The environment is the devcontainer mcr.microsoft.com/vscode/devcontainers/python:3.12-bullseye (or python3.11 respectively).
The OS is Debian Bullseye. Version 0.5.0 worked fine for python 3.11 but 0.60 does not.

@aminalaee aminalaee reopened this Nov 6, 2023
@aminalaee
Copy link
Owner

Thank you for flagging this, the wheels were not uploaded completely.
I have confirmed the fix works for Python 3.12, just bump to 0.6.1

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

3 participants