Author methane
Recipients Claudiu.Popa, Florian.Apolloner, Zbynek.Winkler, ashkop, barry, docs@python, eric.snow, ezio.melotti, mdjonyhossainhabib, methane, michael.foord, miss-islington, pconnell, rbcollins, rgammans, rgammans@gammascience.co.uk, terry.reedy
Date 2021-02-23.02:31:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614047519.06.0.666759253367.issue23882@roundup.psfhosted.org>
In-reply-to
Content
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!
History
Date User Action Args
2021-02-23 02:31:59methanesetrecipients: + methane, barry, terry.reedy, rbcollins, ezio.melotti, michael.foord, rgammans, docs@python, Claudiu.Popa, Zbynek.Winkler, eric.snow, pconnell, Florian.Apolloner, ashkop, miss-islington, rgammans@gammascience.co.uk, mdjonyhossainhabib
2021-02-23 02:31:59methanesetmessageid: <1614047519.06.0.666759253367.issue23882@roundup.psfhosted.org>
2021-02-23 02:31:58methanelinkissue23882 messages
2021-02-23 02:31:58methanecreate