[issue26123] http.client status code constants incompatible with Python 3.4

Sebastian Rittau report at bugs.python.org
Fri Jan 15 11:59:20 EST 2016


Sebastian Rittau added the comment:

It is no doubt that is easy to work around. Once I found the problem it took about five minutes to fix it and roll a new release. And of course for Python 3.5+ code it is better to use the enum http.HTTPStatus directly (I actually like that enum a lot). But this breaks existing code that should not break. It might be too late to change now, though.

As a side note, I would also have preferred str(HTTPStatus.OK) to return "OK" or "200" - the latter would mirror default format behaviour - instead of "HTTPStatus.OK", but this may be too late as well.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26123>
_______________________________________


More information about the Python-bugs-list mailing list