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.

Follow PEP 440 and install non-dev versions if `--pre` is not given

See original GitHub issue

People installing scanpy==1.4.4.post1 (which specifies anndata>=0.6.22rc1) currently get anndata==0.7rc2. I think they should get anndata==0.6.22 instead.

What’s the problem this feature will solve? Currently pip treats the >= and rc parts separately:

  • >= means to pip “Anything bigger is OK” (except for rcs and alphas and betas)
  • rc means “The user is OK with release candidates”

I don’t think that makes sense: When you specify a dependency as >=X.YrcZ, you mean “I need X.Y and consider the prereleases of X.Y to be stable enough”. It doesn’t mean you extend trust to any future prereleases of that package.

Describe the solution you’d like If rc, alpha, beta, … appears in a version, >= should mean “get me any higher development versions of that version, or any higher release versions” E.g. >=0.6.22a1 should mean 0.6.22a2, 0.6.22b1, 0.6.22rc2, are OK, and any stable version >=0.6.22

Follow PEP 440 as described below:

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
uranusjrcommented, Jan 11, 2020

so fuck what the users expects or wants

I wouldn’t say conclusively (yet?) this is what the users expect as a consensus. And pip maintainers most certainly do not intend to send that message if they do decide to stick with the current behaviour. Please keep things reasonable here.

2reactions
uranusjrcommented, Oct 16, 2020

I don’t think there is a change in the version specification logic, but a weird quirk in the dependency discovery logic:

$ pip install wltp  # This installs fine.

$ pip install "wltp<1"  # But this fails.
ERROR: Could not find a version that satisfies the requirement wltp<1 (from versions: 0.0.7a0, 0.0.8a0, 0.0.8a2,
0.0.9a1, 0.0.9a3, 0.0.9a4, 0.0.9a5, 0.1.0a0, 0.1.0a1, 0.1.0a2, 0.1.0a3, 0.1.1a0, 0.1.2a0)

The “difference” between pip 19 and 20 you see is due to co2mpas changing its dependencies. pip did not change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PEP 440 – Version Identification and Dependency Specification
This PEP describes a scheme for identifying versions of Python software distributions, ... Any given release will be a “final release”, “pre-release”, ...
Read more >
python and PEP 440 - how serious is this warning about ...
in some circumstances. It seems PEP440 does allow arbitrary "local version labels" to be appended to a version specifier, but these must be ......
Read more >
Commands | Documentation | Poetry - Python dependency ...
This command shows the current version of the project or bumps the version of the project and writes the new version back to...
Read more >
hugovk@mastodon.social - Twitter
for putting in the time and energy to take my quick and hacky version of ... It scans the accounts you follow on...
Read more >
For downstream package authors — NumPy v1.23 Manual
NumPy uses a standard, PEP 440 compliant, versioning scheme: ... a given version of NumPy will still run correctly with newer NumPy versions,...
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