[Import-SIG] PEP 382 update
"Martin v. Löwis"
martin at v.loewis.de
Wed Nov 2 19:54:37 CET 2011
Am 02.11.2011 18:59, schrieb PJ Eby:
> On Wed, Oct 19, 2011 at 4:36 PM, "Martin v. Löwis" <martin at v.loewis.de
> <mailto:martin at v.loewis.de>> wrote:
> In comparison with PEP 402, after my PyCon DE presentation, people
> discussed that they prefer if Python packages require some kind of
> explicit declaration - even though Java seems to have done well with
> packages being just directories with the package name. In particular,
> a Jython guy observed that they would likely have issues with an
> approach where a directory P would already be part of a package P,
> since they often have directories in Jython that have the name of
> Python packages, but are not meant as such.
> Unless those directories contain things which are importable, and
> someone actually imports them, PEP 402 does not treat them as a package.
> So, I suspect some confusion may have occurred, especially if this was
> a first exposure to the idea, rather than people actually reading the PEP.
To the people, it doesn't really matter whether the directory would be
considered as belonging to the package or not. It's more the feeling
of properness that gets violated by not having to declare a package
In the specific case of Jython, it may be that Jython is willing to
treat Java class files as Python modules ("extension" modules); if
PEP 402 is accepted and Jython implements it, they might indeed have
an issue with directories unexpectedly containing things which are
importable. I'm not sure whether that actually is the issue, since I
didn't talk to the Jython guy further.
More information about the Import-SIG