On 10/23/10 10:35 PM, jason-s...@creativetrax.com wrote: > On 10/22/10 7:16 PM, Michael Droettboom wrote: >> On 10/22/2010 05:45 PM, Russell E. Owen wrote: >>> I'm curious when the next release of matplotlib is due. >>> >>> My application is suffering badly from the issue that an incorrect font >>> cache will cause matplotlib to fail (the application mysteriously exits >>> partway through startup until the user deletes the font cache). >>> >>> That problem is allegedly fixed on the trunk and I'm trying to decide >>> how best to deal with it. Depending on the timing of 1.0.1 I can decide >>> whether it's worth putting in my own workaround, bundling a prerelease >>> version of matplotlib or just waiting for the official release. >> I'm not sure what the timeframe is on 1.0.1. >> >> What problem with the cache are you referring to? I'm aware of a >> problem where if some fonts are moved or removed after the cache is >> created matplotlib will crash (and this problem is fixed in the trunk), >> but is that really a problem in everyday practice? I'm just curious -- >> if there's another issue with the cache that I'm not aware of, I'd like >> to fix it. >> ' > > > We've been running into problems in Sage that seem to occur because font > caches from 1.0.0 make old versions of matplotlib die. I haven't seen > the problem myself, but several Sage developers have put in quite a bit > of time in diagnosing the problem. In the end, I think they wrote a > patch to do custom MPLCONFIGDIR for different versions of matplotlib in > different versions of Sage. > > I'm CCing sage-devel, in case one of the sage devs that ran into > problems wants to comment. >
John Palmieri asked me to forward his response (below) about the problems Sage has been having with matplotlib and backward incompatibility: Thanks, Jason ========================================================== The Sage developers have found two issues with MPLCONFIGDIR: - First, when upgrading from version 0.99.3 to 1.0.0, the contents of that directory seem to cause compatibility problems. That is, once you upgrade to a version of Sage using 1.0.0, it overwrites whatever was in that directory, and then you get errors when using an older version of Sage which still uses 0.99.3. See <http://trac.sagemath.org/sage_trac/ticket/9221#comment:82> for an example of the sort of error which arises, and see <http://trac.sagemath.org/sage_trac/ticket/6235> for our fix: in Sage, we set MPLCONFIGDIR to different directories based on the version of matplotlib. - Second, the following code in matplotlib/texmanager.py can cause a race condition when creating MPLCONFIGDIR: if not os.path.exists(DIR): os.mkdir(DIR) In particular, when running doctests for Sage, if MPLCONFIGDIR doesn't exist, two different doctests can try to create it at the same time, causing a problem. (I've also heard people suggest that these sort of race conditions can be security issues, but I don't know about the validity of this.) See <http://trac.sagemath.org/sage_trac/ticket/10159> for our fix: we replace those lines by try: os.mkdir(DIR) except OSError, e: if e.errno == errno.EEXIST: pass else: raise (and also add "import errno" at the beginning of the file). I'd be happy to hear any comments you might have about these. -- John Palmieri jhpalmier...@gmail.com ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel