Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
c841bb6b
Kaydet (Commit)
c841bb6b
authored
Mar 24, 2006
tarafından
Nick Coghlan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
run_module shouldn't hold the import lock when running a script
üst
cdb7948f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
runpy.py
Lib/runpy.py
+9
-13
No files found.
Lib/runpy.py
Dosyayı görüntüle @
c841bb6b
...
...
@@ -379,21 +379,17 @@ def _run_module_code(code, init_globals=None,
restore_module
=
mod_name
in
sys
.
modules
if
restore_module
:
saved_module
=
sys
.
modules
[
mod_name
]
imp
.
acquire_lock
()
sys
.
argv
[
0
]
=
mod_fname
sys
.
modules
[
mod_name
]
=
temp_module
try
:
sys
.
argv
[
0
]
=
mod_fname
sys
.
modules
[
mod_name
]
=
temp_module
try
:
_run_code
(
code
,
mod_globals
,
init_globals
,
mod_name
,
mod_fname
,
mod_loader
)
finally
:
sys
.
argv
[
0
]
=
saved_argv0
if
restore_module
:
sys
.
modules
[
mod_name
]
=
saved_module
else
:
del
sys
.
modules
[
mod_name
]
_run_code
(
code
,
mod_globals
,
init_globals
,
mod_name
,
mod_fname
,
mod_loader
)
finally
:
imp
.
release_lock
()
sys
.
argv
[
0
]
=
saved_argv0
if
restore_module
:
sys
.
modules
[
mod_name
]
=
saved_module
else
:
del
sys
.
modules
[
mod_name
]
# Copy the globals of the temporary module, as they
# may be cleared when the temporary module goes away
return
mod_globals
.
copy
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment