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

John Arbash Meinel john at arbash-meinel.com
Tue Sep 23 16:38:42 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Hammond wrote:
>> Mark Hammond wrote:
>>> bzrtools:
>>>
>>>  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...

You are importing a module and renaming it to a name starting with a
prefix, making it private *to this module*.

You aren't importing a private object from 'bzrlib'.


> 
>> Anyhow, we want to provide a great API, and if you have to use a private 
>> symbol, we're failing at that.  Please help us make our API great.
> 
> I tried to use an internal API function, and when I did it appeared to break
> in a fairly fundamental way.  I diagnosed the problem and submitted a patch.
> 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, and these plugins *do* use other
> private symbols, and have done so for far longer than for my code has
> existed.
> 
> I think I've done my duty :)
> 
> Martin: thanks for agreeing to merge it...
> 
> Cheers,
> 
> Mark

Well, you're running into the "cloud", where everyone has their own
opinions. Aaron feels very strongly that "private symbols should not be
used". My personal opinion is that they are just "use at your own risk",
they may be changed, taken away without notice. For my plugins, I feel
like that is good enough.

John
=:->


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjZDYIACgkQJdeBCYSNAAN6DwCgoZv8Ct1agsk/t40faQxzdmBO
SuAAnAqVJa93eOWmc1zEFtBJMa+07geR
=tBLm
-----END PGP SIGNATURE-----



More information about the bazaar mailing list