This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Attempting to import inaccessible package imports an empty package
Type: behavior Stage:
Components: Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: xfix
Priority: normal Keywords:

Created on 2020-04-03 14:41 by xfix, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
demonstration xfix, 2020-04-03 14:41 Proof of concept
Messages (2)
msg365699 - (view) Author: Konrad Borowski (xfix) Date: 2020-04-03 14:41
The attached shell program returns `AttributeError: module 'mod' has no attribute 'x'`. I would rather expect `ImportError` instead of loading an empty package due to permission error causing Python module to be inaccessible.
msg365700 - (view) Author: Konrad Borowski (xfix) Date: 2020-04-03 14:46
The attached example works on Python 2, but it breaks with Python 3. This may be a regression.
History
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84352
2020-04-03 14:46:07xfixsetmessages: + msg365700
2020-04-03 14:41:40xfixcreate