Am 06.11.2011 16:38, schrieb PJ Eby: > On Sun, Nov 6, 2011 at 7:29 AM, Nick Coghlan <ncogh...@gmail.com > <mailto:ncogh...@gmail.com>> wrote: > > I think this was based on the assumption that *existing* namespace > package approaches would break under the new scheme. Since that is not > the case, I suspect those previous objections were overstated (and all > packaging related code manages to cope well enough with modules where > the file name doesn't match the package name) > > > I was actually referring to all the code that does things like split > package names on '.' and then use os.path.join, or that makes > assumptions which are the moral equivalent of that. PEP 402's version > of namespace packages should break less of that sort of code than adding > a directory name extension.
I think tools emulating the import mechanism will break no matter what change is made: the whole point of changing it is that it does something new that didn't work before. I think adjusting the tools will be straight-forward: they already need to recognize that an imported name could come either from a file (with various extensions), or a directory with special properties. So extending this should be "easy". Also, the number of tools that emulate the Python import algorithm is rather small. Tools that merely inspect __path__ after importing a package will continue to work just fine even under PEP 382. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com