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
4a2e1a0d
Kaydet (Commit)
4a2e1a0d
authored
Şub 09, 2012
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Undo a bad mq management thingy.
üst
97771096
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
44 deletions
+0
-44
_bootstrap.py
Lib/importlib/_bootstrap.py
+0
-44
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
4a2e1a0d
...
...
@@ -1038,47 +1038,3 @@ def _setup(sys_module, imp_module):
raise
ImportError
(
'importlib requires posix or nt'
)
setattr
(
self_module
,
'_os'
,
os_module
)
setattr
(
self_module
,
'path_sep'
,
path_sep
)
def
_setup
(
sys_module
,
imp_module
):
"""Setup importlib by importing needed built-in modules and injecting them
into the global namespace.
As sys is needed for sys.modules access and imp is needed to load built-in
modules those two modules must be explicitly passed in.
"""
global
imp
,
sys
imp
=
imp_module
sys
=
sys_module
for
module
in
(
imp
,
sys
):
if
not
hasattr
(
module
,
'__loader__'
):
module
.
__loader__
=
BuiltinImporter
self_module
=
sys
.
modules
[
__name__
]
for
builtin_name
in
(
'_io'
,
'_warnings'
,
'builtins'
,
'marshal'
):
if
builtin_name
not
in
sys
.
modules
:
builtin_module
=
BuiltinImporter
.
load_module
(
builtin_name
)
else
:
builtin_module
=
sys
.
modules
[
builtin_name
]
setattr
(
self_module
,
builtin_name
,
builtin_module
)
for
builtin_os
,
path_sep
in
[(
'posix'
,
'/'
),
(
'nt'
,
'
\\
'
),
(
'os2'
,
'
\\
'
)]:
if
builtin_os
in
sys
.
modules
:
os_module
=
sys
.
modules
[
builtin_os
]
break
else
:
try
:
os_module
=
BuiltinImporter
.
load_module
(
builtin_os
)
# TODO: rip out os2 code after 3.3 is released as per PEP 11
if
builtin_os
==
'os2'
and
'EMX GCC'
in
sys
.
version
:
path_sep
=
'/'
break
except
ImportError
:
continue
else
:
raise
ImportError
(
'importlib requires posix or nt'
)
setattr
(
self_module
,
'_os'
,
os_module
)
setattr
(
self_module
,
'path_sep'
,
path_sep
)
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