Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-16 Thread Jacob Rus
would be a big improvement. Cheers, Jacob Rus ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-14 Thread Jacob Rus
11 Aug 2009, Benjamin Peterson wrote: 2009/8/11 Jacob Rus: I have some other questions: How does one deprecate part of a standard library API? How can we alert users to the deprecation? When can the deprecated parts be removed? Basically, you add a DeprecationWarning to the API. Then remove

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-12 Thread Jacob Rus
might garner some more reviews by putting your patch up on Rietveld; it makes reviewing much painful. Okay, now that svn.python.org is back up, here's a Rietveld link: http://codereview.appspot.com/104091/show Cheers, Jacob Rus ___ Python-Dev mailing list

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-11 Thread Jacob Rus
Glyph Lefkowitz wrote: Jacob Rus wrote: No, [changing the semantics in 3.x] is bad.  If I may quote Guido: http://www.artima.com/weblogs/viewpost.jsp?thread=227041 So, once more for emphasis: Don't change your APIs at the same time as porting to Py3k! Please follow this policy as much

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-02 Thread Jacob Rus
Jacob Rus wrote: Brett Cannon wrote: Jacob Rus wrote: At the very least, I think some changes can be made to this code without altering its basic function, which would clean up the actual mime types it returns, comment the exceptions to Apache and explain why they're there, and make

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-02 Thread Jacob Rus
file, and there are at most going to be 3 or 4 of them installed on one machine for different versions of Apache. Cheers, Jacob Rus ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-02 Thread Jacob Rus
Robert Lehmann wrote: Jacob Rus wrote: Here is a somewhat more substantively changed version. This one does away with the 'inited' flag and the 'init' function, which might be impossible given that their documented (though I would be extremely surprised if anyone calls them in third-party

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-01 Thread Jacob Rus
Brett Cannon wrote: Jacob Rus wrote: At the very least, I think some changes can be made to this code without altering its basic function, which would clean up the actual mime types it returns, comment the exceptions to Apache and explain why they're there, and make the code flow

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-01 Thread Jacob Rus
Jacob Rus wrote: Here's a diff: http://pastie.textmate.org/568329 And here's the whole file: http://pastie.textmate.org/568333 Slightly better: http://pastie.textmate.org/568354 http://pastie.textmate.org/568355 ___ Python-Dev mailing list Python

[Python-Dev] standard library mimetypes module pathologically broken?

2009-07-31 Thread Jacob Rus
how to make the rewrite backwards-compatible. Note: someone else has had fun with this module: http://lucumr.pocoo.org/2009/3/1/the-1000-speedup-or-the-stdlib-sucks http://lucumr.pocoo.org/2009/7/24/singletons-and-their-problems-in-python Cheers, Jacob Rus

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-07-31 Thread Jacob Rus
leaving the particular set of bugs unchanged. Cheers, Jacob Rus ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-07-31 Thread Jacob Rus
Brett Cannon wrote: Jacob Rus wrote:  * It defines __all__: I didn’t even realize __all__ could be used    for single-file modules (w/o submodules), but it definitely    shouldn’t be here. __all__ is used to control what a module exports when used in an import *, nothing more. Thus it's use

Re: [Python-Dev] standard library mimetypes module pathol ogically broken?

2009-07-31 Thread Jacob Rus
Andrew McNabb wrote: Jacob Rus wrote: * The operation is crazy: It defines a MimeTypes class which actually stores the type mappings, but this class is designed to be a singleton. The way that such a design is enforced is through the use of the module-global 'init' function