This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon, benjamin.peterson, larry, njs, pitrou, serhiy.storchaka
Date 2015-08-30.17:50:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440957033.96.0.343398311791.issue24912@psf.upfronthosting.co.za>
In-reply-to
Content
Nathaniel, I'm hostile to this patch remaining in the code base.
I'm not hostile to you, sorry that I came across as that way.

The proper way to deal with issues like this is to revert the change and then create a new patch, otherwise it becomes impossible to revert the change if other problems emerge.

I agree that the bug in __class__ assignment should be fixed, but such a fix should be separate from adding any new features.

Also, I'm surprised that you assert that you can't do what your metamodule does, without ctypes.
Your metamodule package is almost there.

Your statement
"Depending on the relative order of the assignment to sys.modules and imports of submodules, you can end up with different pieces of code in the same program thinking that mymodule refers to one or the other of these objects."
is true.

So, just make sure that you insert the new object into sys.modules *before* doing any imports or calls to code that could import your module and it will all work fine.
History
Date User Action Args
2015-08-30 17:50:34Mark.Shannonsetrecipients: + Mark.Shannon, pitrou, larry, benjamin.peterson, njs, serhiy.storchaka
2015-08-30 17:50:33Mark.Shannonsetmessageid: <1440957033.96.0.343398311791.issue24912@psf.upfronthosting.co.za>
2015-08-30 17:50:33Mark.Shannonlinkissue24912 messages
2015-08-30 17:50:33Mark.Shannoncreate