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

Pants poetry-based lockfiles fail to include hashes. #16111

Closed
jsirois opened this issue Jul 9, 2022 · 0 comments · Fixed by #16112
Closed

Pants poetry-based lockfiles fail to include hashes. #16111

jsirois opened this issue Jul 9, 2022 · 0 comments · Fixed by #16112
Assignees
Labels

Comments

@jsirois
Copy link
Contributor

jsirois commented Jul 9, 2022

This was detected in a unit test in the Pants repo, but is a wider problem for all versions of Pants that support generating lockfiles using Poetry.

The proximal cause is this announcement from PyPI:
https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

And the root cause is this Poetry code:
https://github.com/python-poetry/poetry/blob/bce13c14f73060b3abbb791dea585d8fde26eaef/poetry/repositories/pypi_repository.py#L272-L283

There was a Poetry fix released and backported to the 1.1. branch here:
python-poetry/poetry#5973

Users can fix with 2 steps:

  1. Update Pants config
[poetry]
# N.B.: Works around issue described at https://github.com/pantsbuild/pants/issues/16111
# Undo once on a Pants with this version or greater as the default.
version = "poetry==1.1.14"
  1. Clear Poetry caches with rm -rf ~/.cache/pypoetry on Linux and rm -rf ~/Library/Caches/pypoetry on Mac.

This issue tracks bumping Pants default to this fixed Poetry version.

@jsirois jsirois added the bug label Jul 9, 2022
@jsirois jsirois self-assigned this Jul 9, 2022
jsirois added a commit to jsirois/pants that referenced this issue Jul 9, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes pantsbuild#16111

[ci skip-rust]
[ci skip-build-wheels]
benjyw pushed a commit that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes #16111

[ci skip-rust]
[ci skip-build-wheels]
jsirois added a commit to jsirois/pants that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes pantsbuild#16111

(cherry picked from commit b97936e)

[ci skip-rust]
[ci skip-build-wheels]
jsirois added a commit to jsirois/pants that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes pantsbuild#16111

(cherry picked from commit b97936e)

[ci skip-rust]
[ci skip-build-wheels]
jsirois added a commit to jsirois/pants that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes pantsbuild#16111

(cherry picked from commit b97936e)

[ci skip-rust]
[ci skip-build-wheels]
jsirois added a commit to jsirois/pants that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes pantsbuild#16111

(cherry picked from commit b97936e)

[ci skip-rust]
[ci skip-build-wheels]
jsirois added a commit that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes #16111

(cherry picked from commit b97936e)
jsirois added a commit that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes #16111

(cherry picked from commit b97936e)
jsirois added a commit that referenced this issue Jul 10, 2022
This was due to this change on PyPI:
  https://discuss.python.org/t/backwards-incompatible-change-to-pypi-json-api/17154

Which was fixed in Poetry yesterday here:
  python-poetry/poetry#5973

Unfortunately, the full fix requires blowing away the non-Pants
controlled Poetry cache at `~/.cache/pypoetry` on Linux and
`~/Library/Caches/pypoetry` on Mac.

Fixes #16111

(cherry picked from commit b97936e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant