Message 71512 - Python tracker (original) (raw)

These functions are for generic MIME headers and bodies, so are applicable to CGI, HTTP, Email, and any other protocols based on MIME. So I think having them in email.header makes about as much sense as having them in cgi.

Isn't mimetools a better package for this?

Also I think there's an exodus of functions from cgi -- there's talk about parse_qs/parse_qsl being moved to urllib (I thought that was almost finalised). Traditionally the cgi module has had way too much stuff in it which only superficially applies to cgi.

I'm also thinking of cgi.escape, which I'd rather see in htmllib than cgi (except that htmllib is described as "A parser for HTML documents").

But I'm worried that these functions are too ingrained in people's memories (I type "cgi.escape" several times a day and I'd get confused if it moved). So perhaps these moves are too late.

I imagine if they were moved (at least for a few versions) the old ones would still work, with a deprecation warning?