[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-26 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 2929bfb973da249ed4f056c88a69bcc48e5a4843 by Miss Islington (bot) 
in branch '3.7':
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related 
methods (GH-19158) (GH-19165)
https://github.com/python/cpython/commit/2929bfb973da249ed4f056c88a69bcc48e5a4843


--

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-26 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 8dad09a2242194a4101374b91ce87bb47a487cf7 by Miss Islington (bot) 
in branch '3.8':
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related 
methods (GH-19158) (#19164)
https://github.com/python/cpython/commit/8dad09a2242194a4101374b91ce87bb47a487cf7


--

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-25 Thread Brett Cannon


Change by Brett Cannon :


--
keywords:  -patch
resolution:  -> fixed
stage: patch review -> needs patch
status: open -> closed

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18525
pull_request: https://github.com/python/cpython/pull/19165

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-25 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 302e5a8f79514fd84bafbc44b7c97ec636302322 by Brett Cannon in 
branch 'master':
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related 
methods (GH-19158)
https://github.com/python/cpython/commit/302e5a8f79514fd84bafbc44b7c97ec636302322


--

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-25 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +18524
pull_request: https://github.com/python/cpython/pull/19164

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-25 Thread Brett Cannon


Change by Brett Cannon :


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

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-06 Thread Brett Cannon


Change by Brett Cannon :


--
assignee: docs@python -> brett.cannon

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2016-01-26 Thread Brett Cannon

Brett Cannon added the comment:

At this point both FrozenImporter and BuiltinImporter support exec_module(), so 
the only thing left to do is to document when FrozenImporter and 
WindowsRegistryFinder gained their exec_module() implementations 
(BuiltinImporter already has a note about it).

--
assignee:  -> docs@python
keywords: +easy
nosy: +docs@python
priority: critical -> low
stage: test needed -> needs patch
versions: +Python 3.6

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2014-12-16 Thread Nick Coghlan

Nick Coghlan added the comment:

Turns out I had written up a recap of the PEP 451 C extension support status 
back in July, so I just resent that to import-sig.

--

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2014-12-15 Thread Eric Snow

Eric Snow added the comment:

Same here.

--

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2014-12-13 Thread Nick Coghlan

Nick Coghlan added the comment:

Yes, if we don't get to it beforehand. I'd still like to take the draft 
Create/Exec C level hook design I came up with and turn it into a PEP, but I 
don't know when I'll get time.

Maybe I should just put that together as a (very) rough draft and lob it at 
import-sig? Then we'll have a concrete base for discussion at PyCon, and 
someone may be able to put together a draft implementation while you, me  Eric 
are all in the same place at the same time.

--

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2014-12-13 Thread Brett Cannon

Brett Cannon added the comment:

sgtm

--

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2014-12-12 Thread Brett Cannon

Brett Cannon added the comment:

I would still like to get this solved for Python 3.5. Should we hash out a 
solution at PyCon?

--

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2013-12-06 Thread Nick Coghlan

Nick Coghlan added the comment:

There are assorted shenanigans in the dynamic module loading code that make
me think we should leave the associated loaders alone for now. Running
PyInit_* more than once isn't permitted by default, so reloading is a
no-op, and loading again *copies* the existing module. But modules can
opt in to allowing reinitialization by declaring a module state size of
zero :)

It's a solvable problem, but not an urgent one, and hence better addressed
when we're redesigning the associated C APIs for a PEP 451 based import
system.

--

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2013-12-05 Thread Eric Snow

Eric Snow added the comment:

Is the problem here that builtins (and extension modules) don't necessarily 
obey the rules to the letter?  load_module() is supposed to use whatever is in 
sys.modules. [1]  (BuiltinImporter.load_module() is essentially a synonym for 
_imp.init_builtin(), right?)

So in each PyInit_*() the code should be using the module out of sys.modules... 
 That sounds like a bug and I expect that the builtin modules and most 
extension modules don't comply.

That said, I realize the spirit of the load_module() rule is to support 
reloading, which is mostly not applicable to builtins and extension modules.  
The code you reverted would rely on enforcing the rule outside the implicit 
applicability.

I'll be glad when we've resolved the extension module API changes that support 
exec_module()!

[1] 
http://docs.python.org/dev/library/importlib.html#importlib.abc.Loader.load_module

--

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2013-11-29 Thread Brett Cannon

Brett Cannon added the comment:

This is going to have to wait until Python 3.5, so I'm going to back out the 
exec_module() aspects of BuiltinImporter and ExtensionFileLoader. As Nick has 
pointed out previously, we are going to need to change the init function 
signature of extension modules to accept the module to initialize (or 
something). This also extends to built-in modules as on Windows all extension 
modules are compiled in, so there is no real distinction between the two 
scenarios, so this can't be only partially solved for built-ins but not 
extension modules.

This is another reason why we will need to go with a soft deprecation of 
load_module() in Python 3.4 and hopefully get all of this straightened out in 
Python 3.5 so we can introduce a hard deprecation.

And just in case we end up having to hack our way around the call signature, 
PyModule_Create() could be tweaked to pull modules from a cache that can be 
seeded with the module that is to be used for the initialization. That way call 
signatures don't have to change but what module gets used can be controlled.

--
priority: normal - critical
versions: +Python 3.5 -Python 3.4

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2013-11-23 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2013-11-22 Thread Brett Cannon

New submission from Brett Cannon:

Since _imp.init_builtin and _imp.load_dynamic don't take in a module to load, 
need to create new functions which do. Afterwards can deprecate init_builtin, 
load_dynamic, and init_frozen (the latter having been worked around thanks to 
get_frozen_object).

--
components: Interpreter Core
messages: 203798
nosy: brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
stage: test needed
status: open
title: Implement _imp.exec_builtin and exec_dynamic
versions: Python 3.4

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