https://pantsbuild.org/ logo
#general
Title
# general
c

curved-television-6568

08/26/2021, 9:50 AM
poetry is weird, or? Using
poetry export
I get strange ICs.
Copy code
$ poetry export
click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" \
    --hash=sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc \
    --hash=sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a
From this
pyproject.toml
Copy code
[tool.poetry.dependencies]
python = "^3.9"
typer = {extras = ["all"], version = "^0.3.2"}
It is the
py >= 3.6 and full_version < 3.0.0
that has me confounded..
As it gives me a
ValueError
Copy code
ValueError: Invalid requirement 'click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" \' in constraints.txt at line 1: not enough values to unpack (expected 1, got 0)
Both on pants 2.6.1rc2 and 2.7.0.dev4
Oh, it was the hashes that tripped them up. So, running
poetry export --without-hashes
yielded better results..
Could be worth mentioning here: https://www.pantsbuild.org/v2.7/docs/python-third-party-dependencies Although, perhaps pants should not blow up in the presence of hashes, even if not used.
b

busy-vase-39202

08/26/2021, 4:25 PM
@curved-television-6568 feel free to use the Suggest Edits button on the docs, with better phrasing. It submits a diff for review/discussion, so doesn't have to be perfect.
c

curved-television-6568

08/26/2021, 4:48 PM
Got it. Thought it may not be needed in the docs, if we instead fix pants so it doesn’t matter if there are hashes or not; if that is a sensible thing to do..? @hundreds-father-404
7 Views