[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2013-03-31 Thread Éric Araujo
Éric Araujo added the comment: Ah, okay. I can’t wait for the time when unittest.main() is used everywhere and we delete run_unittest :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2013-03-30 Thread Éric Araujo
Éric Araujo added the comment: The first commit does something fishy with tests: http://hg.python.org/cpython/rev/e30bcce5c634#l3.1 -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2013-03-30 Thread Brett Cannon
Brett Cannon added the comment: It cleans up the run_unittest() call. You can check the file and see that the missing classes are actually not in the module anymore. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-12-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7caab48f171e by Eric Snow in branch 'default': Issue #15627: This is simply an update to the name of a new method recently added http://hg.python.org/cpython/rev/7caab48f171e -- ___ Python tracker

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-28 Thread Brett Cannon
Brett Cannon added the comment: It might not be compulsory, but how else are you going to get a code object? Then again, get_code() kind of codifies the use of the word code for methods that return a code object. So if you want to do the work to change the name then go ahead. --

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-27 Thread Eric Snow
Eric Snow added the comment: Sorry, just now digging out of a massive backlog here. The originally proposed name of source_to_code() might be more appropriate than compile_source(). The relationship to compilation is not compulsory and the name/docstring/docs might imply that. If you're

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset e30bcce5c634 by Brett Cannon in branch 'default': Issue #15627: Add the compile_source() method to http://hg.python.org/cpython/rev/e30bcce5c634 -- nosy: +python-dev ___ Python tracker

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-18 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: -Document the 'optimize' argument to compile() resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- stage: test needed - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: We might want an keyword-only 'optimize' argument that maps to the compile() function's 'optimize' argument. -- dependencies: +Document the 'optimize' argument to compile() ___ Python tracker rep...@bugs.python.org

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: Might name this compile_source() instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___ ___

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-15 Thread Eric Snow
Eric Snow added the comment: Though I haven't been able to get to this, I do have a demo of sorts that I've been using elsewhere: https://bitbucket.org/ericsnowcurrently/pylt/src/default/pylt/_importing.py?at=default#cl-225 -- ___ Python tracker

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-09-14 Thread Julian Berman
Changes by Julian Berman julian+python@grayvines.com: -- nosy: +Julian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___ ___

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-17 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___ ___

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___ ___

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-12 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___ ___

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-12 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/issue15627 ___

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-12 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___ ___ Python-bugs-list

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-11 Thread Brett Cannon
New submission from Brett Cannon: A classmethod called importlib.abc.SourceLoader.source_to_code(source_bytes, path) would return a code object. By default it would be equivalent to ``compile(source_bytes, source_path, 'exec', dont_inherit=True)``, but others could override this to e.g.