This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年02月11日 11:46 by martin.panter, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue23442.patch | demian.brecht, 2015年02月12日 16:34 | review | ||
| httpstatus_tests.diff | berker.peksag, 2015年02月12日 22:27 | review | ||
| issue23442_1.patch | demian.brecht, 2015年02月13日 00:49 | review | ||
| Messages (10) | |||
|---|---|---|---|
| msg235737 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年02月11日 11:46 | |
This is a regression caused by the new HTTPStatus enum from Issue 21793. RFC 6585 uses the plural "Fields", so maybe the new enum symbol needs renaming. $ python3.4 Python 3.4.2 (default, Oct 8 2014, 13:44:52) [GCC 4.9.1 20140903 (prerelease)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import http.client >>> http.client.REQUEST_HEADER_FIELDS_TOO_LARGE 431 >>> http.client.REQUEST_HEADER_FIELD_TOO_LARGE Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'REQUEST_HEADER_FIELD_TOO_LARGE' >>> $ ./python Python 3.5.0a0 (qbase qtip simple-http-testing.patch tip:f3fadbfb10ba, Feb 11 2015, 07:18:07) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import http.client >>> http.client.REQUEST_HEADER_FIELDS_TOO_LARGE Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'http.client' has no attribute 'REQUEST_HEADER_FIELDS_TOO_LARGE' >>> http.client.REQUEST_HEADER_FIELD_TOO_LARGE <HTTPStatus.REQUEST_HEADER_FIELD_TOO_LARGE: 431> |
|||
| msg235769 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2015年02月11日 21:06 | |
Thanks for the catch Martin, the field should indeed be updated to be plural. I'll try to get a patch for this later today unless someone else beats me to it |
|||
| msg235845 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2015年02月12日 16:34 | |
The attached patch fixes the name |
|||
| msg235856 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年02月12日 21:57 | |
Thanks. Confirming the patch fixes the problem for me, so should be comitted. I wonder if a test case would be good too though. |
|||
| msg235861 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年02月12日 22:23 | |
I found another regression: In Python 3.4, 416 is REQUESTED_RANGE_NOT_SATISFIABLE, but REQUEST_RANGE_NOT_SATISFIABLE in 3.5. |
|||
| msg235862 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年02月12日 22:27 | |
Here is a test case. ====================================================================== FAIL: test_client_constants (test.test_httplib.OfflineTest) (constant='REQUESTED_RANGE_NOT_SATISFIABLE') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/berker/projects/cpython/default/Lib/test/test_httplib.py", line 985, in test_client_constants self.assertTrue(hasattr(client, const)) AssertionError: False is not true ====================================================================== FAIL: test_client_constants (test.test_httplib.OfflineTest) (constant='REQUEST_HEADER_FIELDS_TOO_LARGE') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/berker/projects/cpython/default/Lib/test/test_httplib.py", line 985, in test_client_constants self.assertTrue(hasattr(client, const)) AssertionError: False is not true |
|||
| msg235863 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2015年02月12日 22:35 | |
Thanks for the test Berker, I'll put a patch together with the changes later this afternoon. On 2015年02月12日 2:27 PM, Berker Peksag wrote: > > Berker Peksag added the comment: > > Here is a test case. > > ====================================================================== > FAIL: test_client_constants (test.test_httplib.OfflineTest) (constant='REQUESTED_RANGE_NOT_SATISFIABLE') > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/berker/projects/cpython/default/Lib/test/test_httplib.py", line 985, in test_client_constants > self.assertTrue(hasattr(client, const)) > AssertionError: False is not true > > ====================================================================== > FAIL: test_client_constants (test.test_httplib.OfflineTest) (constant='REQUEST_HEADER_FIELDS_TOO_LARGE') > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/berker/projects/cpython/default/Lib/test/test_httplib.py", line 985, in test_client_constants > self.assertTrue(hasattr(client, const)) > AssertionError: False is not true > > ---------- > Added file: http://bugs.python.org/file38119/httpstatus_tests.diff > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue23442> > _______________________________________ > |
|||
| msg235866 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2015年02月13日 00:49 | |
I've attached a patch with fixes for both cases and the tests added by Berker. Thanks guys. |
|||
| msg236277 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年02月20日 12:56 | |
New changeset 52d37efaf939 by Berker Peksag in branch 'default': Issue #23442: Rename two member names to stay backward compatible https://hg.python.org/cpython/rev/52d37efaf939 |
|||
| msg236278 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年02月20日 12:58 | |
Fixed. Thanks to both of you :) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:12 | admin | set | github: 67630 |
| 2015年02月20日 12:58:54 | berker.peksag | set | status: open -> closed resolution: fixed messages: + msg236278 stage: patch review -> resolved |
| 2015年02月20日 12:56:37 | python-dev | set | nosy:
+ python-dev messages: + msg236277 |
| 2015年02月13日 00:49:49 | demian.brecht | set | files:
+ issue23442_1.patch messages: + msg235866 |
| 2015年02月12日 22:35:17 | demian.brecht | set | messages: + msg235863 |
| 2015年02月12日 22:27:17 | berker.peksag | set | files:
+ httpstatus_tests.diff messages: + msg235862 |
| 2015年02月12日 22:23:13 | berker.peksag | set | nosy:
+ berker.peksag messages: + msg235861 stage: patch review |
| 2015年02月12日 21:57:09 | martin.panter | set | messages: + msg235856 |
| 2015年02月12日 16:34:13 | demian.brecht | set | files:
+ issue23442.patch keywords: + patch messages: + msg235845 |
| 2015年02月11日 21:06:45 | demian.brecht | set | messages: + msg235769 |
| 2015年02月11日 12:37:58 | berker.peksag | set | nosy:
+ serhiy.storchaka |
| 2015年02月11日 11:46:11 | martin.panter | create | |