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 2012年10月16日 16:18 by chris.jerdonek, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue16250.patch | orsenthil, 2012年10月22日 00:55 | review | ||
| Messages (12) | |||
|---|---|---|---|
| msg173058 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年10月16日 16:18 | |
This issue is to fix invocations of URLError so that "reasons" are not passed in for the "filename" argument of the URLError constructor. Ezio found and described this issue when commenting on issue 10836: http://bugs.python.org/issue10836#msg172988 In more detail: URLError accepts "reason" and "filename" arguments: http://hg.python.org/cpython/file/74b95194ba86/Lib/urllib/error.py#l23 However, in several places in Lib/urllib, URLError is invoked with a "reason" passed in for the filename. For example: raise URLError('local file error', 'not on local host') This issue could be addressed for this example by changing the above to: raise URLError('local file error: not on local host') This dovetails with issue #16247, which is to start passing the actual filename in for some calls to URLError (and perhaps to adjust URLError's __str__, etc). |
|||
| msg173060 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年10月16日 16:52 | |
> raise URLError('local file error: not on local host')
I should also point out that URLError invocations with formats like the above already do occur in Lib/urllib/request.py. For example:
raise URLError('ftp error: no host given')
exc = URLError('ftp error: %s' % msg)
raise URLError("http protocol error: bad status line")
|
|||
| msg173112 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年10月16日 23:39 | |
For future reference, this affects 3.2 onwards. It probably makes sense to address this in the same branches in which we plan to address issue 16247 (currently set to 3.3 onwards). |
|||
| msg173493 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2012年10月22日 00:55 | |
This patch fixed these URLError wrong invocation issue and adds some tests for testing those it. I noticed that some of these were in the dead-end of the code, like checking if url is not a str (it is always, unwrap makes it a str if otherwise). Those will have to be cleaned and I shall do it next. |
|||
| msg173495 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年10月22日 02:03 | |
New changeset 8fb438e7f738 by Senthil Kumaran in branch 'default': Issue #16250: Fix the invocations of URLError which had misplaced filename attribute for exception http://hg.python.org/cpython/rev/8fb438e7f738 |
|||
| msg173496 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2012年10月22日 02:06 | |
This is fixed in 3.4. I shall backport to other branches. |
|||
| msg173565 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年10月22日 21:16 | |
This broke the Windows 7 buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/850 |
|||
| msg173573 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2012年10月23日 00:41 | |
The change in 49de26395d1a addresses the buildbot failure. I have given a run again. |
|||
| msg173579 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2012年10月23日 04:52 | |
The change I had made for fixing the windows buildbot had not fixed it. I am skipped (1f92315d9568) the test on windows, investigating the reason for windows behavior and I shall remove the skiptest on windows after fix. |
|||
| msg173914 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年10月27日 09:51 | |
New changeset 5e71f2712076 by Senthil Kumaran in branch '3.2': Issue #16250: Fix URLError invocation with proper args. http://hg.python.org/cpython/rev/5e71f2712076 New changeset 30547e2cd04d by Senthil Kumaran in branch '3.3': Issue #16250: Fix URLError invocation with proper args http://hg.python.org/cpython/rev/30547e2cd04d |
|||
| msg173916 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年10月27日 10:48 | |
New changeset 3fb84c1da8c5 by Senthil Kumaran in branch '2.7': Add some tests in 2.7 for Issue #16250 http://hg.python.org/cpython/rev/3fb84c1da8c5 |
|||
| msg173919 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2012年10月27日 10:52 | |
This is fixed in all versions now. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:37 | admin | set | github: 60454 |
| 2012年10月27日 10:52:27 | orsenthil | set | status: open -> closed messages: + msg173919 assignee: orsenthil resolution: fixed stage: needs patch -> resolved |
| 2012年10月27日 10:48:57 | python-dev | set | messages: + msg173916 |
| 2012年10月27日 09:51:21 | python-dev | set | messages: + msg173914 |
| 2012年10月23日 04:52:03 | orsenthil | set | messages: + msg173579 |
| 2012年10月23日 00:41:43 | orsenthil | set | messages: + msg173573 |
| 2012年10月22日 21:16:29 | pitrou | set | nosy:
+ pitrou messages: + msg173565 |
| 2012年10月22日 02:06:22 | orsenthil | set | messages: + msg173496 |
| 2012年10月22日 02:03:51 | python-dev | set | nosy:
+ python-dev messages: + msg173495 |
| 2012年10月22日 00:55:34 | orsenthil | set | files:
+ issue16250.patch keywords: + patch messages: + msg173493 |
| 2012年10月16日 23:39:49 | chris.jerdonek | set | stage: needs patch messages: + msg173112 versions: + Python 3.3 |
| 2012年10月16日 16:52:05 | chris.jerdonek | set | messages: + msg173060 |
| 2012年10月16日 16:43:54 | ezio.melotti | set | nosy:
+ ncoghlan |
| 2012年10月16日 16:23:30 | orsenthil | set | nosy:
+ orsenthil |
| 2012年10月16日 16:18:12 | chris.jerdonek | create | |