On Sunday 08 June 2008 16:57:56 Gael Varoquaux wrote: > Hey guys, > > Just got back from 3 weeks holydays (that feels really good, I should try > this more often). I a fighting with a mountain of emails, but I just > wanted to give a little heads up. Tout is working on the codebase that I > originally wrote and got me addicted to the ETS, at the university of > Toronto. > > He tried updating and did run in some minor incompatibility (some ".api" > added, not the end of the word, I believe). > > However, more working (Darren Dale is Cced about that) is that matplotib > includes its own version of Traits and tends to be quite light on the > policy to decide when to overide the system one. As a result, and recent > version of MPL make the code base die in the ETS parts. I have already > mentioned this problem, and I believe it is a really evil one. I don't > have time to do some lobbying about this right now, could someone make > sure this is solved (Darren?).
Matplotlib's setup scripts are designed to avoid this problem. There are three conditions under which we install traits: 1) Traits is not installed 2) A previous version of traits is installed, but it is a version installed by matplotlib. I added an "-mpl" to the end of traits __version__ string so we can keep track. 3) The user explicitly askes for it in setup.cfg So if matplotlib is overwriting traits when it should not, I want to fix it. But I need more information about what is causing it, because I don't see how it could happen. > IMHO one temporary solution, less ugly then the current one, is the one > we used in nipy: define a matplotlib.externals.traits that can point either > to a system-wide traits, or to the embedded traits. Using some code in > matplotlib.externals similar to: > > """ > def import_traits(): > """ Import traits, either from a system-wide location, or from our > copy. > """ > try: > from enthought import traits > except ImportError: > from matplotlib.externals.enthought import traits > return traits > > traits = import_traits() > """ > > You can put as much logics as you want in "import_traits" to check eg for > version numbers. If in MPL you only import traits from matplotlib.traits, > you can thus use traits and not have side effects on other libraries. I tried this when I first started working with TConfig, and concluded that it was not possible because there are too many places where traits expects enthought to be a top level package. There were all kind of errors, exceptions being raised that were not named as expected, extension code that would need to be modified, so we settled on the current solution. > IMHO, the current situation is untenable. Please, provide details so I can understand the problem. Darren ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel