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


Groups > comp.lang.python > #85599

Re: Odd version scheme

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.016
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:version': 0.09; 'cc:addr:python-list': 0.11; '(2,': 0.16; '(3,': 0.16; '-tkc': 0.16; ':-/': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'storing': 0.16; 'tuple.': 0.16; 'tuples,': 0.16; 'comment:': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'cc:addr:python.org': 0.22; 'helper': 0.24; 'skip:l 30': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; 'chase': 0.31; 'comparison': 0.31; 'problem.': 0.35; 'something': 0.35; 'test': 0.35; 'but': 0.35; 'version': 0.36; '14,': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'received:10': 0.37; 'does': 0.39; 'sure': 0.39; "you're": 0.61; 'field': 0.63; 'become': 0.64; 'comparable': 0.84; 'fourth': 0.84; 'these.': 0.91
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-MC-Relay Neutral
X-MailChannels-SenderId wwwh|x-authuser|tim@thechases.com
X-MailChannels-Auth-Id wwwh
X-MC-Loop-Signature 1423763090232:521462474
X-MC-Ingress-Time 1423763090232
Date Thu, 12 Feb 2015 11:46:31 -0600
From Tim Chase <python.list@tim.thechases.com>
To Gisle Vanem <gvanem@yahoo.no>
Subject Re: Odd version scheme
In-Reply-To <54DCE4D9.2030100@yahoo.no>
References <54DCD8A5.9050907@yahoo.no> <20150212110506.39410d54@bigbox.christie.dr> <54DCE4D9.2030100@yahoo.no>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AuthUser tim@thechases.com
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18702.1423763100.18130.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1423763100 news.xs4all.nl 2933 [2001:888:2000:d::a6]:50935
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:85599

Show key headers only | 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