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.

Only install pre-release rc versions and ignore other(including development and stable) versions when with option --rc

See original GitHub issue

What’s the problem this feature will solve?

Sometimes, we want to only install rc versions on our release branch. We want to use somepackage>=1.1.2rc1 and expect it to install the latest rc version 1.2.3rc1, though we have 1.1.2rc1, 1.2.0rc1, 1.2.0, 1.2.1a1, 1.2.1, 1.2.2a1, 1.2.2, 1.2.3a1, 1.2.3rc1, 1.2.3. Our versions all follow the specification on semver.org .

Describe the solution you’d like

Add an option --rc to make pip only consider rc version and ignore stable as well as development versions.

Alternative Solutions

Not found yet.

Additional context

From the semver.org, the precedence is something like the following example. Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.

On my release and development branch, I tried to use pip install --pre somepackage>=1.1.2rc1 but it installed the latest stable version 1.2.3 for me. What I want is 1.2.3rc1.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pfmoorecommented, Apr 27, 2021

I guess you can explicitly specify the version you want. Otherwise, I don’t know of a simple workaround.

To be clear, I understand that you need to do this, and that pip doesn’t provide the functionality you are after. But the decision on whether functionality should be added to pip isn’t based simply on “does someone need to do this”, we have to look at the wider picture and how many of our users would benefit from any given feature. I’m not aware of ever having had another request for this functionality, which is why I believe it’s of limited value.

0reactions
zengqingfu1442commented, Apr 27, 2021

I think this is a similar request for the functionality of pip, https://github.com/pypa/pip/issues/5211

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pre-release versions in NuGet packages | Microsoft Learn
Whenever you release an updated package with a new version number, NuGet considers that one as the "latest stable release" as shown, ...
Read more >
Pre-release versions are not matched by pip when using the
Include pre-release and development versions. By default, pip only finds stable versions. The premise of the question is that the --pre option ......
Read more >
PEP 440 – Version Identification and Dependency Specification
Public version identifiers MUST be unique within a given distribution. Installation tools SHOULD ignore any public versions which do not comply with this...
Read more >
Semantic Versioning 2.0.0 | Semantic Versioning
PATCH version when you make backwards compatible bug fixes. Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR....
Read more >
Specifying Your Project's Version - Setuptools
Following a release number, you can have either a pre-release or post-release tag. Pre-release tags make a version be considered older than the...
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