[Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/ (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Wed Nov 3 00:34:15 CET 2010


Le mardi 02 novembre 2010 à 16:32 -0700, Raymond Hettinger a écrit :

On Nov 2, 2010, at 4:00 PM, Brett Cannon wrote: >> Are we permanently locked into the exact ten filenames >> that are currently used: utils, suite, loader, case, result, main, signals, >> etc? >> Is the file structure now frozen? > > Somewhat, yes.

That's a bummer. Sounds like a decision to split a module into a package is a big commitment. Each of the individual file names becomes a permanent part of the API. Even future additional splits are precluded because it might break someones dotted import (i.e. not a single function can be moved between those files -- once in unittest.utils, alway in unittest.utils).

I don't agree with this. Until it's documented, it's an implementation detail and should be able to change without notice. If someone wants to depend on some undocumented detail of the directory layout it's their problem (like people depending on bytecode and other stuff).



More information about the Python-Dev mailing list