New submission from Ronald Oussoren:
To reproduce:
* create a package with the following structure:
pkg/
__init__.py
_sub.py
* __init__.py contains:
from pkg._sub import *
* the contents of _sub.py is not important
* in a python shell do:
>>> import pkg._sub as s
>>> import imp
>>> imp.reload(s)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imp.py", line
297, in reload
return importlib.reload(module)
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/importlib/__init__.py",
line 123, in reload
raise ImportError(_bootstrap._ERR_MSG.format(name), name=name)
ImportError: No module named 'pkg._sub'
>>>
In earlier python versions this reloaded the pkg._sub module. Importing _sub
from __init__ doesn't seem to be important.
----------
components: Library (Lib)
keywords: 3.3regression
messages: 204920
nosy: brett.cannon, eric.snow, ncoghlan, ronaldoussoren
priority: normal
severity: normal
stage: test needed
status: open
title: imp.reload problem with submodule
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19851>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com