]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35474: Fix mimetypes.guess_all_extensions() potentially mutating list (GH-28286...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 13 Sep 2021 17:24:29 +0000 (10:24 -0700)
committerGitHub <noreply@github.com>
Mon, 13 Sep 2021 17:24:29 +0000 (19:24 +0200)
commit06c26f4d2909eae196ac81c9ed9b41e747e42685
treea0a4ff09c739b7a511dce49f6b4430bd24e3c44d
parent2f1d9bca144f3bbb4199111f4763ef05daea8526
bpo-35474: Fix mimetypes.guess_all_extensions() potentially mutating list (GH-28286) (GH-28289)

* Calling guess_all_extensions() with strict=False potentially
  mutated types_map_inv.
* Mutating the result of guess_all_extensions() mutated types_map_inv.
(cherry picked from commit 97ea18ecede8bfd33d5ab2dd0e7e2aada2051111)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/mimetypes.py
Lib/test/test_mimetypes.py
Misc/NEWS.d/next/Library/2021-09-11-10-45-12.bpo-35474.tEY3SD.rst [new file with mode: 0644]