bpo-31715 Add mimetype for extension .mjs by bmeck · Pull Request #3908 · python/cpython
Hello, and thanks for your contribution!
I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).
Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.
Thanks again to your contribution and we look forward to looking at it!
@MylesBorins The news entry lgtm. If @bmeck ended up accepting your PR, then you should sign Python's CLA too.
And we'll need to make sure to add Co-authored by: in the commit message of this PR. (The committer will do this).
Hello, and thanks for your contribution!
I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).
Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.
You can check yourself to see if the CLA has been received.
Thanks again for your contribution, we look forward to reviewing it!
I'll leave the argument to someone more familiar with RFC details on mimetypes (there are 3+ RFCs on this), but I think we should maintain consistency between our support of .js and .mjs files.
Currently, .js files are application/javascript, but this proposes to add .mjs as text/javascript, which is seemingly obsolete for modern browsers.
@MylesBorins or @bmeck, do you see a reason to support text/javascript instead of application/javascript?
Sounds good, I'd make the argument that both should use text/javascript then. I'll keep an eye on this if you don't get a response from the email team code owners soon.
| '.mht' : 'message/rfc822', | ||
| '.mhtml' : 'message/rfc822', | ||
| '.mif' : 'application/x-mif', | ||
| '.mjs' : 'text/javascript', |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be application/javascript for consistency with .js
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text/javascript is correct, and .js should be changed to use it as well. Please see the discussion above. #3908 (comment)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-reading this, it sounds like you are open to that. That’s great! I look forward to Python supporting mjs, and eventually serving it as text/javascript.
Thanks for making the requested changes!
@asvetlov: please review the changes made to this pull request.
| Add mimetype for file extension ``.mjs``. This will allow ``python -m`` to | ||
| support applications attempting to load ECMAScript Modules with the ``.mjs`` | ||
| extension. | ||
| Assiciate ``.mjs`` file extension with ``application/javascript`` MIME Type. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Associate
@asvetlov: Please replace # with GH- in the commit message next time. Thanks!
MylesBorins pushed a commit to MylesBorins/cpython that referenced this pull request
(cherry picked from commit 0854b92)
MylesBorins pushed a commit to MylesBorins/cpython that referenced this pull request
(cherry picked from commit 0854b92)
This was referenced
ned-deily pushed a commit that referenced this pull request
(cherry picked from commit 0854b92)
ned-deily pushed a commit that referenced this pull request
(cherry picked from commit 0854b92)
This was referenced