Skip to content

mimetypes.py uses deprecated "application/javascript" #97646

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
ppena-LiveData opened this issue Sep 29, 2022 · 1 comment
Closed

mimetypes.py uses deprecated "application/javascript" #97646

ppena-LiveData opened this issue Sep 29, 2022 · 1 comment
Labels
stdlib Python modules in the Lib dir

Comments

@ppena-LiveData
Copy link

The _types_map_default values for JavaScript use the deprecated "application/javascript" value. RFC 9239 as well as http://www.iana.org/assignments/media-types (which is referenced in mimetypes.py) both say that type/subtype name is obsolete and should be replaced with "text/javascript".

@ppena-LiveData ppena-LiveData changed the title mimetypes.py uses deprecated mimetypes.py uses deprecated "application/javascript" Sep 29, 2022
@mdboom mdboom added the stdlib Python modules in the Lib dir label Sep 29, 2022
noamcohen97 added a commit to noamcohen97/cpython that referenced this issue Oct 5, 2022
noamcohen97 added a commit to noamcohen97/cpython that referenced this issue Oct 5, 2022
@ambv
Copy link
Contributor

ambv commented Oct 7, 2022

Thanks for this! We're not backporting to 3.11 or 3.10 to avoid confusion. This change will land in Python 3.12.

@ambv ambv closed this as completed Oct 7, 2022
carljm added a commit to carljm/cpython that referenced this issue Oct 8, 2022
* main: (38 commits)
  pythongh-92886: make test_ast pass with -O (assertions off) (pythonGH-98058)
  pythongh-92886: make test_coroutines pass with -O (assertions off) (pythonGH-98060)
  pythongh-57179: Add note on symlinks for os.walk (python#94799)
  pythongh-94808: Fix regex on exotic platforms (python#98036)
  pythongh-90085: Remove vestigial -t and -c timeit options (python#94941)
  pythonGH-83901: Improve Signature.bind error message for missing keyword-only params (python#95347)
  pythongh-61105: Add default param, note on using cookiejar subclass (python#95427)
  pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (python#96271)
  pythongh-96073: fix backticks in NEWS entry (pythonGH-98056)
  pythongh-92886: [clinic.py] raise exception on invalid input instead of assertion (pythonGH-98051)
  pythongh-97997: Add col_offset field to tokenizer and use that for AST nodes (python#98000)
  pythonGH-88968: Reject socket that is already used as a transport (python#98010)
  pythongh-96346: Use double caching for re._compile() (python#96347)
  pythongh-91708: Revert params note in urllib.parse.urlparse table (python#96699)
  pythongh-96265: Fix some formatting in faq/design.rst (python#96924)
  pythongh-73196: Add namespace/scope clarification for inheritance section (python#92840)
  pythongh-97646: Change `.js` and `.mjs` files mimetype to conform to RFC 9239 (python#97934)
  pythongh-97923: Always run Ubuntu SSL tests with others in CI (python#97940)
  pythongh-97956: Mention `generate_global_objects.py` in `AC How-To` (python#97957)
  pythongh-96959: Update HTTP links which are redirected to HTTPS (python#98039)
  ...
mpage pushed a commit to mpage/cpython that referenced this issue Oct 11, 2022
m9810223 added a commit to m9810223/fava that referenced this issue Nov 6, 2023
```console
$ fava bcs/main.bc -p 5001  # <- python 3.12
Invalid mimetype set for '.js', overriding
Starting Fava on http://127.0.0.1:5001
```

- `mimetype` sometimes broken on windows: <python/cpython#97646>
- use `text/javascript`: <beancount#1446>
m9810223 added a commit to m9810223/fava that referenced this issue Nov 6, 2023
(Python 3.12) hide error message: `Invalid mimetype set for '.js', overriding`
- `mimetype` sometimes broken on windows: <python/cpython#97646>
- use `text/javascript`: <beancount#1446>
```console
$ fava bcs/main.bc -p 5001
Invalid mimetype set for '.js', overriding  # <- !
Starting Fava on http://127.0.0.1:5001
```
m9810223 added a commit to m9810223/fava that referenced this issue Nov 6, 2023
(Python 3.12) hide error message: `Invalid mimetype set for '.js', overriding`
- `mimetype` sometimes broken on windows: <beancount#1446>
- use `text/javascript`: <python/cpython#97646>
```console
$ fava bcs/main.bc -p 5001
Invalid mimetype set for '.js', overriding  # <- !
Starting Fava on http://127.0.0.1:5001
```
yagebu pushed a commit to beancount/fava that referenced this issue Nov 11, 2023
(Python 3.12) hide error message: `Invalid mimetype set for '.js', overriding`
- `mimetype` sometimes broken on windows: <#1446>
- use `text/javascript`: <python/cpython#97646>
```console
$ fava bcs/main.bc -p 5001
Invalid mimetype set for '.js', overriding  # <- !
Starting Fava on http://127.0.0.1:5001
```
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

3 participants