[Twisted-Python] Re: [Twisted-commits] r22428 - Deprecation API for functions and methods.

glyph at divmod.com glyph at divmod.com
Fri Feb 1 00:11:00 EST 2008


On 04:34 am, jml at mumak.net wrote:
>On Feb 1, 2008 1:19 PM,  <glyph at divmod.com> wrote:

>Having a canonical representation doesn't exclude having multiple
>representations.

True enough.
>Looking at how these are actually used:
>- str() is used only for copyright (and tests)

This is probably the most poorly-thought-out method of the bunch anyway, 
so I'm glad to see it's used less.
>- short is used for __init__.py

Makes sense, this is where you'd go looking.
>- base is used for short, in _release._changeVersionInFile (don't know
>why base rather than everyone else, actually) and dist.py

base is used here because we will explicitly never put an SVN rev into a 
README file.
>- getVersionString is used only by deprecate.

So, perhaps this and str() should be the same thing.  Is there really a 
reason for omitting the svn revno here?
>In summary, sometimes we want the project name, sometimes we want the
>svn revno. This is perhaps better achieved by having a single function
>/ method that takes a couple of params.

>Personally, I think that having a project name in Version is silly.

... and yet, getVersionString uses that attribute?

The point of having a project name in a version is to specifically 
qualify the version to alert about meaningless comparisons.  "Twisted 
version 2.5.0" does not meaningfully compare to "Python version 2.5.0", 
despite being apparently equal if you elide the project name.
>For the purposes of this discussion, (my insane idea) is a massive, 
>massive YAGNI.

Definitely.
>>But, this is somewhat obviously a bike shed, so I am not going to
>>agitate terribly hard for this.  It's not like I use Twisted primarily
>>for dealing with my obscurely formatted package version strings ;-).
>
>Right. I propose we do nothing.

An easy position to defend.




More information about the Twisted-Python mailing list