[Python-ideas] Add support for version objects
phd at phdru.name
Fri May 27 15:30:41 EDT 2016
On Fri, May 27, 2016 at 10:04:34PM +0300, Serhiy Storchaka <storchaka at 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().
> There is a support of version objects in Perl  and .NET . There are
> third-party Python implementations (, , ).
> Version objects can be used for representing:
> 1. Version of Python itself (sys.version_info).
> 2. Version of OS and system libraries.
> 3. Static and runtime versions of wrapped libraries (zlib, expat, sqlite,
> curses, Tcl/Tk, libffi, libmpdec).
> 4. Versions of third-party modules.
> The benefit of version objects against plain strings is that version objects
> are comparable with expected rules (1.2.3 < 1.10.1).
> The benefit of version objects against tuples is human readable string
> representation and named attributes for components.
>  http://search.cpan.org/perldoc?version
>  https://pypi.python.org/pypi/semantic_version
>  https://pypi.python.org/pypi/versions
>  https://pypi.python.org/pypi/version
Oleg Broytman http://phdru.name/ phd at phdru.name
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas