warehouse icon indicating copy to clipboard operation
warehouse copied to clipboard

Always show version in pip command

Open bfirsh opened this issue 4 years ago • 2 comments
trafficstars

The most common reason I find myself going to PyPi is to find the latest version to copy & paste into my requirements.txt. It'd be really nice if the main package page had the string that goes into requirements.txt. What I usually do is copy and paste the title, and edit the space to be ==.

bfirsh avatar Apr 30 '21 00:04 bfirsh

Pinning all the dependencies isn't always advisable, because you'll likely miss security updates. Have you, by any chance, considered using pip-compile or a similar tool (poetry, pipenv, ...) to maintain a requirements.in file without pinning, and have a tool take the hastle of adding the pins for you ? Additionally, you'd get hashes for free.

ewjoachim avatar Apr 30 '21 10:04 ewjoachim

Yes, and I use those in some of my projects.

I am thinking of this from mainly from an average user's point of view. The vast majority of people (I think) use plain old requirements.txt, and not those tools, so that seems like the use-case it seems to be worth supporting.

For most software being developed continuously inside a company or whatever, users probably always want to specify a precise version, because they want complete control over when they ship security updates. From my experience this is true -- all serious Python projects I've worked on just have requirements.txt with specific version pinned.

In my case, I also use Dependabot to trigger security updates in a controlled way, and it only works with requirements.txt files with specific version.

bfirsh avatar Apr 30 '21 17:04 bfirsh

I'm going to close this, as there's not a need to display the current version on the main page of a given project all the time.

We already have the ability to display the desired version when looking at the Release History of a given release. The version will display if the selected version is the latest.

miketheman avatar Oct 21 '24 17:10 miketheman