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.

Title: 2to3 generates "from urllib.parse import pathname2url"
Type: behavior Stage: patch review
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.1
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, ericp, srid
Priority: normal Keywords: patch

Created on 2009-07-16 20:59 by srid, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
fix6496.patch srid, 2009-07-16 21:36 Fix
Messages (4)
msg90585 - (view) Author: Sridhar Ratnakumar (srid) Date: 2009-07-16 20:59
Both pathname2url and url2pathname are in the urllib.request module, 
but 2to3 thinks they are in urllib.parse module.

sridharr@double:~/tmp/eric1$ cat 
from urllib import pathname2url, url2pathname

sridharr@double:~/tmp/eric1$ /opt/ActivePython-3.1/bin/2to3 
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
--- (original)
+++ (refactored)
@@ -1,2 +1,2 @@
-from urllib import pathname2url, url2pathname
+from urllib.parse import pathname2url, url2pathname
RefactoringTool: Files that need to be modified:
msg90588 - (view) Author: Sridhar Ratnakumar (srid) Date: 2009-07-16 21:36
Attaching fix. Might have to merge to 2.6/2.7
msg90631 - (view) Author: Eric Promislow (ericp) Date: 2009-07-17 17:26
Not in Sridar's patch, but 'pathname2url' is also misspelled
as 'pahtname2url' in the MAPPING struct.
msg90634 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-07-17 17:53
Fixed in r74065.
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50745
2009-07-17 17:53:35benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg90634
2009-07-17 17:26:34ericpsetnosy: + ericp
messages: + msg90631
2009-07-17 07:26:18ezio.melottisetpriority: normal
nosy: + benjamin.peterson

stage: patch review
2009-07-16 21:36:52sridsetfiles: + fix6496.patch
keywords: + patch
messages: + msg90588
2009-07-16 20:59:45sridcreate