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
82d21076
Kaydet (Commit)
82d21076
authored
Haz 15, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #17177: switch from imp.new_module to types.ModuleType for runpy
üst
f4ba4ec1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
runpy.py
Lib/runpy.py
+2
-1
No files found.
Lib/runpy.py
Dosyayı görüntüle @
82d21076
...
...
@@ -14,6 +14,7 @@ import os
import
sys
import
importlib.machinery
# importlib first so we can test #15386 via -m
import
imp
import
types
from
pkgutil
import
read_code
,
get_loader
,
get_importer
__all__
=
[
...
...
@@ -24,7 +25,7 @@ class _TempModule(object):
"""Temporarily replace a module in sys.modules with an empty namespace"""
def
__init__
(
self
,
mod_name
):
self
.
mod_name
=
mod_name
self
.
module
=
imp
.
new_modul
e
(
mod_name
)
self
.
module
=
types
.
ModuleTyp
e
(
mod_name
)
self
.
_saved_module
=
[]
def
__enter__
(
self
):
...
...
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