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

pantsbuild.pants wheel does not work with Python 3.7 #7459

Closed
Eric-Arellano opened this issue Mar 29, 2019 · 0 comments · Fixed by #7578
Closed

pantsbuild.pants wheel does not work with Python 3.7 #7459

Eric-Arellano opened this issue Mar 29, 2019 · 0 comments · Fixed by #7578

Comments

@Eric-Arellano
Copy link
Contributor

Eric-Arellano commented Mar 29, 2019

Problem

Due to #7401 building the cryptography wheel as cp36-cp36m, rather than using the cp34-abi3 wheel from PyPi, Pants does not work properly with a Python 3.7 interpreter.

Specifically, it appears to fail if the user uses any contrib packages from PyPi. To reproduce, use this pants.ini and the ./pants script from the setup repo.

[GLOBAL]
pants_version: 1.15.0.dev4
pants_runtime_python_version: 3.7
plugins: [
    'pantsbuild.pants.contrib.go==%(pants_version)s',
  ]

Then running ./pants, you'll get the error:

Exception message: Could not satisfy all requirements for pantsbuild.pants==1.15.0rc0:
    pantsbuild.pants==1.15.0rc0(from: pantsbuild.pants.contrib.go==1.15.0rc0)

Solution coming soon

This can be fixed once pex-tool/pex#692 gets merged into Pants, as we'll be able to remove:

# TODO(pex#539): This code hacks around Pex's issue in resolving abi3 values with an abi
# from an earlier Python 3 version. Specifically, the cryptography wheel is normally marked as cp34-abi3,
# meaning it supports any Python >= 3.4. But when running `release.sh -3p`, Pex will fail to
# resolve the cryptography wheel we have. So, we work around this by building our own cryptography
# wheel with `cp36-cp36m`.
if [[ "${python_three:-false}" == "true" ]]; then
wheel_args=("--no-binary=cryptography" "${wheel_args[@]}")
fi

@Eric-Arellano Eric-Arellano added this to In progress in Adding Python 3 support Mar 30, 2019
@Eric-Arellano Eric-Arellano moved this from In progress to To do in Adding Python 3 support Mar 30, 2019
@Eric-Arellano Eric-Arellano mentioned this issue Mar 30, 2019
12 tasks
Eric-Arellano added a commit that referenced this issue Apr 16, 2019
…ing abi3 workaround (#7578)

In order to release the Py36 PEX, we had to workaround an upstream Pex issue that could not properly resolve `cryptography-cp34-abi3`. Now that this is fixed, we can restore support Python 3.7+.

Will close #7459.
@Eric-Arellano Eric-Arellano moved this from To do to Done in Adding Python 3 support Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1 participant