-----Original Message-----
From: Chris Angelico <ros...@gmail.com> 
Sent: 10 February 2020 18:16
To: python-ideas <python-ideas@python.org>
Subject: [Python-ideas] Re: PyPI should include PEP 440-compliant version 
strings for including in install_requires

On Tue, Feb 11, 2020 at 5:00 AM Christopher Barker <python...@gmail.com> wrote:
>
> > there are many reasons to at least specify a minimum version
>
> Yes, but I think your proposal would encourage people to pin to the latest 
> version as a minimum, which would be unfortunate.
>
> I like the maxim:
> “don’t pin a version unless you have a good reason, and you’ve thought about 
> what version to pin to.”
> Once you’ve done that — the formatting of the version string is a light lift.
>

Agreed. Pin only when you actually know why you're pinning.

1) You've just pushed to staging and done your testing. For the push to 
production, use "pip freeze" to lock in the deps.
2) You start using a cool new feature of something and need to make sure you 
have version X
3) There's a bug in version X.Y.Z but version X.Y-1.Q works, so you pin that 
pending a check of X.Y+1 or X.Y.Z+1
4) Etcetera.

But *by default*, just grab the latest and don't mandate it.  Most of the time, 
it won't matter, so don't create problems downstream.

ChrisA
[Steve Barnes] 

Good points above!

I know that this discussion is about pip requires versioning but I would like 
to add one point were it is important to pin to __exact__ releases for pipenv 
(not pip):

 - Always pin to specific releases in pipenv if you are using pipenv and 
travis, or other, CI/CT - this is because without an exact pin (i.e. with a * 
in the pipenv library list) the latest versions of libraries will be downloaded 
and when (not if) the unpinned library has been updated your tests will always 
fail even, for the most trivial change, until someone with the pipenv expertise 
updates the SHA list. (I had this recently with a change to a readme.txt file 
on a project). 

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an 
email to python-ideas-le...@python.org 
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/S6NKQ3YKAFY6CTMUWAAVXGU4VT2AV6GU/
Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/K4VTUCQ54ZOOQZMWSRCWLTDGWE4A6WTM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to