Issue 17116: xml.parsers.expat.(errors|model) don't set the loader attribute (original) (raw)

Issue17116

Created on 2013-02-03 16:47 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-issue-17116.diff gkcn,2013-02-23 17:15 simple patch that sets the __loader__s of errors and model modules of pyexpat to None review
Messages (4)
msg181280 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-02-03 16:47
A new test in test_importlib is discovering that pyexpat is creating both its errors and model modules by hand in pyexpat's initialization function. Should at least set __loader__ to None there.
msg182773 - (view) Author: Gökcen Eraslan (gkcn) * Date: 2013-02-23 17:15
Should this be done in Modules/pyexpat.c file or in Lib/xml/parsers/expat.py? If modifying expat.py is sufficient, then attached simple patch does the job. By the way I couldn't find the test you are referring to. Is it in Lib/test/test_importlib of somewhere else?
msg182887 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-02-24 19:27
The comment is out of date; I removed the test because it was constantly failing. As for the patch, it looks correct, but I plan to make a change to Python so that __loader__ is set by default (see the dependent issue #17115). If I don't get to that change I will commit the patch, else it will implicitly get fixed.
msg188383 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-05-04 17:58
New changeset e39a8f8ceb9f by Brett Cannon in branch 'default': #17115,17116: Have modules initialize the __package__ and __loader__ http://hg.python.org/cpython/rev/e39a8f8ceb9f
History
Date User Action Args
2022-04-11 14:57:41 admin set github: 61318
2013-05-04 17:58:17 brett.cannon set status: open -> closedresolution: fixedmessages: + stage: resolved
2013-04-28 02:52:52 brett.cannon unlink issue17115 dependencies
2013-02-24 19:27:49 brett.cannon set messages: +
2013-02-23 17:15:23 gkcn set files: + python-issue-17116.diffnosy: + gkcnmessages: + keywords: + patch
2013-02-08 14:01:12 brett.cannon set dependencies: + __loader__ = None should be fine
2013-02-03 16:50:18 brett.cannon set keywords: + easy
2013-02-03 16:47:46 brett.cannon link issue17115 dependencies
2013-02-03 16:47:37 brett.cannon create