Skip to content

Commit e4f6445

Browse files
clin1234StanFromIrelandblurb-it[bot]
authored
gh-140166: Use application/texinfo as sole MIME type for .texi and .texinfo files (#140165)
Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
1 parent 99c3c63 commit e4f6445

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,8 @@ mimetypes
682682
---------
683683

684684
* Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
685+
* Rename ``application/x-texinfo`` to ``application/texinfo``.
686+
(Contributed by Charlie Lin in :gh:`140165`)
685687

686688

687689
pathlib

Lib/mimetypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ def _default_mime_types():
500500
'.ps' : 'application/postscript',
501501
'.ai' : 'application/postscript',
502502
'.eps' : 'application/postscript',
503+
'.texi' : 'application/texinfo',
504+
'.texinfo': 'application/texinfo',
503505
'.toml' : 'application/toml',
504506
'.trig' : 'application/trig',
505507
'.m3u' : 'application/vnd.apple.mpegurl',
@@ -549,8 +551,6 @@ def _default_mime_types():
549551
'.tar' : 'application/x-tar',
550552
'.tcl' : 'application/x-tcl',
551553
'.tex' : 'application/x-tex',
552-
'.texi' : 'application/x-texinfo',
553-
'.texinfo': 'application/x-texinfo',
554554
'.roff' : 'application/x-troff',
555555
'.t' : 'application/x-troff',
556556
'.tr' : 'application/x-troff',

Lib/test/test_mimetypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def check_extensions():
230230
("application/gzip", ".gz"),
231231
("application/ogg", ".ogx"),
232232
("application/postscript", ".ps"),
233+
("application/texinfo", ".texi"),
233234
("application/toml", ".toml"),
234235
("application/vnd.apple.mpegurl", ".m3u"),
235236
("application/vnd.ms-excel", ".xls"),
@@ -247,7 +248,6 @@ def check_extensions():
247248
("application/x-debian-package", ".deb"),
248249
("application/x-httpd-php", ".php"),
249250
("application/x-rpm", ".rpm"),
250-
("application/x-texinfo", ".texi"),
251251
("application/x-troff", ".roff"),
252252
("application/xml", ".xsl"),
253253
("application/yaml", ".yaml"),
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
:mod:`mimetypes`: Per the `IANA assignment <https://www.iana.org/assignments/media-types/application/texinfo>`_, update the MIME type for the ``.texi`` and ``.texinfo`` file formats to ``application/texinfo``, instead of ``application/x-texinfo``.

0 commit comments

Comments
 (0)