Bugs item #649961, was opened at 2002-12-07 05:19 Message generated for change (Comment added) made by facundobatista You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=649961&group_id=5470
Category: Windows Group: Python 2.2.1 Status: Open Resolution: None Priority: 5 Submitted By: Mike Brown (mike_j_brown) Assigned to: Nobody/Anonymous (nobody) Summary: nturl2path.url2pathname() mishandles /// Initial Comment: On Windows, urllib.url2pathname('///path/to/file') returns r'\\path\to\file'. This path cannot be used in things like open() and os.access(). It should probably return r'\path\to\file'. In addition, '//localhost/path/to/file' is a special case that should become '\path\to\file'. I'll post this as a separate bug since it affects all file URIs. ---------------------------------------------------------------------- >Comment By: Facundo Batista (facundobatista) Date: 2004-12-27 21:32 Message: Logged In: YES user_id=752496 The documentation for urllib states that: Although the urllib module contains (undocumented) routines to parse and unparse URL strings, the recommended interface for URL manipulation is in module urlparse. So, if you think that the files should also be modified, change the group of this bug to 2.4. Otherwise it will be closed as won't fix. ---------------------------------------------------------------------- Comment By: Facundo Batista (facundobatista) Date: 2004-12-27 21:32 Message: Logged In: YES user_id=752496 Please, could you verify if this problem persists in Python 2.3.4 or 2.4? If yes, in which version? Can you provide a test case? If the problem is solved, from which version? Note that if you fail to answer in one month, I'll close this bug as "Won't fix". Thank you! . Facundo ---------------------------------------------------------------------- Comment By: Mike Brown (mike_j_brown) Date: 2004-12-27 04:12 Message: Logged In: YES user_id=371366 See #649974 -- url2pathname() and pathname2url() are undocumented, platform-specific, and not really general-purpose. It probably should not be assumed that they are intended to produce values that are usable with open(), os.access(), or anything other than where they are currently used internally in urllib. The solution as proposed for #649974 is probably just to document the functions and discourage their general use. See the suggested diffs attached to that report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=649961&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com