[Twisted-Python] Re: [Twisted-commits] r22428 - Deprecation API for functions and methods.
jml at mumak.net
Fri Feb 1 02:46:13 EST 2008
On Feb 1, 2008 4:11 PM, <glyph at divmod.com> wrote:
> 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
> 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?
Is there a reason for including it?
getVersionString should probably be str()
> >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?
Well, it seemed like going with the flow.
The alternative was to hard-code the word 'Twisted' into the
deprecation code -- something that I wouldn't mind at all.
> 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.
And the number of times we've constructed a twisted Version object for
Python is how many?
> >>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.
Its virtue is its clarity.
I fall from my earlier motion and move that we move make
Version.__str__ behave like getVersionString and delete
getVersionString. Or, see the attached patch.
I'm off to a party where the drinks are on Google.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3903 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20080201/71c393c8/attachment.diff
More information about the Twisted-Python