[SciPy-Dev] Renaming scikits.learn
Gael Varoquaux
gael.varoquaux at normalesup.org
Sat Jul 16 17:28:49 EDT 2011
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.
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).
Proposals for the future
=========================
As you have guessed, I am very much in favor of getting rid of namespace
packages. Here are possible ways of doing this:
a. Rename completly the package (learnpy?)
b. Rename the package with a prefix common to scikits (sklearn?)
c. Keep the branding name 'scikit-learn', but change the import path to
learn
I am leaning towards c. Feedback?
Gael
More information about the SciPy-Dev
mailing list