[Python-Dev] Keeping init.py empty for Python packages used for module grouping. (original) (raw)

Tres Seaver tseaver at palladion.com
Mon Jan 24 22:59:12 CET 2011


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

On 01/24/2011 03:14 PM, Fred Drake wrote:

On Mon, Jan 24, 2011 at 2:04 PM, Raymond Hettinger <raymond.hettinger at gmail.com> wrote:

ISTM, that if we're going to use python packages as "namespace containers" for categorizing modules, then the top level init namespace should be left empty. This is only an issue if the separate components are distributed separately; for the standard library, we're not using it as a namespace package in the same sense that is done with (for example) the "zope" package.

It might matter if we want to enable third-party package installation into a namespace also used by the stdlib: ISTR that the 'xml' package had such installs at one point.

If that pattern is a goal, having all versions of the namespace's init.py empty of anything but the path-munging majyk / boilerplate is required to make such installs work regardless of the order of PYTHONPATH.

Tres. - --

Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk099jAACgkQ+gerLs4ltQ7e4gCfbYJE8d8bNrX19zrzC4xvfA9Y KkQAnA7niExvMqXtUBD/XwzZZ9EzHcBm =/Q/Y -----END PGP SIGNATURE-----



More information about the Python-Dev mailing list