Message162075
| 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:29 | brett.cannon | set | recipients:
+ brett.cannon, Arfrever, Aaron.Meurer, Ronan.Lamy |
| 2012年06月01日 14:38:28 | brett.cannon | set | messageid: <1338561508.99.0.169624479311.issue14938@psf.upfronthosting.co.za> |
| 2012年06月01日 14:38:28 | brett.cannon | link | issue14938 messages |
| 2012年06月01日 14:38:28 | brett.cannon | create |
|