[issue26367] importlib.__import__ does not fail for invalid relative import

2017-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in branch '3.5': [3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677) https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae --

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-21 Thread Brett Cannon
Brett Cannon added the comment: Thanks for spotting those! And just to clarify on terminology, the typos were in the NEWS file, not "What's New" which is a different thing (https://hg.python.org/cpython/file/default/Doc/whatsnew). -- ___ Python

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-21 Thread Manuel Jacob
Manuel Jacob added the comment: I think the "What's New" entry has two typos. It should be `importlib.__import__()` instead of `importlib.__init__()` and SystemError instead of RuntimeError. -- ___ Python tracker

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-20 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Manuel! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset e523efd47418 by Brett Cannon in branch '3.5': Issue #26367: Have importlib.__init__() raise RuntimeError when https://hg.python.org/cpython/rev/e523efd47418 New changeset 8f72bf88f471 by Brett Cannon in branch 'default': Merge for issue #26367

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Manuel, welcome to the tracker and thank you for submitting patches. I agree that 5 lines is past the threshhold. Your profile has been CLA-updated, so we are good to go. -- nosy: +terry.reedy ___ Python tracker

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-18 Thread Brett Cannon
Brett Cannon added the comment: If a contribution is insignificant enough then technically a CLA isn't necessary, but I just make it a habit to ask for one regardless. And your profile will probably get updated fairly quickly, so I wouldn't worry about it holding anything up (I'm hoping to

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-18 Thread Manuel Jacob
Manuel Jacob added the comment: Done. I'm a bit surprised this wasn't necessary for my previous two patches, but they were even more trival than this one. ;) Do we have to wait until my tracker profile is updated? -- ___ Python tracker

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-18 Thread Brett Cannon
Brett Cannon added the comment: The corresponding code in C that actually does the check: https://hg.python.org/cpython/file/default/Python/import.c#l1498 Manuel, can you sign the CLA at https://www.python.org/psf/contrib/contrib-form/ ? Once you sign it I can officially review your patch,

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-18 Thread Manuel Jacob
Manuel Jacob added the comment: (For some reason, I forgot to submit the previous comment). The attached patches fix the issue (one for the 3.5 branch, one for the default branch) by bringing importlib.__import__ closer to the builtin __import__. The extra code in the default / 3.6 branch is

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-17 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-16 Thread Manuel Jacob
Changes by Manuel Jacob : Added file: http://bugs.python.org/file41938/relimport-3.6.patch ___ Python tracker ___

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-16 Thread Manuel Jacob
Changes by Manuel Jacob : -- keywords: +patch Added file: http://bugs.python.org/file41937/relimport-3.5.patch ___ Python tracker

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-15 Thread Manuel Jacob
New submission from Manuel Jacob: Python 3.6.0a0 (default:6c6f7dff597b, Feb 16 2016, 01:24:51) [GCC 5.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import importlib >>> importlib.__import__('array', globals(), locals(), level=1) >>>