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

Update pipenv to 2020.11.15 and unpin pip #1169

Merged
merged 1 commit into from
Feb 11, 2021
Merged

Update pipenv to 2020.11.15 and unpin pip #1169

merged 1 commit into from
Feb 11, 2021

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Feb 11, 2021

Previously the buildpack used pipenv 2018.5.18, which in addition to being out of date doesn't support newer pip, meaning that apps using pipenv had to be pinned to a much older version of pip.

For apps using pipenv, the buildpack now installs pipenv 2020.11.15 and no longer overrides the pip version compared to non-pipenv installs, meaning pip 20.1.1 is now used instead of pip 9.0.2. (The pip version is still pinned, but to the reasonably new pip version used by all other non-pipenv builds.)

Changes:
https://github.com/pypa/pipenv/blob/master/CHANGELOG.rst#20201115-2020-11-15
pypa/pipenv@v2018.05.18...v2020.11.15

This is particularly important since cryptography v3.4 (released 2021-02-07) requires at least pip 19.x, otherwise pip is unable to use its newer style abi3 wheels, and so falls back to building the source distribution. This causes the install to fail, since building cryptography from the sdist now requires Rust, which is not present in the Heroku stack image. As seen in:

For more info on the cryptography issue, see:
https://cryptography.io/en/latest/faq.html#installing-cryptography-fails-with-error-can-not-find-rust-compiler
pyca/cryptography#5771
pyca/cryptography#5798

Fixes #979.
Fixes #987.
Fixes #1108.
Closes GUS-W-8054805.

@edmorley edmorley requested a review from a team as a code owner February 11, 2021 16:18
@edmorley edmorley self-assigned this Feb 11, 2021
Previously the buildpack used pipenv `2018.5.18`, which didn't support
newer pip, meaning that apps using pipenv had to be pinned to a much
older version of pip.

For apps using pipenv, the buildpack now installs pipenv `2020.11.15`
and no longer overrides the pip version compared to non-pipenv installs,
meaning pip `20.1.1` is now used instead of pip `9.0.2`.

Changes:
https://github.com/pypa/pipenv/blob/master/CHANGELOG.rst#20201115-2020-11-15
pypa/pipenv@v2018.05.18...v2020.11.15

This is particularly important since the recently released `cryptography`
v3.4 requires at least pip 19.x, otherwise pip is unable to use its newer
style wheels, and so falls back to building the source distribution. This
causes the install to fail, since building `cryptography` now requires Rust,
which is not present in the Heroku stack image.

Fixes #979.
Fixes #987.
Fixes #1108.
Closes GUS-W-8054805.
@edmorley edmorley merged commit 244c9f0 into main Feb 11, 2021
@edmorley edmorley deleted the update-pipenv branch February 11, 2021 17:17
@edmorley
Copy link
Member Author

I'll release this to the buildpack registry tomorrow (which is the release that apps use with the buildpack URL of heroku/python). If anyone would like to try it out before then, you can switch to the buildpack URL of https://github.com/heroku/heroku-buildpack-python which uses the main branch from GitHub.

@edmorley
Copy link
Member Author

This has now been released to the buildpack registry in #1170, so available via the heroku/python buildpack URL, and the following changelog entry published:
https://devcenter.heroku.com/changelog-items/2029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants