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
7c9875c3
Kaydet (Commit)
7c9875c3
authored
Mar 04, 2009
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move importlib over to _io.
üst
771ae965
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
_bootstrap.py
Lib/importlib/_bootstrap.py
+5
-5
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
7c9875c3
...
@@ -7,8 +7,8 @@ work. One should use importlib as the public-facing version of this module.
...
@@ -7,8 +7,8 @@ work. One should use importlib as the public-facing version of this module.
"""
"""
# Injected modules are '_warnings', 'imp', 'sys', 'marshal', 'errno',
and '_os'
# Injected modules are '_warnings', 'imp', 'sys', 'marshal', 'errno',
'_io',
# (a.k.a. 'posix', 'nt' or 'os2').
#
and '_os'
(a.k.a. 'posix', 'nt' or 'os2').
# Injected attribute is path_sep.
# Injected attribute is path_sep.
#
#
# When editing this code be aware that code executed at import time CANNOT
# When editing this code be aware that code executed at import time CANNOT
...
@@ -473,7 +473,7 @@ class PyFileLoader(PyLoader):
...
@@ -473,7 +473,7 @@ class PyFileLoader(PyLoader):
if
source_path
is
None
:
if
source_path
is
None
:
return
None
return
None
import
tokenize
import
tokenize
with
closing
(
_io
.
FileIO
(
source_path
,
'r'
))
as
file
:
with
closing
(
_io
.
FileIO
(
source_path
,
'r'
))
as
file
:
# Assuming bytes.
encoding
,
lines
=
tokenize
.
detect_encoding
(
file
.
readline
)
encoding
,
lines
=
tokenize
.
detect_encoding
(
file
.
readline
)
# XXX Will fail when passed to compile() if the encoding is
# XXX Will fail when passed to compile() if the encoding is
# anything other than UTF-8.
# anything other than UTF-8.
...
@@ -482,7 +482,7 @@ class PyFileLoader(PyLoader):
...
@@ -482,7 +482,7 @@ class PyFileLoader(PyLoader):
def
get_data
(
self
,
path
):
def
get_data
(
self
,
path
):
"""Return the data from path as raw bytes."""
"""Return the data from path as raw bytes."""
return
_
fileio
.
_FileIO
(
path
,
'r'
)
.
read
()
return
_
io
.
FileIO
(
path
,
'r'
)
.
read
()
# Assuming bytes.
@check_name
@check_name
def
is_package
(
self
,
fullname
):
def
is_package
(
self
,
fullname
):
...
@@ -527,7 +527,7 @@ class PyPycFileLoader(PyPycLoader, PyFileLoader):
...
@@ -527,7 +527,7 @@ class PyPycFileLoader(PyPycLoader, PyFileLoader):
bytecode_path
=
self
.
bytecode_path
(
name
)
bytecode_path
=
self
.
bytecode_path
(
name
)
if
not
bytecode_path
:
if
not
bytecode_path
:
bytecode_path
=
self
.
_base_path
+
suffix_list
(
imp
.
PY_COMPILED
)[
0
]
bytecode_path
=
self
.
_base_path
+
suffix_list
(
imp
.
PY_COMPILED
)[
0
]
file
=
_io
.
FileIO
(
bytecode_path
,
'w'
)
file
=
_io
.
FileIO
(
bytecode_path
,
'w'
)
# Assuming bytes.
try
:
try
:
with
closing
(
file
)
as
bytecode_file
:
with
closing
(
file
)
as
bytecode_file
:
bytecode_file
.
write
(
data
)
bytecode_file
.
write
(
data
)
...
...
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