Message346593
>>> 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__ does not reproduce the behaviour of importlib._bootstrap.__import__; maybe ceval.c:import_from is neglecting to check that there are parent packages when attempting a relative import?
More details here: https://stackoverflow.com/a/56768129/5104777 |
|
Date |
User |
Action |
Args |
2019-06-26 09:11:26 | Ben Lewis2 | set | recipients:
+ Ben Lewis2 |
2019-06-26 09:11:26 | Ben Lewis2 | set | messageid: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> |
2019-06-26 09:11:26 | Ben Lewis2 | link | issue37409 messages |
2019-06-26 09:11:26 | Ben Lewis2 | create | |
|