question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need your expertise on a possible bug in poetry 1.1.2 with export feature.

See original GitHub issue

dependabot 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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oncleben31commented, Oct 9, 2020

Issue open: https://github.com/python-poetry/poetry/issues/3160

Thank you for the simple instructions for reproducing the bug.

1reaction
cjolowiczcommented, Oct 9, 2020

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:

poetry new example
cd example
sed -i '/^python = /s/3.8/3.7/' pyproject.toml
poetry add --python="<3.8" typing-extensions
poetry export -f requirements.txt | grep typing
poetry add --dev black
poetry export -f requirements.txt | grep typing

Output for Poetry 1.0.10 (Python 3.8.6):

...
typing-extensions==3.7.4.3; python_version < "3.8" \
...
typing-extensions==3.7.4.3 \

Output for Poetry 1.1.2 (Python 3.8.6):

...
typing-extensions==3.7.4.3; python_version < "3.8" \
...
typing-extensions==3.7.4.3; python_version < "3.8" \
Read more comments on GitHub >

github_iconTop Results From Across the Web

History | Poetry - Python dependency management and ...
Fix an issue where a virtual environment was created unnecessarily when running poetry export (#6282). Fix an issue where poetry lock --no-update added ......
Read more >
Ubuntu 22.04 | libssl.so.1.1: cannot open shared object file
Is there an easy fix ? For example, having libssl.so.1.1 available without having to uninstall OpenSSL 3 (I don't know if it's even...
Read more >
Product Import Export for WooCommerce – WordPress plugin
Export and import all your WooCommerce products in CSV format. The free plugin, Product Import Export for WooCommerce exports and imports WooCommerce simple ......
Read more >
Setuptools version not pinned in certbot - bug? - Client dev
By default poetry export will include hashes in exports . ... ERROR: In --require-hashes mode, all requirements must have their versions ...
Read more >
Package List — Spack 0.20.0.dev0 documentation
Spack will search your current directory for the download files. ... Needs post-install chmod/chown steps to enable full functionality.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found