You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python-issue-17116.diff: simple patch that sets the __loader__s of errors and model modules of pyexpat to None
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/brettcannon'closed_at=<Date2013-05-04.17:58:17.289>created_at=<Date2013-02-03.16:47:37.026>labels= ['easy', 'type-bug']
title="xml.parsers.expat.(errors|model) don't set the __loader__ attribute"updated_at=<Date2013-05-04.17:58:17.288>user='https://github.com/brettcannon'
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.
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?
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 bpo-17115). If I don't get to that change I will commit the patch, else it will implicitly get fixed.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: