msg253030 - (view) |
Author: Florian Bruhin (The Compiler) * |
Date: 2015-10-15 06:04 |
On Windows 8: >>> fnmatch.fnmatch(r'foo\bar', 'foo/bar') True >>> fnmatch.fnmatchcase(r'foo\bar', 'foo/bar') False This is due to fnmatch calling os.path.normpath on the arguments (to get the case-sensitivity of the filesystem), which on Windows *also* happens to normalize / to \. It's probably a bad idea to change the behaviour now, but I think at least this should be clarified in the docs. |
|
|
msg253040 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2015-10-15 10:56 |
I think the existing behavior is the desirable behavior, but in any case as you say it is too late to change it. The docs should indeed be clarified by changing the wording to indicate that fnmatch calls normcase but fnmatchcase does not, with a link to normcase (which in turn documents the windows behavior). |
|
|
msg293423 - (view) |
Author: Florian Bruhin (The Compiler) * |
Date: 2017-05-10 14:57 |
https://github.com/python/cpython/pull/1535 seems to be the correct PR, not 1634. |
|
|
msg293427 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2017-05-10 15:46 |
Yes, PR 1535 is indeed linked to this issue, if you're reading it from the bug tracker. The pull request number you see from the notification email (+1634) refers to the pull_request item in the bug tracker (https://bugs.python.org/pull_request1634). This number is different than the pull request # on GitHub. Hope this clarifies it :) See also discussions about it: https://github.com/python/core-workflow/issues/35 http://psf.upfronthosting.co.za/roundup/meta/issue624 (I was confused about it too) |
|
|
msg295609 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2017-06-10 04:42 |
New changeset e5f6e86c48c7b2eb9e1d6a0e72867b4d8b4720f3 by Mariatta (csabella) in branch 'master': bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) https://github.com/python/cpython/commit/e5f6e86c48c7b2eb9e1d6a0e72867b4d8b4720f3 |
|
|
msg295638 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2017-06-10 14:25 |
New changeset 76eabd3a21dc578de6093d45dd8d69a5ec4b9afe by Mariatta in branch '3.6': bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2065) https://github.com/python/cpython/commit/76eabd3a21dc578de6093d45dd8d69a5ec4b9afe |
|
|
msg295639 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2017-06-10 14:26 |
New changeset 656f232131e7a49800662119c7f9b8078729e697 by Mariatta in branch '3.5': bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2066) https://github.com/python/cpython/commit/656f232131e7a49800662119c7f9b8078729e697 |
|
|
msg295640 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2017-06-10 14:26 |
New changeset 9660a7e4bbc3932846fcde0e31856b5b3908b834 by Mariatta in branch '2.7': bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2067) https://github.com/python/cpython/commit/9660a7e4bbc3932846fcde0e31856b5b3908b834 |
|
|
msg295641 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2017-06-10 14:27 |
This has been fixed, and backported to 2.7, 3.5, and 3.6. Thanks :) |
|
|