Inada Naoki <songofaca...@gmail.com> added the comment:

I noticed that namespace package support has been broken since this commit.
https://github.com/python/cpython/commit/bbbcf8693b876daae4469765aa62f8924f39a7d2

Now namespace pacakge has __file__ attribute which is None. But...

                try:
                    start_dir = os.path.abspath(
                       os.path.dirname((the_module.__file__)))
                except AttributeError:
                    # look for namespace packages

`the_module.__file__` doesn't raise AttributeError for now. But 
os.path.dirname(None) raise TypeError.

The commit is backported to 3.7 branch. So namespace package support has been 
broken since Python 3.7.

Shouldn't we drop namespace package support?
It is misleading. And we could not maintain it. We didn't notice that it is 
broken for 3 years!

----------
nosy: +barry
resolution: fixed -> 
stage: resolved -> needs patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue23882>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to