[issue21235] importlib's spec module create algorithm is not exposed

2016-01-15 Thread Brett Cannon
Brett Cannon added the comment: Due to lack of response, I'm assuming all issues are now addressed. -- status: pending -> closed ___ Python tracker ___

[issue21235] importlib's spec module create algorithm is not exposed

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: Is there anything left in this issue that hasn't been addressed in Python 3.5? -- status: open -> pending ___ Python tracker

[issue21235] importlib's spec module create algorithm is not exposed

2014-10-15 Thread Nikolay Bryskin
Changes by Nikolay Bryskin devel.n...@gmail.com: -- nosy: +nikicat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-27 Thread Brett Cannon
Brett Cannon added the comment: I'm not torn so let that settle your torment. =) Considering we are talking about the standard library for a language that has a mantra of explicit is better than implicit I think worrying about an added line to very little code since so few people muck with

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-26 Thread Eric Snow
Eric Snow added the comment: How about this replacement for direct use of Loader.load_module(): # in importlib.util def load(spec_or_name, /, **kwargs): # or load_from_spec if isinstance(spec_or_name, str): name = spec_or_name if not kwargs: raise

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-26 Thread Brett Cannon
Brett Cannon added the comment: I think that's the wrong abstraction(it would be fine in a third-party library, though, that's trying to smooth over 3.3-3.4 transitions). Since importlib.util.find_spec() always returns a spec, then you want something more like:: def load(spec): loader

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-26 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +Consider dropping importlib.abc.Loader.create_module() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-26 Thread Brett Cannon
Brett Cannon added the comment: Opened issue #21581 to discuss Armin's point about importlib.abc.Loader.create_module() being there but not being much use since the method is entirely optional. -- ___ Python tracker rep...@bugs.python.org

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-26 Thread Eric Snow
Eric Snow added the comment: I'm just considering current usage: mod = loader.load_module(name) becomes: spec = spec_from_loader(name, loader) mod = load(spec) vs. mod = load(name, loader=loader) I guess I'm torn. I like how the former forces you to consider specs when dealing

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-24 Thread Brett Cannon
Brett Cannon added the comment: Issue #20383 is tracking adding an API to simply getting the proper module and having it be initialized. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235

[issue21235] importlib's spec module create algorithm is not exposed

2014-05-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/issue21235 ___

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-16 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-16 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Armin Ronacher
New submission from Armin Ronacher: 3.4 deprecates load_module on the loaders and now proposes to use create_module (optionally) and exec_module. Unfortunately for external callers these interfaces are not useful because you need to reimplement _SpecMethods.create and a whole bunch of other

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Armin Ronacher
Armin Ronacher added the comment: On further investigation that is not even enough yet due to the new locking mechanism. I'm not even sure if exposing _SpecMethods would be enough. -- ___ Python tracker rep...@bugs.python.org

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Eric Snow
Eric Snow added the comment: I agree that this is something we need to address in 3.5. Adding this to 3.4 won't be an option since it would require a new feature. However, Loader.load_module() is only deprecated (and won't be removed in 3.X), so the current approach will still work until we

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Brett Cannon
Brett Cannon added the comment: Are you after just the module creation/initialization code so you can call exec_module() yourself, Armin, or do you want even more of the algorithm exposed (e.g. the lock stuff)? There are not tons of importlib users to the level of wanting to re-implement

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Armin Ronacher
Armin Ronacher added the comment: I'm not sure myself what I need right now. I personally have avoided importlib/imp entirely for my code and I roll with manual module creation because it is most stable between 2.6 - 3.4 but it's getting more complicated to work because of all the new

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Eric Snow
Eric Snow added the comment: I've opened up #21240 to address the the docs concern. Thanks for bringing it up. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Armin Ronacher
Armin Ronacher added the comment: Also mostly unrelated importlib now does something I have never seen an ABC do: the ABC has create_module but concrete implementations mostly have that function entirely absent. That should probably be reconsidered as it's super confusing. --

[issue21235] importlib's spec module create algorithm is not exposed

2014-04-15 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___