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
0515619d
Kaydet (Commit)
0515619d
authored
Şub 21, 2009
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Tweak the source/bytecode loader from importlib to use more of the PEP 302
protocol API.
üst
4afab6b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
NOTES
Lib/importlib/NOTES
+2
-0
_bootstrap.py
Lib/importlib/_bootstrap.py
+1
-3
No files found.
Lib/importlib/NOTES
Dosyayı görüntüle @
0515619d
...
...
@@ -7,6 +7,7 @@ to do
+ PyLoader (for ABC)
- load_module for source only
- get_code for source only
+ PyFileLoader(PyLoader)
...
...
@@ -17,6 +18,7 @@ to do
+PyPycLoader (PyLoader, for ABC)
- load_module for source and bytecode
- get_code for source and bytecode
+ PyPycFileLoader(PyPycLoader, PyFileLoader)
...
...
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
0515619d
...
...
@@ -361,7 +361,6 @@ class _PyFileLoader:
# Not a property for easy overriding.
return
self
.
_find_path
(
imp
.
PY_COMPILED
)
@check_name
@module_for_loader
def
load_module
(
self
,
module
):
"""Load a Python source or bytecode module."""
...
...
@@ -371,7 +370,7 @@ class _PyFileLoader:
code_object
=
self
.
get_code
(
module
.
__name__
)
module
.
__file__
=
source_path
if
source_path
else
bytecode_path
module
.
__loader__
=
self
if
self
.
_is_pkg
:
if
self
.
is_package
(
name
)
:
module
.
__path__
=
[
module
.
__file__
.
rsplit
(
path_sep
,
1
)[
0
]]
module
.
__package__
=
module
.
__name__
if
not
hasattr
(
module
,
'__path__'
):
...
...
@@ -429,7 +428,6 @@ class _PyFileLoader:
else
:
raise
@check_name
def
get_code
(
self
,
name
):
"""Return the code object for the module."""
# XXX Care enough to make sure this call does not happen if the magic
...
...
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