Issue 35321: None _frozen_importlib.spec.origin attribute (original) (raw)
Created on 2018-11-26 23:19 by maggyero, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 11732 | merged | nnja,2019-02-02 01:54 |
Messages (8) | ||
---|---|---|
msg330479 - (view) | Author: Géry (maggyero) * | Date: 2018-11-26 23:19 |
How to reproduce: In Python: > import _frozen_importlib > print(_frozen_importlib.__spec__.origin) Observed result: The __spec__.origin attribute of the _frozen_importlib module is None. Expected result: The __spec__.origin attribute of the _frozen_importlib module should be 'frozen', like it is already the case for the _frozen_importlib_external module and documented for all frozen modules in PEP 451: https://www.python.org/dev/peps/pep-0451/#origin | ||
msg330558 - (view) | Author: Brett Cannon (brett.cannon) * ![]() |
Date: 2018-11-27 23:30 |
I can replicate. Do note, though, that PEPs are not documentation once they are implemented; at that point the official docs are what should be followed. | ||
msg334005 - (view) | Author: Barry A. Warsaw (barry) * ![]() |
Date: 2019-01-18 19:16 |
Frozen module's origin isn't really documented AFAICT. Here's the link to the library reference: https://docs.python.org/3/library/importlib.html?highlight=origin#importlib.machinery.ModuleSpec.origin The language reference doesn't really have anything to say here. I think it wouldn't be difficult to add 'frozen' to the origin, but it should also be documented in the library reference (and of course, tested). | ||
msg334006 - (view) | Author: Nina Zakharenko (nnja) * ![]() |
Date: 2019-01-18 19:22 |
I'll be happy to take a look at this. | ||
msg334007 - (view) | Author: Barry A. Warsaw (barry) * ![]() |
Date: 2019-01-18 19:22 |
I am mentoring Nina so I'll review this. | ||
msg334852 - (view) | Author: Barry A. Warsaw (barry) * ![]() |
Date: 2019-02-05 00:56 |
New changeset 69091cb497b2f0fe7e2789b30b43cf78caf9de9b by Barry Warsaw (Nina Zakharenko) in branch 'master': bpo-35321: Set the spec origin to frozen in frozen modules (#11732) https://github.com/python/cpython/commit/69091cb497b2f0fe7e2789b30b43cf78caf9de9b | ||
msg335561 - (view) | Author: Brett Cannon (brett.cannon) * ![]() |
Date: 2019-02-14 20:49 |
Can this be closed? | ||
msg335564 - (view) | Author: Géry (maggyero) * | Date: 2019-02-14 21:07 |
Yes, closed. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:08 | admin | set | github: 79502 |
2019-02-14 21:07:38 | maggyero | set | status: open -> closedmessages: + stage: patch review -> resolved |
2019-02-14 20:49:07 | brett.cannon | set | messages: + |
2019-02-05 02:14:38 | ned.deily | set | versions: - Python 3.6 |
2019-02-05 00:56:40 | barry | set | messages: + |
2019-02-02 01:54:30 | nnja | set | keywords: + patchstage: test needed -> patch reviewpull_requests: + <pull%5Frequest11629> |
2019-02-02 00:48:17 | barry | set | versions: + Python 3.6 |
2019-01-18 19:22:38 | barry | set | messages: + |
2019-01-18 19:22:22 | nnja | set | messages: + |
2019-01-18 19:21:48 | nnja | set | assignee: nnjanosy: + nnja |
2019-01-18 19:16:50 | barry | set | versions: + Python 3.8 |
2019-01-18 19:16:36 | barry | set | messages: + |
2018-11-27 23:30:59 | brett.cannon | set | nosy: - docs@pythonmessages: + components: + Interpreter Core, - Library (Lib)type: behaviorstage: test needed |
2018-11-26 23:19:31 | maggyero | create |