Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always show version in pip command #9449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

bfirsh
Copy link

@bfirsh bfirsh commented Apr 30, 2021

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 ==.

@ewjoachim
Copy link
Contributor

ewjoachim commented Apr 30, 2021

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.

@bfirsh
Copy link
Author

bfirsh commented Apr 30, 2021

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.

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 `==`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants