◐ Shell
clean mode source ↗

Message 168624 - Python tracker

Hi I made the following patch for this issue.

It addresses the #2051 security bug. So the .pyc and .pyo files are created using the same permission as .py

The MS_WINDOWS version will chmod the permission of .pyc and .pyo files to write accessible before deleting them.

I have also created a test for it. This test needs cleaning up, because it is the first time I have written a test for cpython. I would love to have a look at the final committed test so I can learn how to make it better next time. I will also be happy to keep extending that test to make sure it covers more cases.

A great big thanks to Nick for your help!