Steve Dower <steve.do...@python.org> added the comment:

My replies to Eryk's comment copied above:

Yes, always more tests :)

The behaviour of normpath has always been weird and/or incorrect around invalid 
UNC paths.

For example, on 3.10, normpath("//spam///eggs/..") --> "\\\\spam". Originally, 
the path was a file path (albeit with an invalid empty share name), and the 
final path is just a machine name.

Currently on 3.11, normpath("//spam///eggs/..") --> "\\\\spam\\\\". This 
doesn't match GetFullPathNameW, but at least it leaves the end of the path as a 
file (with an empty share name).

I don't think it's necessarily obvious which is correct, though matching 
GetFullPathNameW is certainly the easiest rule for us to use. Matching previous 
Python versions is also reasonable, though given the input is invalid for its 
domain we don't really have any obligation to preserve the result.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46287>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to