On 27 May 2016 19:29, "Robert Collins" <robertc@robertcollins.net> wrote:
>
> On 28 May 2016 at 07:37, Donald Stufft <donald@stufft.io> wrote:
> >
> >> On May 27, 2016, at 3:04 PM, Serhiy Storchaka <storchaka@gmail.com> wrote:
> >>
> >> I propose to add support for version objects in the stdlib. Version object is a namedtuple-like object with special attrbutes major, minor, etc for representing semantic version in the form used by most open source (and not only) software. The sys module already contains two version objects: sys.version_info and the result of sys.getwindowsversion().
> >
> >
> > If Python adds a version objection, it should not be one that implements SemVer, but one that implements PEP 440 which is what PyPI, pip, setuptools, etc all use. SemVer, while a nice idea, is too simplistic to represent the variations of versioning that the Python community uses.
> >
> > There’s also a pure Python implementation of it available [1].
> >
> > To be honest though, I don’t see a lot of benefit to adding it to the standard library.
>
> Same. Further, I don't see any need for the stdlib itself to use it -
> so its not being drawn in as a dependency, or do you have something in
> mind Serhiy?

The main advantage I'd see to stdlib inclusion is providing "one obvious way to do it" - it isn't immediately obvious to a newcomer that PEP 440 and the implementation in packaging are the preferred approach for SemVer-like version numbers in Python projects.

Cheers,
Nick.