Author Thorney
Recipients Thorney, alexis, ceball, eric.araujo, fishdude, ipatrol, loewis, tarek
Date 2012-08-05.10:58:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344164327.39.0.187481612786.issue4508@psf.upfronthosting.co.za>
In-reply-to
Content
I've put together a patch adding the test requested. There is no problem on my Ubuntu machine with python 3.3.
There is a comment in the file saying Don't load the xx module more than once, I am unsure whether my patch (using a renamed c file) violates this?


One extremely minor nitpick that I'll mention is inconsistency with spaces in the module name. One can create a python file "my file.py" and can import it with __import__("my file"). I couldn't do the same for a C extension.

Building a C extension with distutils:

  module_name = 'ex ample'
  example_ext = Extension(module_name, [target_c])
  dist = Distribution({'name': module_name, 'ext_modules': [example_ext]})

Doesn't work due to the import mechanism looks for a PyInit function with the new module name (including a space):

  ImportError: dynamic module does not define init function (PyInit_ex ample)

I don't think this is worth making a ticket over.
History
Date User Action Args
2012-08-05 10:58:47Thorneysetrecipients: + Thorney, loewis, ceball, tarek, eric.araujo, ipatrol, alexis, fishdude
2012-08-05 10:58:47Thorneysetmessageid: <1344164327.39.0.187481612786.issue4508@psf.upfronthosting.co.za>
2012-08-05 10:58:46Thorneylinkissue4508 messages
2012-08-05 10:58:46Thorneycreate