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

Sebastian Rittau report at bugs.python.org
Fri Jan 15 08:10:03 EST 2016


New submission from Sebastian Rittau:

The HTTP status code constants in Python 3.5 http.client are not compatible with the constants in Python 3.4, since the str() behaviour is different. This breaks code: 

srittau at moby:~$ python3.5
Python 3.5.1+ (default, Jan 13 2016, 15:09:18) 
[GCC 5.3.1 20160101] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import http.client
>>> str(http.client.OK)
'HTTPStatus.OK'

vs:

rittau at moby:~$ python3.4
Python 3.4.4 (default, Jan  5 2016, 15:35:18) 
[GCC 5.3.1 20160101] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import http.client
>>> str(http.client.OK)
'200'

----------
components: Library (Lib)
messages: 258291
nosy: srittau
priority: normal
severity: normal
status: open
title: http.client status code constants incompatible with Python 3.4
versions: Python 3.5

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


More information about the Python-bugs-list mailing list