This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix file association MIME type on Windows
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, mhammond, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2020-02-14 08:49 by steve.dower, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20205 merged ZackerySpytz, 2020-05-19 03:40
PR 20216 merged miss-islington, 2020-05-19 12:20
PR 20219 merged miss-islington, 2020-05-19 12:23
PR 20220 merged miss-islington, 2020-05-19 12:23
PR 20227 merged steve.dower, 2020-05-19 13:44
PR 20241 merged miss-islington, 2020-05-19 22:10
PR 20242 merged miss-islington, 2020-05-19 22:10
PR 20243 merged miss-islington, 2020-05-19 22:11
Messages (11)
msg361989 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-02-14 08:49
The installer for Windows creates file associations in Tools/msi/launcher/launcher_reg.wxs that identify ".py[w]" files as text/plain.

This is inconsistent with the mimetypes module, which uses text/x-python, and may cause some applications to assume that calling ShellExecute on a .py file will open a text editor rather than executing the script.

We should update the MIME type to text/x-python. This can be backported, as the change is in the launcher and isn't tied to the usual upgrade paths anyway.
msg361990 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-02-14 08:51
The most likely negative potential impact of this would be for any users who have added additional verbs based on the content type. I don't recall whether we set PerceivedType or not, but that can probably stay.

I'm not aware of any applications (besides Windows itself) that set verbs based on content type rather than extensions, so I doubt anyone will be too upset.
msg369339 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-05-19 12:20
New changeset 8c862e51248c5ebfec787badec88eb58c9267e1e by Zackery Spytz in branch 'master':
bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)
https://github.com/python/cpython/commit/8c862e51248c5ebfec787badec88eb58c9267e1e
msg369342 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-05-19 12:25
Actually, now that I've gone and hit merge, I've changed my mind about the NEWS entry. I'll add it.
msg369345 - (view) Author: miss-islington (miss-islington) Date: 2020-05-19 12:39
New changeset c06983bc30e02700552c91be45559ca27fabc08e by Miss Islington (bot) in branch '3.9':
bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)
https://github.com/python/cpython/commit/c06983bc30e02700552c91be45559ca27fabc08e
msg369347 - (view) Author: miss-islington (miss-islington) Date: 2020-05-19 12:41
New changeset 076da79bc75b9aac8b7bc9685253fa7162c25698 by Miss Islington (bot) in branch '3.7':
bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)
https://github.com/python/cpython/commit/076da79bc75b9aac8b7bc9685253fa7162c25698
msg369348 - (view) Author: miss-islington (miss-islington) Date: 2020-05-19 12:42
New changeset 46fc3ec056ff7ce65e9b96f14bd0b06aa1d0c62d by Miss Islington (bot) in branch '3.8':
bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)
https://github.com/python/cpython/commit/46fc3ec056ff7ce65e9b96f14bd0b06aa1d0c62d
msg369397 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-05-19 22:10
New changeset 92327a9913150f5bb55b2727a2c5d50f9b7b6e55 by Steve Dower in branch 'master':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/92327a9913150f5bb55b2727a2c5d50f9b7b6e55
msg369399 - (view) Author: miss-islington (miss-islington) Date: 2020-05-19 22:17
New changeset 67bbb5d4381b6121a4f61ba945c58056e5894846 by Miss Islington (bot) in branch '3.7':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/67bbb5d4381b6121a4f61ba945c58056e5894846
msg369400 - (view) Author: miss-islington (miss-islington) Date: 2020-05-19 22:19
New changeset 381ceeaa5980643fa1f958f112f373d7a197e6e8 by Miss Islington (bot) in branch '3.8':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/381ceeaa5980643fa1f958f112f373d7a197e6e8
msg369663 - (view) Author: miss-islington (miss-islington) Date: 2020-05-22 22:29
New changeset 1e5cf949ce36b6fe45db0e5e4a26c856c3b44278 by Miss Islington (bot) in branch '3.9':
[3.9] bpo-39631: Adds NEWS entry (GH-20227) (GH-20241)
https://github.com/python/cpython/commit/1e5cf949ce36b6fe45db0e5e4a26c856c3b44278
History
Date User Action Args
2022-04-11 14:59:26adminsetgithub: 83812
2020-05-22 22:29:17miss-islingtonsetmessages: + msg369663
2020-05-19 22:19:32miss-islingtonsetmessages: + msg369400
2020-05-19 22:17:14miss-islingtonsetmessages: + msg369399
2020-05-19 22:11:47steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-05-19 22:11:00miss-islingtonsetpull_requests: + pull_request19531
2020-05-19 22:10:50miss-islingtonsetpull_requests: + pull_request19530
2020-05-19 22:10:41miss-islingtonsetpull_requests: + pull_request19529
2020-05-19 22:10:10steve.dowersetmessages: + msg369397
2020-05-19 13:44:16steve.dowersetpull_requests: + pull_request19518
2020-05-19 12:42:59miss-islingtonsetmessages: + msg369348
2020-05-19 12:41:15miss-islingtonsetmessages: + msg369347
2020-05-19 12:39:23miss-islingtonsetmessages: + msg369345
2020-05-19 12:25:32steve.dowersetmessages: + msg369342
2020-05-19 12:23:12miss-islingtonsetpull_requests: + pull_request19515
2020-05-19 12:23:02miss-islingtonsetpull_requests: + pull_request19514
2020-05-19 12:20:57miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request19511
2020-05-19 12:20:43steve.dowersetmessages: + msg369339
2020-05-19 03:40:26ZackerySpytzsetkeywords: + patch
nosy: + ZackerySpytz

pull_requests: + pull_request19502
stage: needs patch -> patch review
2020-02-14 11:44:39mhammondsetnosy: + mhammond
2020-02-14 08:51:42steve.dowersetmessages: + msg361990
2020-02-14 08:49:42steve.dowercreate