[issue37409] relative import without parent succeeds with builtins.__import__

2019-07-26 Thread Ben Lewis
Change by Ben Lewis : -- pull_requests: +14724 pull_request: https://github.com/python/cpython/pull/14956 ___ Python tracker <https://bugs.python.org/issue37

[issue37409] relative import without parent succeeds with builtins.__import__

2019-06-29 Thread Ben Lewis
Change by Ben Lewis : -- keywords: +patch pull_requests: +14282 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14465 ___ Python tracker <https://bugs.python.org/issu

[issue37409] relative import without parent succeeds with builtins.__import__

2019-06-28 Thread Ben Lewis
Ben Lewis added the comment: I'll look into this further and open a PR initially for the regression tests. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37409] relative import without parent

2019-06-26 Thread Ben Lewis
Ben Lewis added the comment: >>> foo = 'oops' >>> from . import foo as fubar # should raise ImportError >>> fubar 'oops' After further investigation, the problem is that builtins.__import__ (the c port version) does not replicate the behaviour of importlib.__impo

[issue37409] relative import_from without parent

2019-06-26 Thread Ben Lewis
New submission from Ben Lewis : >>> from curses import ascii >>> from . import ascii The second line should raise an ImportError but instead succeeds (tested cpython 3.6.7, 3.7.0 and 3.7.3, and from interactive interpreter and scripts). Specifically, builtins.__import__

[issue30748] Upgrade tuples in socket to named tuple like

2017-06-24 Thread Ben Lewis
New submission from Ben Lewis: Within the socket module, there are various tuples that are used for different representations of a socket address. There are also other tuples returned by other functions in the socket module. As suggested on Python-ideas(https://mail.python.org/pipermail