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: 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 To: Gisle Vanem 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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