summaryrefslogtreecommitdiffstats
path: root/Lib/nturl2path.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] GH-127078: `url2pathname()`: handle extra slash before UNC drive in ↵Miss Islington (bot)2024-11-221-0/+3
| | | | | | | | | | | | URL path (GH-127132) (#127135) GH-127078: `url2pathname()`: handle extra slash before UNC drive in URL path (GH-127132) Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path. (cherry picked from commit 8c98ed846a7d7e50c4cf06f823d94737144dcf6a) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] GH-126766: `url2pathname()`: handle 'localhost' authority (GH-127129) ↵Miss Islington (bot)2024-11-221-4/+7
| | | | | | | | | | | | (#127130) GH-126766: `url2pathname()`: handle 'localhost' authority (GH-127129) Discard any 'localhost' authority from the beginning of a `file:` URI. As a result, file URIs like `//localhost/etc/hosts` are correctly decoded as `/etc/hosts`. (cherry picked from commit ebf564a1d3e2e81b9846535114e481d6096443d2) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] GH-126766: `url2pathname()`: handle empty authority section. ↵Miss Islington (bot)2024-11-141-4/+3
| | | | | | | | | | | | (GH-126767) (#126836) GH-126766: `url2pathname()`: handle empty authority section. (GH-126767) Discard two leading slashes from the beginning of a `file:` URI if they introduce an empty authority section. As a result, file URIs like `///etc/hosts` are correctly parsed as `/etc/hosts`. (cherry picked from commit cae9d9d20f61cdbde0765efa340b6b596c31b67f) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] GH-120423: `pathname2url()`: handle forward slashes in Windows paths ↵Miss Islington (bot)2024-11-121-6/+7
| | | | | | | | | | | (GH-126593) (#126764) GH-120423: `pathname2url()`: handle forward slashes in Windows paths (GH-126593) Adjust `urllib.request.pathname2url()` so that forward slashes in Windows paths are handled identically to backward slashes. (cherry picked from commit bf224bd7cef5d24eaff35945ebe7ffe14df7710f) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) ↵Miss Islington (bot)2024-11-081-19/+6
| | | | | | | | | | | | | (#126590) GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) Adjust `urllib.request.pathname2url()` and `url2pathname()` so that they don't remove slashes from Windows DOS drive paths and URLs. There was no basis for this behaviour, and it conflicts with how UNC and POSIX paths are handled. (cherry picked from commit 54c63a32d06cb5f07a66245c375eac7d7efb964a) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] GH-126205: Fix conversion of UNC paths to file URIs (GH-126208) (#126249)Miss Islington (bot)2024-10-311-6/+1
| | | | | | | | GH-126205: Fix conversion of UNC paths to file URIs (GH-126208) File URIs for Windows UNC paths should begin with two slashes, not four. (cherry picked from commit 951cb2c369e8b8fb9f93662658391a53fd727787) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* bpo-43607: Fix urllib handling of Windows paths with \\?\ prefix (GH-25539)Steve Dower2021-04-231-1/+9
|
* bpo-29836: Remove nturl2path from test_sundry and amend the module docstring ↵Jim Fasarakis-Hilliard2017-03-171-1/+6
| | | | | (GH-694) The module is implicitly tested through test_urllib.
* Issue21160: Correct comments in nturl2path. Patch by Jurko Gospodnetić.Serhiy Storchaka2015-10-241-5/+7
|
* Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-2/+2
|
* Fix Issue11474 - fix url2pathname() handling of '/C|/' on WindowsSenthil Kumaran2011-04-141-1/+4
|
* Fix for issue1153027, making Py3k changes similar to fix in issue918368.Senthil Kumaran2009-05-051-1/+1
| | | | | | | This will address: a) urllib/ in py3k, b) urllib in py2x is addressed by issue918368. c) urllib2 in py2x was already addressed in Revision 43132.
* follow-up of r64385: rename urllib.quote in nturl2pathAmaury Forgeot d'Arc2008-06-181-7/+7
| | | | and remove assertions & debugger when ssl is not present
* Raise statement normalization in Lib/.Collin Winter2007-08-301-2/+2
|
* Bug #649974: make docstrings for url2pathname consistentGeorg Brandl2005-12-261-17/+12
|
* Bug #1378455: a problem of urllib using open_local_fileGeorg Brandl2005-12-151-0/+2
|
* Use string.ascii_letters instead of string.letters.Fred Drake2001-07-201-2/+2
| | | | Remove unused import.
* removed __all__ from several modulesSkip Montanaro2001-02-181-2/+0
|
* String method conversion.Eric S. Raymond2001-02-091-10/+10
|
* added several more __all__ listsSkip Montanaro2001-02-061-0/+2
|
* Whitespace normalization.Tim Peters2001-01-151-53/+53
|
* Add 'r' to docstrings to avoid expanded backslash escapes. (Ka-Ping Yee)Guido van Rossum2000-05-301-2/+4
|
* More trivial comment -> docstring transformations by Ka-Ping Yee,Guido van Rossum2000-02-041-4/+1
| | | | | | | | | | | | | | | | | | who writes: Here is batch 2, as a big collection of CVS context diffs. Along with moving comments into docstrings, i've added a couple of missing docstrings and attempted to make sure more module docstrings begin with a one-line summary. I did not add docstrings to the methods in profile.py for fear of upsetting any careful optimizations there, though i did move class documentation into class docstrings. The convention i'm using is to leave credits/version/copyright type of stuff in # comments, and move the rest of the descriptive stuff about module usage into module docstrings. Hope this is okay.
* Sjoerd Mullender writes:Guido van Rossum1999-03-181-0/+10
| | | | | | | | Pathnames of files on other hosts in the same domain (\\host\path\to\file) are not translated correctly to URLs and back. The URL should be something like file:////host/path/to/file. Note that a combination of drive letter and remote host is not possible.
* From: Sjoerd MullenderGuido van Rossum1999-03-121-14/+15
| | | | | | The filename to URL conversion didn't properly quote special characters. The URL to filename didn't properly unquote special chatacters.
* Allow paths without drive specifier (Jack).Guido van Rossum1997-08-121-4/+8
|
* url2path for NTGuido van Rossum1996-06-261-0/+52