
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-04-14 21:04 bytrevor3, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| fix-PyImport_ExecCodeModuleObject.diff | eric.snow,2014-04-19 07:49 | |||
| fix-PyImport_ExecCodeModuleObject.diff | eric.snow,2014-04-20 00:13 | |||
| Messages (7) | |||
|---|---|---|---|
| msg216217 -(view) | Author: Trevor Caira (trevor3) | Date: 2014-04-14 21:04 | |
InPython/import.c, PyImport_ExecCodeModuleObject creates a new module object but doesn't set all of the attributes required for modules, such as __spec__ or __loader__.This breaks mod_wsgi from 3.3 and up, which depends on PyImport_ExecCodeModuleEx, which delegates to PyImport_ExecCodeModuleObject for its module creation logic. Seehttps://code.google.com/p/modwsgi/source/browse/mod_wsgi/mod_wsgi.c#6289 | |||
| msg216850 -(view) | Author: Eric Snow (eric.snow)*![]() | Date: 2014-04-19 07:49 | |
Here's a (currently segfaulting) patch that demonstrates how I'd like to solve this. Feedback on the approach is welcome. :) When I get a chance I'll debug the segfault. | |||
| msg216864 -(view) | Author: Benjamin Peterson (benjamin.peterson)*![]() | Date: 2014-04-19 16:53 | |
The last argument to _PyObject_CallMethodIdObjArgs needs to be NULL... | |||
| msg216886 -(view) | Author: Eric Snow (eric.snow)*![]() | Date: 2014-04-20 00:13 | |
Thanks, Benjamin. Here's an updated patch that passes all tests. It should be good to go. And yet again our zipimport implementation was a pain point. :( | |||
| msg218161 -(view) | Author: Brett Cannon (brett.cannon)*![]() | Date: 2014-05-09 12:41 | |
LGTM although you forgot to use a loader instance instead of the class. | |||
| msg218391 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-05-13 00:27 | |
New changeset7d20e30bd540 by Eric Snow in branch '3.4':Issue#21226: Set all attrs in PyImport_ExecCodeModuleObject.http://hg.python.org/cpython/rev/7d20e30bd540New changesetbc324a49d0fc by Eric Snow in branch 'default':Merge from 3.4 (for#21226).http://hg.python.org/cpython/rev/bc324a49d0fc | |||
| msg219356 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-05-29 18:44 | |
New changesetbaa7b5555656 by Eric Snow in branch '3.4':Issue#21226: fix a ref leak.http://hg.python.org/cpython/rev/baa7b5555656New changeset57130574d1e8 by Eric Snow in branch 'default':Issue#21226: Merge from 3.4.http://hg.python.org/cpython/rev/57130574d1e8 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:01 | admin | set | github: 65425 |
| 2014-05-29 18:44:15 | python-dev | set | messages: +msg219356 |
| 2014-05-13 00:31:35 | eric.snow | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2014-05-13 00:27:34 | python-dev | set | nosy: +python-dev messages: +msg218391 |
| 2014-05-11 11:57:02 | Arfrever | set | nosy: +Arfrever |
| 2014-05-09 12:41:29 | brett.cannon | set | messages: +msg218161 |
| 2014-04-20 00:13:19 | eric.snow | set | files: +fix-PyImport_ExecCodeModuleObject.diff messages: +msg216886 |
| 2014-04-19 16:53:09 | benjamin.peterson | set | nosy: +benjamin.peterson messages: +msg216864 |
| 2014-04-19 07:49:57 | eric.snow | set | files: +fix-PyImport_ExecCodeModuleObject.diff messages: +msg216850 assignee:eric.snow keywords: +patch stage: patch review |
| 2014-04-14 21:04:27 | trevor3 | create | |