[Python-checkins] bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)

Miss Islington (bot) webhook-mailer at python.org
Tue May 19 08:41:16 EDT 2020


https://github.com/python/cpython/commit/076da79bc75b9aac8b7bc9685253fa7162c25698
commit: 076da79bc75b9aac8b7bc9685253fa7162c25698
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-05-19T05:41:07-07:00
summary:

bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)


Use text/x-python instead of text/plain to avoid issues with tools assuming that "ShellExecute(script)" is a non-executable operation.
(cherry picked from commit 8c862e51248c5ebfec787badec88eb58c9267e1e)

Co-authored-by: Zackery Spytz <zspytz at gmail.com>

files:
M Tools/msi/launcher/launcher_reg.wxs

diff --git a/Tools/msi/launcher/launcher_reg.wxs b/Tools/msi/launcher/launcher_reg.wxs
index dace97ee58bb7..e8d9d24d43fa8 100644
--- a/Tools/msi/launcher/launcher_reg.wxs
+++ b/Tools/msi/launcher/launcher_reg.wxs
@@ -6,14 +6,14 @@
                 <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="AssociateFiles" Value="1" Type="integer" />
                 
                 <ProgId Id="Python.File" Description="!(loc.PythonFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
-                    <Extension Id="py" ContentType="text/plain">
+                    <Extension Id="py" ContentType="text/x-python">
                         <Verb Id="open" TargetFile="py.exe" Argument=""%L" %*" />
                     </Extension>
                 </ProgId>
                 <RegistryValue Root="HKCR" Key="Python.File\shellex\DropHandler" Value="{BEA218D2-6950-497B-9434-61683EC065FE}" Type="string" />
                 
                 <ProgId Id="Python.NoConFile" Description="!(loc.PythonNoConFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
-                    <Extension Id="pyw" ContentType="text/plain">
+                    <Extension Id="pyw" ContentType="text/x-python">
                         <Verb Id="open" TargetFile="pyw.exe" Argument=""%L" %*" />
                     </Extension>
                 </ProgId>



More information about the Python-checkins mailing list