[issue21793] httplib client/server status refactor

2015-03-07 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: commit review -> resolved

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-03-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Martin for noticing a logging issue.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad64b6a7c0e2 by Serhiy Storchaka in branch 'default':
Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,
https://hg.python.org/cpython/rev/ad64b6a7c0e2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-21 Thread Demian Brecht

Demian Brecht added the comment:

Well, I’m not entirely sure how I came to the conclusion that errors were a 
problem (other than not spending enough time walking through it) and of course 
you’re right about the coercion handling it just fine. I’ve removed the 
explicit conversion in the code but have left the tests as they’re not tested 
elsewhere. Hopefully that should now wrap this up.

--
Added file: http://bugs.python.org/file38197/issue21793_logfix_4.patch

___
Python tracker 

___diff -r 46bfddb14cbe Lib/http/server.py
--- a/Lib/http/server.pyFri Feb 20 10:34:20 2015 -0500
+++ b/Lib/http/server.pySat Feb 21 07:59:08 2015 -0800
@@ -517,6 +517,8 @@
 This is called by send_response().
 
 """
+if isinstance(code, HTTPStatus):
+code = code.value
 
 self.log_message('"%s" %s %s',
  self.requestline, str(code), str(size))
diff -r 46bfddb14cbe Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py  Fri Feb 20 10:34:20 2015 -0500
+++ b/Lib/test/test_httpservers.py  Sat Feb 21 07:59:08 2015 -0800
@@ -6,7 +6,7 @@
 
 from http.server import BaseHTTPRequestHandler, HTTPServer, \
  SimpleHTTPRequestHandler, CGIHTTPRequestHandler
-from http import server
+from http import server, HTTPStatus
 
 import os
 import sys
@@ -79,13 +79,13 @@
 default_request_version = 'HTTP/1.1'
 
 def do_TEST(self):
-self.send_response(204)
+self.send_response(HTTPStatus.NO_CONTENT)
 self.send_header('Content-Type', 'text/html')
 self.send_header('Connection', 'close')
 self.end_headers()
 
 def do_KEEP(self):
-self.send_response(204)
+self.send_response(HTTPStatus.NO_CONTENT)
 self.send_header('Content-Type', 'text/html')
 self.send_header('Connection', 'keep-alive')
 self.end_headers()
@@ -94,7 +94,7 @@
 self.send_error(999)
 
 def do_NOTFOUND(self):
-self.send_error(404)
+self.send_error(HTTPStatus.NOT_FOUND)
 
 def do_EXPLAINERROR(self):
 self.send_error(999, "Short Message",
@@ -122,35 +122,35 @@
 def test_command(self):
 self.con.request('GET', '/')
 res = self.con.getresponse()
-self.assertEqual(res.status, 501)
+self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
 
 def test_request_line_trimming(self):
 self.con._http_vsn_str = 'HTTP/1.1\n'
 self.con.putrequest('XYZBOGUS', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 501)
+self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
 
 def test_version_bogus(self):
 self.con._http_vsn_str = 'FUBAR'
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
 
 def test_version_digits(self):
 self.con._http_vsn_str = 'HTTP/9.9.9'
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
 
 def test_version_none_get(self):
 self.con._http_vsn_str = ''
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 501)
+self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
 
 def test_version_none(self):
 # Test that a valid method is rejected when not HTTP/1.x
@@ -158,7 +158,7 @@
 self.con.putrequest('CUSTOM', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
 
 def test_version_invalid(self):
 self.con._http_vsn = 99
@@ -166,21 +166,21 @@
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 505)
+self.assertEqual(res.status, HTTPStatus.HTTP_VERSION_NOT_SUPPORTED)
 
 def test_send_blank(self):
 self.con._http_vsn_str = ''
 self.con.putrequest('', '')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
 
 def test_header_close(self):
 self.con.putrequest('GET', '/')
 self.con.putheader('Connection', 'close')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 501)
+self.assertEqual(res.status, HTTPStatus.NOT_IMPLE

[issue21793] httplib client/server status refactor

2015-02-20 Thread Martin Panter

Martin Panter added the comment:

I think you will find the error logging was already fine, since it already uses 
%d:

127.0.0.1 - - [21/Feb/2015 04:02:06] code 404, message File not found
127.0.0.1 - - [21/Feb/2015 04:02:06] "GET /nonexistant HTTP/1.1" 
HTTPStatus.NOT_FOUND -

The new codes in the tests look okay though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-20 Thread Demian Brecht

Demian Brecht added the comment:

Latest patch should address all comments. It also fixes the same issue in error 
logging which wasn’t previously accounted for. The test file has also been 
updated with using HTTPStatus where possible rather than hard coded ints. This 
is consistent with other areas in the http package.

--
Added file: http://bugs.python.org/file38193/issue21793_logfix_3.patch

___
Python tracker 

___diff -r 46bfddb14cbe Lib/http/server.py
--- a/Lib/http/server.pyFri Feb 20 10:34:20 2015 -0500
+++ b/Lib/http/server.pyFri Feb 20 17:37:25 2015 -0800
@@ -442,6 +442,10 @@
 message = shortmsg
 if explain is None:
 explain = longmsg
+
+if isinstance(code, HTTPStatus):
+code = code.value
+
 self.log_error("code %d, message %s", code, message)
 # using _quote_html to prevent Cross Site Scripting attacks (see bug 
#1100201)
 content = (self.error_message_format %
@@ -517,6 +521,8 @@
 This is called by send_response().
 
 """
+if isinstance(code, HTTPStatus):
+code = code.value
 
 self.log_message('"%s" %s %s',
  self.requestline, str(code), str(size))
diff -r 46bfddb14cbe Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py  Fri Feb 20 10:34:20 2015 -0500
+++ b/Lib/test/test_httpservers.py  Fri Feb 20 17:37:25 2015 -0800
@@ -6,7 +6,7 @@
 
 from http.server import BaseHTTPRequestHandler, HTTPServer, \
  SimpleHTTPRequestHandler, CGIHTTPRequestHandler
-from http import server
+from http import server, HTTPStatus
 
 import os
 import sys
@@ -79,13 +79,13 @@
 default_request_version = 'HTTP/1.1'
 
 def do_TEST(self):
-self.send_response(204)
+self.send_response(HTTPStatus.NO_CONTENT)
 self.send_header('Content-Type', 'text/html')
 self.send_header('Connection', 'close')
 self.end_headers()
 
 def do_KEEP(self):
-self.send_response(204)
+self.send_response(HTTPStatus.NO_CONTENT)
 self.send_header('Content-Type', 'text/html')
 self.send_header('Connection', 'keep-alive')
 self.end_headers()
@@ -94,7 +94,7 @@
 self.send_error(999)
 
 def do_NOTFOUND(self):
-self.send_error(404)
+self.send_error(HTTPStatus.NOT_FOUND)
 
 def do_EXPLAINERROR(self):
 self.send_error(999, "Short Message",
@@ -122,35 +122,35 @@
 def test_command(self):
 self.con.request('GET', '/')
 res = self.con.getresponse()
-self.assertEqual(res.status, 501)
+self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
 
 def test_request_line_trimming(self):
 self.con._http_vsn_str = 'HTTP/1.1\n'
 self.con.putrequest('XYZBOGUS', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 501)
+self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
 
 def test_version_bogus(self):
 self.con._http_vsn_str = 'FUBAR'
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
 
 def test_version_digits(self):
 self.con._http_vsn_str = 'HTTP/9.9.9'
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
 
 def test_version_none_get(self):
 self.con._http_vsn_str = ''
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 501)
+self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
 
 def test_version_none(self):
 # Test that a valid method is rejected when not HTTP/1.x
@@ -158,7 +158,7 @@
 self.con.putrequest('CUSTOM', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
 
 def test_version_invalid(self):
 self.con._http_vsn = 99
@@ -166,21 +166,21 @@
 self.con.putrequest('GET', '/')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 505)
+self.assertEqual(res.status, HTTPStatus.HTTP_VERSION_NOT_SUPPORTED)
 
 def test_send_blank(self):
 self.con._http_vsn_str = ''
 self.con.putrequest('', '')
 self.con.endheaders()
 res = self.con.getresponse()
-self.assertEqual(res.status, 400)
+self.assertEqual(res.stat

[issue21793] httplib client/server status refactor

2015-02-20 Thread Demian Brecht

Demian Brecht added the comment:

> On Feb 20, 2015, at 2:50 PM, Serhiy Storchaka  wrote:
> 
> if isinstance(code, HTTPStatus):
>code = '%d' % code

That’s what I’m intending on doing. It’s definitely not as contained as 
changing the __str__ implementation of HTTPStatus. That said, I understand the 
reasoning behind not doing so and this path is the next clearest.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I would write just:

if isinstance(code, HTTPStatus):
code = '%d' % code

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-20 Thread Martin Panter

Martin Panter added the comment:

One option might be changing log_request() from

self.log_message('"%s" %s %s',
 self.requestline, str(code), str(size))

to

self.log_message('"%s" %s %s',
 self.requestline, format(code), size)

Using str() is redundant with %s, and using format() instead invokes the int 
base class’s __format__() rather than the enum’s __repr__().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-20 Thread Demian Brecht

Demian Brecht added the comment:

The updated patch addresses comments which I’d somehow missed previously, but 
keeps the log fix to the __str__ implementation of HTTPStatus (using 
int.__str__ rather than format()).

> Does not changing __str__ to decimal representation (and in this case __str__ 
> = int.__str__ may be better) lost a part of the point of converting HTTP 
> status codes to enums?

I don’t think so. In the case of HTTPStatus in general, I think that the 
optimal string representation of an element of the enum is the stringified 
version of the status code. If nothing else, it’s consistent with the other 
type of status code that can be used (ints).

That does lead me to something that I think is a little odd about IntEnums in 
general but I’ll ask that question in python-dev rather than here as to not 
conflate this issue.

--
Added file: http://bugs.python.org/file38191/issue21793_logfix_2.patch

___
Python tracker 

___diff -r 46bfddb14cbe Lib/http/__init__.py
--- a/Lib/http/__init__.py  Fri Feb 20 10:34:20 2015 -0500
+++ b/Lib/http/__init__.py  Fri Feb 20 08:12:24 2015 -0800
@@ -24,6 +24,9 @@
 obj.description = description
 return obj
 
+def __str__(self):
+return int.__str__(self)
+
 # informational
 CONTINUE = 100, 'Continue', 'Request received, please continue'
 SWITCHING_PROTOCOLS = (101, 'Switching Protocols',
diff -r 46bfddb14cbe Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py  Fri Feb 20 10:34:20 2015 -0500
+++ b/Lib/test/test_httpservers.py  Fri Feb 20 08:12:24 2015 -0800
@@ -6,7 +6,7 @@
 
 from http.server import BaseHTTPRequestHandler, HTTPServer, \
  SimpleHTTPRequestHandler, CGIHTTPRequestHandler
-from http import server
+from http import server, HTTPStatus
 
 import os
 import sys
@@ -235,6 +235,27 @@
 self.assertEqual(int(res.getheader('Content-Length')), len(data))
 
 
+class RequestHandlerLoggingTestCase(BaseTestCase):
+class request_handler(BaseHTTPRequestHandler):
+protocol_version = 'HTTP/1.1'
+default_request_version = 'HTTP/1.1'
+
+def do_GET(self):
+self.send_response(HTTPStatus.OK)
+self.end_headers()
+
+def test_get(self):
+self.con = http.client.HTTPConnection(self.HOST, self.PORT)
+self.con.connect()
+
+with support.captured_stderr() as err:
+self.con.request('GET', '/')
+self.con.getresponse()
+
+self.assertTrue(
+err.getvalue().endswith('"GET / HTTP/1.1" 200 -\n'))
+
+
 class SimpleHTTPServerTestCase(BaseTestCase):
 class request_handler(NoLogRequestHandler, SimpleHTTPRequestHandler):
 pass
@@ -816,6 +837,7 @@
 cwd = os.getcwd()
 try:
 support.run_unittest(
+RequestHandlerLoggingTestCase,
 BaseHTTPRequestHandlerTestCase,
 BaseHTTPServerTestCase,
 SimpleHTTPServerTestCase,
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Does not changing __str__ to decimal representation (and in this case __str__ = 
int.__str__ may be better) lost a part of the point of converting HTTP status 
codes to enums?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-20 Thread Berker Peksag

Berker Peksag added the comment:

LGTM. I left a comment for Serhiy on Rietveld.

--
stage: needs patch -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-11 Thread Martin Panter

Martin Panter added the comment:

FYI I opened Issue 23442 for a separate regression to do with the 
REQUEST_HEADER_FIELDS_TOO_LARGE name

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-10 Thread Martin Panter

Martin Panter added the comment:

New logfix patch looks good. I would have written format(self) or format(self, 
'd') instead of '{:d}'.format(self), but that’s no big deal.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-10 Thread Eli Bendersky

Changes by Eli Bendersky :


--
nosy:  -eli.bendersky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-10 Thread Demian Brecht

Demian Brecht added the comment:

I’ve reverted the patch to use the old format. The main reason being that plain 
ints can still be used in most cases as values for code, in which case logging 
will be inconsistent with cases using the enum.

--
Added file: http://bugs.python.org/file38084/issue21793_logfix_1.patch

___
Python tracker 

___diff -r e548ab4ce71d Lib/http/__init__.py
--- a/Lib/http/__init__.py  Mon Feb 09 19:49:00 2015 +
+++ b/Lib/http/__init__.py  Tue Feb 10 07:15:09 2015 -0800
@@ -24,6 +24,11 @@
 obj.description = description
 return obj
 
+def __str__(self):
+# this is mainly for backwards compatibility, where constant values
+# would be output.
+return '{:d}'.format(self)
+
 # informational
 CONTINUE = 100, 'Continue', 'Request received, please continue'
 SWITCHING_PROTOCOLS = (101, 'Switching Protocols',
diff -r e548ab4ce71d Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py  Mon Feb 09 19:49:00 2015 +
+++ b/Lib/test/test_httpservers.py  Tue Feb 10 07:15:09 2015 -0800
@@ -6,7 +6,7 @@
 
 from http.server import BaseHTTPRequestHandler, HTTPServer, \
  SimpleHTTPRequestHandler, CGIHTTPRequestHandler
-from http import server
+from http import server, HTTPStatus
 
 import os
 import sys
@@ -235,6 +235,27 @@
 self.assertEqual(int(res.getheader('Content-Length')), len(data))
 
 
+class RequestHandlerLoggingTestCase(BaseTestCase):
+class request_handler(BaseHTTPRequestHandler):
+protocol_version = 'HTTP/1.1'
+default_request_version = 'HTTP/1.1'
+
+def do_GET(self):
+self.send_response(HTTPStatus.OK)
+self.end_headers()
+
+def test_get(self):
+self.con = http.client.HTTPConnection(self.HOST, self.PORT)
+self.con.connect()
+
+with support.captured_stderr() as err:
+self.con.request('GET', '/')
+self.con.getresponse()
+
+self.assertTrue(
+err.getvalue().endswith('"GET / HTTP/1.1" 200 -\n'))
+
+
 class SimpleHTTPServerTestCase(BaseTestCase):
 class request_handler(NoLogRequestHandler, SimpleHTTPRequestHandler):
 pass
@@ -764,6 +785,7 @@
 cwd = os.getcwd()
 try:
 support.run_unittest(
+LoggingRequestHandlerTestCase,
 BaseHTTPRequestHandlerTestCase,
 BaseHTTPServerTestCase,
 SimpleHTTPServerTestCase,
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-09 Thread Martin Panter

Martin Panter added the comment:

If changing the log format, you might also want to update the comment at the 
top of Lib/http/server.py:53. It seems the original format was imitating 
, except the timestamp is 
slightly different.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-09 Thread Demian Brecht

Demian Brecht added the comment:

Thanks for the catch Martin, it definitely wasn't intended. I've added a patch 
to fix the issue and add the extra description as suggested by Ethan.

--
Added file: http://bugs.python.org/file38068/issue21793_logfix.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-08 Thread Ethan Furman

Ethan Furman added the comment:

Without having looked at the code I would guess the fix is as simple as 
changing a %s to a %d.

Having said that, it would be nice if the name was also in the log -- something 
like:

  127.0.0.1 - - [08/Feb/2015 05:05:28] "GET / HTTP/1.1" 200 (OK) -

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2015-02-07 Thread Martin Panter

Martin Panter added the comment:

Currently the log output includes the new HTTPStatus codes. I don’t care much 
for the log output, but perhaps this wasn’t part of the plan? Before:

$ python3.4 -m http.server
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [08/Feb/2015 05:05:28] "GET / HTTP/1.1" 200 -

After:

$ ./python -m http.server
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [08/Feb/2015 05:05:40] "GET / HTTP/1.1" HTTPStatus.OK -

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution Demian.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset edf669b13482 by Serhiy Storchaka in branch 'default':
Issue #21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK,
https://hg.python.org/cpython/rev/edf669b13482

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-12 Thread Demian Brecht

Demian Brecht added the comment:

Updated patch addressing further reviews

--
Added file: http://bugs.python.org/file37434/issue21793_6.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-12 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-12 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-11 Thread Demian Brecht

Demian Brecht added the comment:

Self review/update: removed two errant breakpoints and updated the what's new 
section (missed in my previous patch).

--
Added file: http://bugs.python.org/file37420/issue21793_5.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-05 Thread Demian Brecht

Changes by Demian Brecht :


Added file: http://bugs.python.org/file37370/issue21793_4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-05 Thread Demian Brecht

Demian Brecht added the comment:

Updated patch addressing review comments. Thanks for the review.

--
Added file: http://bugs.python.org/file37368/issue21793_3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-04 Thread Berker Peksag

Berker Peksag added the comment:

I left a couple of comments on Rietveld. Thanks for the patch, Demian.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-04 Thread R. David Murray

Changes by R. David Murray :


--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-12-04 Thread Demian Brecht

Demian Brecht added the comment:

Bump (again) for hopeful merge.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-07-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-07-21 Thread Demian Brecht

Demian Brecht added the comment:

Removed draft status code, removed S from VARIANTS_

--
Added file: http://bugs.python.org/file36012/issue21793_2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-07-15 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-07-15 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-07-14 Thread Demian Brecht

Demian Brecht added the comment:

Bump for a follow-up review or merge

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-06-20 Thread Demian Brecht

Demian Brecht added the comment:

Updated patch with silly missed doc update.

--
Added file: http://bugs.python.org/file35711/issue21793_1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-06-20 Thread Demian Brecht

Demian Brecht added the comment:

New patch attached addressing review comments.

--
Added file: http://bugs.python.org/file35708/issue21793.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-06-18 Thread Demian Brecht

Demian Brecht added the comment:

Attached new patch with changes from review and a stab at an update to the docs.

--
Added file: http://bugs.python.org/file35680/refactor_http_status_codes_1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-06-17 Thread Ethan Furman

Ethan Furman added the comment:

Left comments in reitvald about modifying the Enum used -- let me know if you 
have any questions about that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-06-17 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +barry, eli.bendersky, ethan.furman, orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21793] httplib client/server status refactor

2014-06-17 Thread Demian Brecht

New submission from Demian Brecht:

This patch is a follow up to an out of scope comment made by R. David Murray in 
#20898 (http://bugs.python.org/issue20898#msg213771).

In a nutshell, there is some redundancy between http.client and http.server 
insofar as the definition of http status code, names and descriptions go. The 
included patch is a stab at cleaning some of this up while remaining backwards 
compatible and is intended to solicit feedback before finishing work.

TODOs:
* Populate descriptions for status codes
* Documentation
* Tests (?)

--
components: Library (Lib)
files: refactor_http_status_codes.patch
keywords: patch
messages: 220860
nosy: dbrecht, r.david.murray
priority: normal
severity: normal
status: open
title: httplib client/server status refactor
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35672/refactor_http_status_codes.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com