Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue33451

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Start pyc file lock the file
Type:behaviorStage:resolved
Components:Interpreter CoreVersions:Python 3.8, Python 3.7, Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: Jean-Louis Tamburini, berker.peksag, brett.cannon, eric.snow, eryksun, miss-islington, ncoghlan, paul.moore, steve.dower, tim.golden, zach.ware
Priority:normalKeywords:patch

Created on2018-05-09 20:43 byJean-Louis Tamburini, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
dummy.pyJean-Louis Tamburini,2018-05-15 15:17
Pull Requests
URLStatusLinkedEdit
PR 7884mergedZackerySpytz,2018-06-23 21:37
PR 7888mergedmiss-islington,2018-06-24 03:15
PR 7889mergedmiss-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)*(Python committer)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)*(Python triager)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)*(Python committer)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)*(Python committer)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
DateUserActionArgs
2022-04-11 14:59:00adminsetgithub: 77632
2018-08-14 13:16:53berker.peksagsetstatus: open -> closed

nosy: +berker.peksag
messages: +msg323518

resolution: fixed
stage: patch review -> resolved
2018-06-24 03:31:23miss-islingtonsetnosy: +miss-islington
messages: +msg320349
2018-06-24 03:16:43miss-islingtonsetpull_requests: +pull_request7497
2018-06-24 03:15:56miss-islingtonsetpull_requests: +pull_request7496
2018-06-24 03:15:27ncoghlansetmessages: +msg320346
2018-06-23 21:37:51ZackerySpytzsetkeywords: +patch
stage: patch review
pull_requests: +pull_request7493
2018-05-16 17:00:04eryksunsetnosy: +eryksun

messages: +msg316843
versions: + Python 3.7, Python 3.8
2018-05-16 16:24:58brett.cannonsetmessages: +msg316832
2018-05-15 22:21:30pitrousetnosy: +brett.cannon,paul.moore,ncoghlan,tim.golden,eric.snow,zach.ware,steve.dower
2018-05-15 15:17:03Jean-Louis Tamburinisetfiles: +dummy.py

messages: +msg316667
2018-05-09 20:43:58Jean-Louis Tamburinicreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp