[issue34875] Change .js mime to "text/javascript"

2019-06-17 Thread Myles Borins


Myles Borins  added the comment:

Hey All,

I'd like to reopen this. We are almost done with the IETF standardization of 
.mjs, and part of this process is making obsolete application/javascript in 
favor of text/javascript.

--> https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/

--
resolution: rejected -> 
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue34875>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Myles Borins  added the comment:

Thanks for chiming in R. David Murray

> Think of the absence of the mimetype rule as a bug, rather than its presence 
> as a feature.

Very much appreciate this sentiment.

I've opened backports to simplify the process if y'all decide to approve.

2.7: https://github.com/python/cpython/pull/10978
3.6: https://github.com/python/cpython/pull/10976
3.7: https://github.com/python/cpython/pull/10977

--

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Change by Myles Borins :


--
pull_requests: +10219

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Change by Myles Borins :


--
pull_requests: +10218

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Change by Myles Borins :


--
pull_requests: +10217

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Myles Borins  added the comment:

Also wanted to point out some prior art of a mimetype (json) being backported 
to all active runtimes

https://bugs.python.org/issue30824#msg297527

--

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Myles Borins  added the comment:

Thanks for cc'ing the other folks. I help run the Node.js release + LTS team... 
so I 100% understand the balance necessary to keep a stable API. In this 
particular case I would gauge that this has a near 0 case for breakage, but 
leaving it unpatched has a high risk of breaking user expectations

https://github.com/search?q=extension%3Amjs+function&type=Code

This is a really heavy handed search against github showing 13k+ files with the 
.mjs extension that include the word "function"

--

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Myles Borins  added the comment:

There are a number of tutorials that suggest using the .mjs extension for 
working with ESM modules for front end development.

https://developers.google.com/web/fundamentals/primers/modules 
<https://developers.google.com/web/fundamentals/primers/modules>
https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/ 
<https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/>

There are many tutorials that suggest web developers use `python -m 
SimpleHTTPServer` as a way to spin up a quick development server.  If a .mjs 
file is not served with the correct mime type 
<https://html.spec.whatwg.org/multipage/infrastructure.html#javascript-mime-type>
 the browser will throw when trying to load the module, and the error is not 
the most obvious if developers are not aware of what mime types even are.

As such I would like propose that this is a bug fix, rather than a feature, as 
popular browser workflow is going to be broken without an obvious way to fix it 
for anyone using python right now.

> On Dec 5, 2018, at 2:23 PM, Christian Heimes  wrote:
> 
> 
> Christian Heimes  added the comment:
> 
> It's technically a new feature. New features are not added to existing 
> releases unless there is a very compelling reason.
> 
> --
> nosy: +christian.heimes
> 
> ___
> Python tracker 
> <https://bugs.python.org/issue31715>
> ___

--

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Myles Borins  added the comment:

I see that when this landed it appears that it was removed from landing on 
"Python 2.7, Python 3.6, Python 3.7".

Is there any chance to revisit this decision? I dug into the mimetype code and 
it doesn't appear that there is a way to rely on operating system mimetypes for 
systems aside from Windows... as such this is going to be a fairly large 
experience gap for people developing front-end applications that utilize the 
file extension on any version other than 3.8, which will likely take quite a 
while to be distributed as a default in various OS distributions.

--
nosy: +mylesborins

___
Python tracker 
<https://bugs.python.org/issue31715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34875] Change .js mime to "text/javascript"

2018-10-03 Thread Myles Borins


Myles Borins  added the comment:

There is a IETF proposal that would make "text/javascript" no longer obsolete.

Will revisit at the point this lands

https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/

--

___
Python tracker 
<https://bugs.python.org/issue34875>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34875] Change .js mime to "test/javascript"

2018-10-02 Thread Myles Borins


Change by Myles Borins :


--
keywords: +patch
pull_requests: +9066
stage:  -> patch review

___
Python tracker 
<https://bugs.python.org/issue34875>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34875] Change .js mime to "test/javascript"

2018-10-02 Thread Myles Borins


New submission from Myles Borins :

I propose to change the mapping of file extension .js to mime type 
"text/javascript" from "application/javascript.

"text/javascript" is the currently documented best practice in the whatwg HTML 
spec.

https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type

--
components: Library (Lib)
messages: 326920
nosy: mylesborins
priority: normal
severity: normal
status: open
title: Change .js mime to "test/javascript"
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue34875>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com