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.
Created on 2012年04月22日 19:37 by brett.cannon, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg158983 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2012年04月22日 19:37 | |
As discussed and agreed to on python-dev, it makes sense to require loaders to set __loader__ and __package__ so that they can be relied upon by globally executed code in a module. The following needs to happen to close this bug: * Update PEP 302 to say __loader__ is required, not optional * Update PEP 366 to say __package__ is required * Update PEP 302 to point to PEP 366 and mention the requirement * Update importlib.util.module_for_loader to set both __loader__ and __package__ * Update importlib.util.set_loader and importlib.util.set_package to point out that module_for_loader supercedes those decorators * Update importlib._bootstrap to set __loader__ when it is absent |
|||
| msg158984 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2012年04月22日 19:51 | |
Yeah, that patch for reload() in issue13959 relies on this. |
|||
| msg159495 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年04月27日 21:33 | |
New changeset 496c68f90a03 by Brett Cannon in branch 'default': Issue #14646: __import__() now sets __loader__ if need be. http://hg.python.org/cpython/rev/496c68f90a03 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:29 | admin | set | nosy:
+ georg.brandl github: 58851 |
| 2012年04月27日 21:42:35 | brett.cannon | set | status: open -> closed resolution: fixed stage: test needed -> resolved |
| 2012年04月27日 21:33:07 | python-dev | set | nosy:
+ python-dev messages: + msg159495 |
| 2012年04月22日 20:23:57 | Arfrever | set | nosy:
+ Arfrever |
| 2012年04月22日 19:51:48 | eric.snow | set | nosy:
+ eric.snow messages: + msg158984 |
| 2012年04月22日 19:37:53 | brett.cannon | create | |