Message165456
| Author |
brett.cannon |
| Recipients |
brett.cannon, chris.jerdonek, christopherthemagnificent, eric.araujo, georg.brandl, ncoghlan |
| Date |
2012年07月14日.17:06:18 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342285579.39.0.754909521902.issue15343@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Ugh, I don't exactly love the idea of adding a method to any of importlib's finders simply because PJE didn't try to make this non-standard API part of PEP 302 or something. But basically pkgutil is worthless without doing something about this damn iter_modules() method that the module keeps expecting.
Nick's proposal of adding importlib._bootstrap.FileFinder._iter_modules() is probably the best we can do with the timeline we have. But if we do this then I want to deprecate pkgutil in Python 3.4 and we can then get a proper API that is documented for module discovery and can have whatever helper code is needed in importlib (since namespace packages take care of the need for extend_path() and the only other use for pkgutil). That's the only deal I'm willing to strike here if we are going to keep pkgutil working in Python 3.3 as people expect. |
|