httplib and BaseHTTPServer each maintain their own copy of possible response codes. They don't agree. It looks like the one in httplib is a superset of the one in BaseHTTPServer.BaseHTTPRequestHandler.responses, and httplib is the logical place for it, but (1) They map in opposite directions. (2) The httplib version is just a bunch of names at the module toplevel, with no particular grouping that separates them from random classes, or makes them easy to import as a group. (3) The httplib names are explicitly not exported.
Logged In: YES user_id=764593 That may make the cleanup more urgent. The mapping in urllib2 is new with 2.5, so it should still be fine to remove it, or forward to httplib. The mapping in httplib is explicitly not exported, as there is an __all__ which excludes them, so it *should* be legitimate to remove them in a new release. BaseHTTPServer places the mapping as a class attribute on a public class. Therefore, either the final location has to include both the message and the long message (so that BaseHTTPServer can import it and delegate), or this has to be the final location, or we can't at best get down to two.
Logged In: YES user_id=1188172 I moved the urllib2 one to httplib as it belongs there. The constants httplib are explicitly documented and must remain. The BaseHTTPServer mapping includes its own "unofficial" long error messages and therefore cannot be merged with the others.