Hugo van Kemenade
4ac916ae33
gh-130645: Add color to stdlib argparse CLIs (gh-133380)
2025-05-05 19:46:46 +02:00
Hugo van Kemenade
4cec0b510b
gh-129965: Add more missing MIME types ( #132845 )
2025-04-28 15:30:35 +00:00
Hugo van Kemenade
ee9102a535
gh-75223: Deprecate undotted extensions in `mimetypes.MimeTypes.add_type` ( #128638 )
...
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2025-04-28 14:23:57 +00:00
Саша Черных
132b6bc98f
gh-132054: Add ``application/yaml`` to ``mimetypes`` ( #132056 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-21 12:05:37 +03:00
Bénédikt Tran
f5a7037c32
gh-93096: fix `test_mimetypes.test_invocation_error` tests on iOS ARM64 ( #132266 )
2025-04-08 15:03:43 +02:00
Bénédikt Tran
53908bd790
gh-93096: fix `test_mimetypes.test_guess_type_conflicting_with_mimetypes` ( #131408 )
2025-04-08 09:08:59 +00:00
Oleg Iarygin
328f8b8856
gh-93096: Make `mimetypes` CLI tool public ( #93097 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-03-13 13:19:22 +02:00
Hugo van Kemenade
1cf9b6d9b8
gh-129965: Add missing MIME types ( #129969 )
...
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-21 15:44:53 +00:00
RUANG (James Roy)
303043f506
gh-128703: Fix mimetypes.guess_type for empty Content-Type in registry (GH-128854)
2025-02-14 17:26:26 +00:00
Hugo van Kemenade
dc7a2b6522
gh-118761: Improve import time of `mimetypes` ( #126979 )
2024-11-21 16:55:28 +02:00
Hugo van Kemenade
933f21c3c9
gh-85957: Add missing MIME types for images with RFCs ( #126966 )
2024-11-18 20:13:20 +02:00
Sahil Prajapati
599bfc986d
gh-84852: Add MIME types for .eot, ,otf, .ttf, .woff and .woff2 fonts ( #20199 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-12 08:48:38 +02:00
Hugo van Kemenade
3c6d2d1230
gh-89416: Add RFC 9559 MIME types for Matroska formats ( #126412 )
...
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-11-11 21:08:54 +00:00
Xie Yanbo
b6c80e21c7
Fix typos in comments and docstring ( #122720 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-08-07 07:39:16 +01:00
Geoffrey Thomas
ef172521a9
Remove almost all unpaired backticks in docstrings ( #119231 )
...
As reported in #117847 and #115366 , an unpaired backtick in a docstring
tends to confuse e.g. Sphinx running on subclasses of standard library
objects, and the typographic style of using a backtick as an opening
quote is no longer in favor. Convert almost all uses of the form
The variable `foo' should do xyz
to
The variable 'foo' should do xyz
and also fix up miscellaneous other unpaired backticks (extraneous /
missing characters).
No functional change is intended here other than in human-readable
docstrings.
2024-05-22 12:35:18 -04:00
Serhiy Storchaka
d6fa1d4bee
gh-66543: Add mimetypes.guess_file_type() (GH-117258)
2024-05-06 15:50:52 +03:00
Nikita Sobolev
1511bc95c4
gh-101137: Add `text/x-rst` to `mimetypes` ( #118593 )
2024-05-05 13:39:50 +00:00
Ryan Batchelder
b6f0ab5b1c
gh-83505: Add markdown mimetype mapping ( #17995 )
2024-05-05 13:09:59 +00:00
Antonio
70969d53a7
gh-97901 add missing text/rtf to mimetypes (GH-97902)
...
Co-authored-by: Noam Cohen <noam@noam.me>
2024-03-26 15:10:29 +01:00
Serhiy Storchaka
9654daf793
gh-66543: Fix mimetype.guess_type() (GH-117217)
...
Fix parsing of the following corner cases:
* URLs with only a host name
* URLs containing a fragment
* URLs containing a query
* filenames with only a UNC sharepoint on Windows
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2024-03-26 13:26:45 +02:00
Nachtalb
b905fad838
gh-111741: Recognise image/webp as a standard format in the mimetypes module (GH-111742)
...
Previously it was supported as a non-standard type.
2024-01-31 17:33:46 +02:00
Nick Drozd
024ac542d7
bpo-45975: Simplify some while-loops with walrus operator (GH-29347)
2022-11-26 14:33:25 -08:00
Noam Cohen
2a168355f0
gh-97646: Change `.js` and `.mjs` files mimetype to conform to RFC 9239 ( #97934 )
2022-10-07 12:00:53 -07:00
kixorz
6dee69577a
bpo-45639: Add webp and avif image formats to mimetypes ( #29259 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-03 15:17:57 -06:00
Kumar Aditya
5dd7ec52b8
bpo-20392: Fix inconsistency with uppercase file extensions in mimetypes.guess_type (GH-30229)
2022-03-15 15:25:43 +02:00
Dylan Van Assche
ef5305819f
bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230)
...
Co-authored-by: Éric Araujo <merwok@netwok.org>
2021-11-20 16:52:00 +01:00
Josephine-Marie
d74da9e140
bpo-45411: Update mimetypes.py (GH-28792)
...
.vtt and .srt files are common subtitle files, used by browsers.
2021-10-11 13:05:28 +02:00
Serhiy Storchaka
97ea18eced
bpo-35474: Fix mimetypes.guess_all_extensions() potentially mutating list (GH-28286)
...
* Calling guess_all_extensions() with strict=False potentially
mutated types_map_inv.
* Mutating the result of guess_all_extensions() mutated types_map_inv.
2021-09-11 17:44:44 +03:00
Steve Dower
bbf2fb6c7a
bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator (GH-27059)
2021-07-08 16:48:42 +01:00
Andreas Jansson
de14d709e3
Remove duplicate mime type mapping .bmp -> image/x-ms-bmp (GH-26300)
...
Thanks for the contribution @andreasjansson
2021-05-28 22:20:46 -03:00
Ilya Stepin
20a5b7e986
bpo-43542: Add heif/heic formats in mimetypes (GH-24917)
...
* bpo-43542: Add heif/heic formats in mimetypes
Add HEIF and HEIC format to list of media types. It has IANA registration.
IANA: https://www.iana.org/assignments/media-types/image/heic
HEIF Github: https://github.com/nokiatech/heif
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-03-20 16:06:27 -07:00
Nathan Beals
3a87e562ea
bpo-42994: Add MIME types for opus, AAC, 3gpp and 3gpp2 ( #24287 )
...
Co-authored-by: Nathan Beals <ndbeals@users.noreply.github.com>
2021-03-02 16:20:18 -08:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
7f569c9bc0
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
2020-06-29 11:36:48 +03:00
MARK SCHWAB
60c2a810e3
bpo-40626: Support HDF5 in mimetypes (GH-20042)
...
Add hdf5 with .h5 file extension
See 'Recommendations' section for mime types from the HDF group: https://www.hdfgroup.org/2018/06/citations-for-hdf-data-and-software/
Patch by Mark Schwab.
2020-06-11 15:04:13 -04:00
Karthikeyan Singaravelan
d8efc14951
bpo-39299: Add more tests for mimetypes and its cli. (GH-17949)
...
* Add tests for case insensitive check of types and extensions as fallback.
* Add tests for data url with no comma.
* Add tests for read_mime_types.
* Add tests for the mimetypes cli and refactor __main__ code to private function.
* Restore mimetypes.knownfiles value at the end of the test.
2020-01-13 20:09:36 +05:30
Philip McMahon
b2b4a51f74
bpo-32021: Support brotli .br encoding in mimetypes ( #12200 )
...
Add support for brotli encoding in the encoding_map.
2020-01-12 14:31:49 -08:00
Abhilash Raj
19a3d87300
bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15522)" (GH-16724)
...
This reverts commit 87bd2071c7
.
https://bugs.python.org/issue38449
2019-10-11 22:41:35 -07:00
Filip Š
4b41745b3c
bpo-37305: add MIME type for Web App Manifest ( #14199 )
...
* bpo-37305: add MIME type for Web App Manifest
* bpo-37305: add news entry
* Restore indentation and sort by value
2019-09-11 14:32:04 +01:00
Dong-hee Na
87bd2071c7
bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522)
...
https://bugs.python.org/issue22347
2019-09-04 17:34:35 -07:00
David K. Hess
9fc720e5e4
bpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes (GH-3062)
2019-06-24 16:46:59 -07:00
Mayank Asthana
7e18deef65
bpo-34926: Make mimetypes.guess_type accept os.PathLike objects (GH-9777)
...
:meth:`mimetypes.MimeTypes.guess_type` now accepts :term:`path-like object` in addition to url strings.
2018-10-10 16:46:44 +02:00
travisoneill
199a280af5
bpo-34758: add .wasm to recognized file extensions in mimetypes module (GH-9464)
2018-10-09 07:43:58 +03:00
Bradley Meck
0854b92cd2
bpo-31715 Add mimetype for extension .mjs ( #3908 )
2018-10-08 23:04:55 +03:00
Cheryl Sabella
0250de4819
bpo-27485: Rename and deprecate undocumented functions in urllib.parse (GH-2205)
2018-04-25 16:51:54 -07:00
Nitish Chandra
ede157331b
bpo-22589 Changed MIME type of .bmp to "image/bmp" ( #4756 )
...
Per rfc7903 this is the standard MIME type for this file format, and appears as such in the IANA MIME registry.
2017-12-08 07:48:44 -05:00
Henk-Jaap Wagenaar
f02f5e5c3e
bpo-31867: Remove duplicates in default mimetypes. ( #4388 )
2017-11-17 12:10:19 +02:00
Nate Tangsurat
8204b90368
bpo-30824: Add mimetype for .json ( #3048 )
2017-08-14 14:39:45 -04:00
Serhiy Storchaka
55fe1ae970
bpo-30022: Get rid of using EnvironmentError and IOError (except test… ( #1051 )
2017-04-16 10:46:38 +03:00
Martin Panter
f8f3121775
Issue #27108 : Add missing names to mimetypes.__all__, by Jacek Kołodziej
2016-06-06 01:59:19 +00:00
Berker Peksag
d7fdc86153
Issue #16329 : Add .webm to mimetypes.types_map
...
Patch by Giampaolo Rodola'.
2016-04-09 08:00:20 +03:00