diff options
Diffstat (limited to 'qutebrowser/utils/utils.py')
-rw-r--r-- | qutebrowser/utils/utils.py | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index 9c68932f3..a28d662b3 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -784,30 +784,13 @@ def mimetype_extension(mimetype: str) -> Optional[str]: This mostly delegates to Python's mimetypes.guess_extension(), but backports some changes (via a simple override dict) which are missing from earlier Python versions. - Most likely, this can be dropped once the minimum Python version is raised to 3.7. + Most likely, this can be dropped once the minimum Python version is raised to 3.10. """ overrides = { + # Added in 3.10 + "application/x-hdf5": ".h5", # Added around 3.8 "application/manifest+json": ".webmanifest", - "application/x-hdf5": ".h5", - - # Added in Python 3.7 - "application/wasm": ".wasm", - - # Wrong values for Python 3.6 - # https://bugs.python.org/issue1043134 - # https://github.com/python/cpython/pull/14375 - "application/octet-stream": ".bin", # not .a - "application/postscript": ".ps", # not .ai - "application/vnd.ms-excel": ".xls", # not .xlb - "application/vnd.ms-powerpoint": ".ppt", # not .pot - "application/xml": ".xsl", # not .rdf - "audio/mpeg": ".mp3", # not .mp2 - "image/jpeg": ".jpg", # not .jpe - "image/tiff": ".tiff", # not .tif - "text/html": ".html", # not .htm - "text/plain": ".txt", # not .bat - "video/mpeg": ".mpeg", # not .m1v } if mimetype in overrides: return overrides[mimetype] |