
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2018-05-09 20:43 byJean-Louis Tamburini, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| dummy.py | Jean-Louis Tamburini,2018-05-15 15:17 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 7884 | merged | ZackerySpytz,2018-06-23 21:37 | |
| PR 7888 | merged | miss-islington,2018-06-24 03:15 | |
| PR 7889 | merged | miss-islington,2018-06-24 03:16 | |
| Messages (7) | |||
|---|---|---|---|
| msg316330 -(view) | Author: Jean-Louis Tamburini (Jean-Louis Tamburini)* | Date: 2018-05-09 20:43 | |
Python v3.6.4:d48ecebWindows 10.0.16299I search on Internet and I don't find why Python Interpreter (v3.6.4) do that. With python 2.7, I don't have this "problem".When I launch script like : c:\Python364\python.exe compile.pyWhile the execution, I can rename/modify the file "compile.py". But, when I compile the file to .pyc (with py_compile with an another script), and I launch the pyc like :c:\Python364\python.exe dummy.pycWhile the execution, I CAN'T rename/modify the file because is locked by Python Interpreter. It's normal ? | |||
| msg316667 -(view) | Author: Jean-Louis Tamburini (Jean-Louis Tamburini)* | Date: 2018-05-15 15:17 | |
Same for python v3.6.5:f59c0932b4 | |||
| msg316832 -(view) | Author: Brett Cannon (brett.cannon)*![]() | Date: 2018-05-16 16:24 | |
There's no specific reason as to why that would happen as no files are kept open after importing is finished. | |||
| msg316843 -(view) | Author: Eryk Sun (eryksun)*![]() | Date: 2018-05-16 17:00 | |
InPython/pythonrun.c, PyRun_SimpleFileExFlags() reopens the PYC file in binary mode, passes it to run_pyc_file(), and only closes it after executing the script. The file should instead be closed in run_pyc_file(), before calling PyEval_EvalCode(). | |||
| msg320346 -(view) | Author: Alyssa Coghlan (ncoghlan)*![]() | Date: 2018-06-24 03:15 | |
New changesetea737751b10fff752aafed0231e8a02b82ba365d by Nick Coghlan (Zackery Spytz) in branch 'master':bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884)https://github.com/python/cpython/commit/ea737751b10fff752aafed0231e8a02b82ba365d | |||
| msg320349 -(view) | Author: miss-islington (miss-islington) | Date: 2018-06-24 03:31 | |
New changeset56aaef0ddba6275b8043b58433739a64497f33b4 by Miss Islington (bot) in branch '3.7':bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884)https://github.com/python/cpython/commit/56aaef0ddba6275b8043b58433739a64497f33b4 | |||
| msg323518 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2018-08-14 13:16 | |
All PRs have been merged (commit message from the 3.6 branch doesn't listed here butPR 7889 has been merged inhttps://github.com/python/cpython/commit/8f8ad2c38237caf5ee48f690289e8c811d245455) Closing this as 'fixed'. Please reopen if this issue needs to stay open. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:00 | admin | set | github: 77632 |
| 2018-08-14 13:16:53 | berker.peksag | set | status: open -> closed nosy: +berker.peksag messages: +msg323518 resolution: fixed stage: patch review -> resolved |
| 2018-06-24 03:31:23 | miss-islington | set | nosy: +miss-islington messages: +msg320349 |
| 2018-06-24 03:16:43 | miss-islington | set | pull_requests: +pull_request7497 |
| 2018-06-24 03:15:56 | miss-islington | set | pull_requests: +pull_request7496 |
| 2018-06-24 03:15:27 | ncoghlan | set | messages: +msg320346 |
| 2018-06-23 21:37:51 | ZackerySpytz | set | keywords: +patch stage: patch review pull_requests: +pull_request7493 |
| 2018-05-16 17:00:04 | eryksun | set | nosy: +eryksun messages: +msg316843 versions: + Python 3.7, Python 3.8 |
| 2018-05-16 16:24:58 | brett.cannon | set | messages: +msg316832 |
| 2018-05-15 22:21:30 | pitrou | set | nosy: +brett.cannon,paul.moore,ncoghlan,tim.golden,eric.snow,zach.ware,steve.dower |
| 2018-05-15 15:17:03 | Jean-Louis Tamburini | set | files: +dummy.py messages: +msg316667 |
| 2018-05-09 20:43:58 | Jean-Louis Tamburini | create | |