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

2017-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Sebastian. -- ___ Python tracker ___

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

2017-10-23 Thread Sebastian Rittau
Sebastian Rittau added the comment: I take the liberty of closing this "wont fix". Changing the behaviour would most likely do more harm than good. If one of the maintainers disagrees, please reopen. :) -- resolution: -> wont fix stage: -> resolved status: open

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

2016-01-15 Thread Sebastian Rittau
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@moby:~$ python3.5 Python 3.5.1+ (default, Jan 13 2016, 15:09:18) [GCC 5.3.1

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

2016-01-15 Thread SilentGhost
Changes by SilentGhost : -- keywords: +3.5regression nosy: +serhiy.storchaka type: -> behavior versions: +Python 3.6 ___ Python tracker

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

2016-01-15 Thread Sebastian Rittau
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

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

2016-01-15 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___

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

2016-01-15 Thread Ethan Furman
Ethan Furman added the comment: These changes were made in issue21793. -- ___ Python tracker ___ ___

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

2016-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this a side effect of using more human-friendly enums. This is not a problem if string representation is used in formatting human-readable messages, but if you need numerical representation, you could use str(int(code)), '%d' % code or

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

2016-01-15 Thread Martin Panter
Martin Panter added the comment: This affected the HTTP server log messages, discussed from onwards. The first three patches proposed changed the HTTPStatus.__str__() implementation, which would have avoided the problem in general. But Demian’s

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

2016-01-15 Thread Ethan Furman
Ethan Furman added the comment: Not using Enum's __str__ was discussed (I think during the initial Enum threads when PEP435 was being debated) and IIRC Guido was strongly against it as it took away half the purpose of using an Enum. -- ___ Python