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.

Author brett.cannon
Recipients Aaron.Meurer, Arfrever, Ronan.Lamy, brett.cannon
Date 2012-06-01.14:38:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338561508.99.0.169624479311.issue14938@psf.upfronthosting.co.za>
In-reply-to
Content
I think you misunderstood what I was suggesting as a solution: there is no conversion of module name to file name. It would simply be::

fullname.rpartition('.')[2] == os.path.splitext(os.path.split(self.path)[1])[0]

for path comparison. But honestly since __init__ is the only special case here, is_package() could just do its current check and ``fullname.rpartition('.')[2] != '__init__'``.

And a problem with your patch is that it is only for FileLoader, which precludes SourceLoader from getting the beneficial fix for the issue and thus leaves out all other loaders which might use an alternative storage mechanism than files (e.g. zip files).
History
Date User Action Args
2012-06-01 14:38:29brett.cannonsetrecipients: + brett.cannon, Arfrever, Aaron.Meurer, Ronan.Lamy
2012-06-01 14:38:28brett.cannonsetmessageid: <1338561508.99.0.169624479311.issue14938@psf.upfronthosting.co.za>
2012-06-01 14:38:28brett.cannonlinkissue14938 messages
2012-06-01 14:38:28brett.cannoncreate