[MERGE] import both c-extension and python module with the same name for testing

Alexander Belchenko bialix at ukr.net
Thu Aug 9 10:26:47 BST 2007


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

Lukáš Lalinský пишет:
> On Št, 2007-08-09 at 10:55 +1000, Martin Pool wrote:
>> To try and summarize the thread: there are a few choices
>>
>>  1- merge something like Alexander's patch; then any module that wants
>> a doubly-implemented module can just simply import it and will get
>> either the C or python version
>>  2- put the try/import/except/import into things that need to import it
>>  3- have a pure-python wrapper module that imports whichever
>> implementation is available
>>
> [...]
>> Anything else?
> 
> Bzrlib already has two Pyrex extensions, but it is likely that there
> will be more of them in the future. What about compiling them all into a
> single extension (e.g. bzrlib._ext). The modules contain quite low-level
> code which needs to be imported in almost all cases, anyway. I'm not
> sure how big overhead have dynamic linkers on all bzr-supported
> platforms, but I expect it to be bigger than for example the overhead of
> try/except in case of importing the Python modules.

It will lead to mess in namespace of this big-one extension module.
I don't think it's a right thing.

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGut3WzYr338mxwCURAv6zAJsEu5vqiGtunlI1bayiXB3UU9FjmgCfaCyV
JqkWM0uYiZm1OIzxl5rmMK8=
=m9wA
-----END PGP SIGNATURE-----



More information about the bazaar mailing list