]> granicus.if.org Git - python/commit
bpo-32775: Fix regular expression warnings in fnmatch. (#5583)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 9 Feb 2018 11:30:19 +0000 (13:30 +0200)
committerGitHub <noreply@github.com>
Fri, 9 Feb 2018 11:30:19 +0000 (13:30 +0200)
commit23cdbfa744f0ec0e9e7575d378df4cb758691cd3
tree3801132c5618951ad64c32f9609bb2524a55eff3
parentfeaefc7f60cd3be7bf4ecc2b73e77d2bfe048403
bpo-32775: Fix regular expression warnings in fnmatch. (#5583)

fnmatch.translate() no longer produces patterns which contain set
operations.

Sets starting with '[' or containing '--', '&&', '~~' or '||' will
be interpreted differently in regular expressions in future versions.
Currently they emit warnings. fnmatch.translate() now avoids producing
patterns containing such sets by accident.
Lib/fnmatch.py
Lib/test/test_fnmatch.py
Misc/NEWS.d/next/Library/2018-02-07-19-12-10.bpo-32775.-T77_c.rst [new file with mode: 0644]