[MERGE][Trivial] invalid version tuple attempt to raise AssertionError fails with TypeError

Mark Hammond mhammond at skippinet.com.au
Wed Sep 24 02:47:44 BST 2008


> >>>  from bzrlib import revision as _mod_revision
> >> That is not an example of importing a private symbol.
> >
> > Could you please clarify?  It has a leading underscore, which is a
> > bright-red flag to my (and grep's ;) eyes...
> 
> The symbol being imported is bzrlib.revision.  _mod_revision is simply
> a local name for it.

Oops - I'm not sure how I missed that 'as' sitting there :)

> > In response to a suggestion that I propose the API as being public, I
> > pointed out that many more mature plugins don't use the symbol, so
> maybe its
> > not that suitable for becoming public
> 
> Do you think a reasonable plugin would want to use it?

My limited experience with bzr tells me that a reasonable plugin would want
to use it, but looking specifically at 3 more mature plugins shows they do
not.

As mentioned, looking at these existing plugins shows a number of other API
functions that would seem *more* suitable for consideration. 

> > and these plugins *do* use other private symbols,
> 
> In violation of our policy.

Shock Horror!  How Dare They!  It might be worth keeping in mind that we are
talking code owned by others here, so your policy isn't relevant.  The
policy of the local project dictates what symbols can be used, not bzr's.
They will make their decisions in full knowledge of bzr's policy on the
matter.

> Old code tends to be worse code.

Heh.  Surely *some* of that old code is good, solid reliable code?  I
understand its very easy to think all old code must be bad/dead/whatever,
but that often simply means the code isn't understood completely.

> > I think I've done my duty :)
> 
> I think that it would have been easy to make the symbol public at the
> same time as fixing the bug.  I didn't say you had a duty, I made a
> request.

You made a request that I "Please help us make our API great." and you made
this request after I found the problem, submitted the patch, responded to
your suggestion the API be changed and grepped the source for 4 bzr
extensions for other more suitable private functions being used publically.

So from my POV, I had *already* tried to be significant help *before* you
asked me to offer that help.  It almost comes across as though my previous
efforts on this bug were actually a hindrance, or somehow not *enough* help.
I always try to offer the benefit of the doubt and assume you didn't
actually mean that, but perceptions matter...
 
Cheers,

Mark




More information about the bazaar mailing list