bpo-32775: Fix regular expression warnings in fnmatch. (GH-5583) (GH-5596)
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.
(cherry picked from commit
23cdbfa744f0ec0e9e7575d378df4cb758691cd3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>