[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +27087
pull_request: https://github.com/python/cpython/pull/28740

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow


Change by Eric Snow :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow


Eric Snow  added the comment:


New changeset c3d9ac8b340fcbf54cee865737e67f11fcd70ed3 by Eric Snow in branch 
'main':
bpo-45324: Capture data in FrozenImporter.find_spec() to use in exec_module(). 
(gh-28633)
https://github.com/python/cpython/commit/c3d9ac8b340fcbf54cee865737e67f11fcd70ed3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow


Change by Eric Snow :


--
keywords: +patch
pull_requests: +27002
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28633

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow


Eric Snow  added the comment:

Taking care of this will also be necessary (probably) as we work on adding 
__file__ to frozen stdlib modules.  (See bpo-21736.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow


New submission from Eric Snow :

Currently FrozenImporter (in Lib/importlib/_bootstrap.py) does minimal work in 
its find_spec() method.  It only checks whether or not the module is frozen.  
However, in doing so it has gathered all the info we need to load the module.  
We end up repeating that work in exec_module().

Rather than duplicating that effort, we should preserve the info in 
spec.loader_state.  This has the added benefit of aligning more closely with 
the division between finder and loader.  Once we get to the loader, there 
shouldn't be a need to check if the module is frozen nor otherwise interact 
with the internal frozen module state (i.e. PyImport_FrozenModules).

--
assignee: eric.snow
components: Interpreter Core
messages: 402895
nosy: eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: The frozen importer should capture info in find_spec().
type: behavior
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com