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.

Poetry refuses to upgrade projects that bound the Python version

See original GitHub issue

Please see my comment and @rgommers’s reply here.

Because SciPy (and soon NumPy) have an upper bound version set to be “❤️.10”, Poetry refuses to upgrade SciPy on any project that leaves the Python version unbounded. Poetry says:

   1: fact: scipy (1.7.0) requires Python >=3.7,<3.10
   1: derived: not scipy (==1.7.0)
   1: fact: scipy (1.6.3) requires Python >=3.7,<3.10
   1: derived: not scipy (==1.6.3)
   1: fact: scipy (1.6.2) requires Python >=3.7,<3.10
   1: derived: not scipy (==1.6.2)
   1: fact: scipy (1.6.0) depends on numpy (>=1.16.5)
   1: selecting scipy (1.6.0)

This means that all projects either need to inherit this upper bound in order to get updates. Does that make sense? Or would it be better for Poetry to not derive the above facts? After all, when poetry update is called, the Python version is fixed.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rgommerscommented, Aug 6, 2021

Also, I’m just curious, but do packages ever go from releasing wheels to not releasing wheels?–in which case your idea would make it so that you would be stuck using past versions?

Highly unusual. In most cases it’s a temporary issue, like the release manager uploading an sdist first and the wheels after. I’ve done this before and gotten bug reports about it within an hour, it’s an easy mistake to make.

There’s a way to accommodate those projects though that do it on purpose, there’s a design tradeoff to make here between:

  1. don’t accept sdists at all if a project has a wheel for any version
  2. accept sdists only if there are no wheels for that version or any newer version

(2) seems good enough and would not break anything for projects that at some point decided to stop shipping wheels.

Perhaps you should open an issue?

I will try to do that sometime in the next week, with some more context and a suggested design change.

1reaction
rgommerscommented, Jul 16, 2021

I wasn’t sure, and thought that that would be unnecessary work in bumping that bound on all my projects every time a new Python version comes out

It’d be nice if it wasn’t needed, I think it’s still odd that it is - but that’s up to the Poetry devs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry doesn't use the correct version of Python - Stack Overflow
If you want to update the versions of python supported by the project you can edit the file directly and run poetry update...
Read more >
FAQ | Documentation | Poetry - Python dependency ...
Why are unbound version constraints a bad idea? #. A version constraint without an upper bound such as * or >=3.4 will allow...
Read more >
3. How to package a Python
When you run poetry install , poetry creates a poetry.lock file, which contains a record of all the dependencies you've installed while developing...
Read more >
Announcing Poetry 1.2.0 -- Python dependency management ...
Seems like a fairly clear and unobtrusive way of getting people to upgrade to newer systems, and if you're version-pinned to a previous...
Read more >
Developing Python with Poetry & Poetry2nix - Tweag
Most Python projects are in fact polyglot. ... We are essentially tied to whatever package version Nixpkgs provides for any given dependency ...
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