Need your expertise on a possible bug in poetry 1.1.2 with export feature.
See original GitHub issuedependabot has just push the poetry v1.1.2 but the Tests workflow shows some failures. I’m not able currently to identify if it’s a poetry bug, an error in my implementation of hypermodern-python or link to the content of my package.
So first a link to the dependabot PR in my repo. You can then have access to the logs of the Nox test suite: https://github.com/hacf-fr/meteofrance-api/pull/41
The error is:
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
typing-extensions>=3.7.4 from https://files.pythonhosted.org/packages/60/7a/e881b5abb54db0e6e671ab088d079c57ce54e8a01a3ca443f561ccadb37e/typing_extensions-3.7.4.3-py3-none-any.whl#sha256=7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918 (from black==20.8b1->-c /tmp/tmp5dcwelq_/requirements.txt (line 16))
nox > Session pre-commit failed.
Error: Process completed with exit code 1.
In my package, the pyproject.toml file contain:
typing-extensions = {version = "^3.7.4", python = "~3.6 || ~3.7"}
Because i need the class TypeDict with python 3.6 and 3.7 (not for 3.8 as this class is included in typing module). It seems that black have typing-extensions
in its dependencies whatever the Python version. And due to my rule (which is exported in the requirement.txt
) it raise the error above.
I’ve try to do a diff between the constraints export with poetry 1.0.10 and poetry 1.1.2 and I found that:
299c299
< typing-extensions==3.7.4.3 \
---
> typing-extensions==3.7.4.3; python_version >= "3.6" and python_version < "3.8" \
308a309,311
Do some one can help me to understand the root cause and eventually a correction or a workaround ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Issue open: https://github.com/python-poetry/poetry/issues/3160
Thank you for the simple instructions for reproducing the bug.
I can only assume that Poetry 1.0.10 does exactly that, compute the union of the constraints. It does look like a regression in Poetry 1.1.2, so you might open an issue for them.
Repro:
Output for Poetry 1.0.10 (Python 3.8.6):
Output for Poetry 1.1.2 (Python 3.8.6):