Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85599

Re: Odd version scheme

Date 2015-02-12 11:46 -0600
From Tim Chase <python.list@tim.thechases.com>
Subject Re: Odd version scheme
References <54DCD8A5.9050907@yahoo.no> <20150212110506.39410d54@bigbox.christie.dr> <54DCE4D9.2030100@yahoo.no>
Newsgroups comp.lang.python
Message-ID <mailman.18702.1423763100.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 2015-02-12 18:37, Gisle Vanem wrote:
> Tim Chase wrote:> So the test should actually be something like
> 
> >    if LooseVersion(QtCore.PYQT_VERSION_STR) <
> > LooseVersion("4.10"): balk()
> 
> That's exactly what they do now in IPython/utils/version.py with
> the comment:
>    Utilities for version comparison
>    It is a bit ridiculous that we need these.
> 
> Not sure why this is "ridiculous".

Well, if you're storing them as strings, then duh, you need the
helper utilities.  If you store them as comparable tuples, then it's
not a problem. :-/

  # library.VERSION = (3, 14, 15)
  if library.VERSION < (2, 3, 18):
    complain()

It does become harder to mark things as alpha/beta/pre/rc, but
something Enum-like might suffice for that in a fourth field of the
tuple.

-tkc


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Odd version scheme Tim Chase <python.list@tim.thechases.com> - 2015-02-12 11:46 -0600

csiph-web