[SciPy-Dev] Renaming scikits.learn

David Cournapeau cournape at gmail.com
Sat Jul 16 21:03:16 EDT 2011


On Sun, Jul 17, 2011 at 6:28 AM, Gael Varoquaux
<gael.varoquaux at normalesup.org> wrote:
> Hey list,
>
> I was having lunch with some of the scikits.image and scikits.statsmodel
> people and the statsmodel guys said that they were fed up with namespace
> packages and wanted to get rid of them. In other words, getting rid of
> the scikits namespace. I am _very_ enthousiastic about this, because I
> profoundly dislike namespace packages, and would thus like to suggest
> going down that road. Now, this discussion is probably going to be fairly
> long so I'll try to have a good signal to noise.
>
> Why: the problems with namespace packages
> ==========================================
>
>  a. The scikits/__init__.py file is owned by whichever installs last. As
>    a result a different scikit can screw us by mistake.
>
>  b. Debian, active-state and EPD systematically remove namespace package:
>    they install as standard directories and merge the __init__.py files.
>
>    In this case, installing as a user (non root) does not work: the scikits
>    directory has a __init__.py without the right incantation to get
>    namespace packages working, and thus for the user to install a new
>    version, he has to strip the namespace package too (in other words,
>    setup.py and easy_install do not work out of the box). This is of
>    course related to a.
>
>  c. People have a hard time figuring out where there stuff is installed.
>    I have had a lot of support calls related to this one.
>
>  d. The namespace machinery slows down a lot the imports because it
>    forces the Python imports to do a lot of 'stat' calls. This is the
>    main reason why EPD remove the namespace packages.
>
>  e. Shortening import paths.

Are those rationales still valid for PEP 382 ? I happen to like the
namespace package idea, but don't know if its flaws are inherent to
python importing mechanism or just an issue with current
implementation. c and e are not really convincing (people have a hard
time figuring out where stuff is installed in general, and I am
doubtful people who know how to locate imported packages cannot figure
it out for namespace packages).

> Why not
> ========
>
> Two obvious reasons:
>
>  a. Backward compatibility of the imports
>
>  b. Branding: we are going to take a hit on the name that we have managed
>    to establish.
>
>  c. Scikits, as a brand name, is taking a hit if we all do that.
>
> Point a is a technical one and can be addressed using a proxy package for
> a little while (say 2 releases).

How did EPD developers handle it ? If this is the road to be taken, it
would be worthwhile to think about a convertion script to help
transition. Maybe something like rope can be used to that effect (I
have recently used it in a very hackish way to do the exact opposite).

cheers,

David



More information about the SciPy-Dev mailing list