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
51794455
Kaydet (Commit)
51794455
authored
Eki 03, 2013
tarafından
Eric Snow
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[issue19152] Add ExtensionFileLoader.get_filename().
üst
e8bbfebe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
1 deletion
+14
-1
importlib.rst
Doc/library/importlib.rst
+5
-1
_bootstrap.py
Lib/importlib/_bootstrap.py
+5
-0
abc.py
Lib/importlib/abc.py
+2
-0
NEWS
Misc/NEWS
+2
-0
importlib.h
Python/importlib.h
+0
-0
No files found.
Doc/library/importlib.rst
Dosyayı görüntüle @
51794455
...
@@ -836,7 +836,7 @@ find and load modules.
...
@@ -836,7 +836,7 @@ find and load modules.
.. class:: ExtensionFileLoader(fullname, path)
.. class:: ExtensionFileLoader(fullname, path)
A concrete implementation of :class:`importlib.abc.
Inspect
Loader` for
A concrete implementation of :class:`importlib.abc.
Execution
Loader` for
extension modules.
extension modules.
The *fullname* argument specifies the name of the module the loader is to
The *fullname* argument specifies the name of the module the loader is to
...
@@ -870,6 +870,10 @@ find and load modules.
...
@@ -870,6 +870,10 @@ find and load modules.
Returns ``None`` as extension modules do not have source code.
Returns ``None`` as extension modules do not have source code.
.. method:: get_filename(fullname)
Returns :attr:`path`.
:mod:`importlib.util` -- Utility code for importers
:mod:`importlib.util` -- Utility code for importers
---------------------------------------------------
---------------------------------------------------
...
...
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
51794455
...
@@ -1171,6 +1171,11 @@ class ExtensionFileLoader:
...
@@ -1171,6 +1171,11 @@ class ExtensionFileLoader:
"""Return None as extension modules have no source code."""
"""Return None as extension modules have no source code."""
return
None
return
None
@_check_name
def
get_filename
(
self
,
fullname
):
"""Return the path to the source file as found by the finder."""
return
self
.
path
class
_NamespacePath
:
class
_NamespacePath
:
"""Represents a namespace package's path. It uses the module name
"""Represents a namespace package's path. It uses the module name
...
...
Lib/importlib/abc.py
Dosyayı görüntüle @
51794455
...
@@ -237,6 +237,8 @@ class ExecutionLoader(InspectLoader):
...
@@ -237,6 +237,8 @@ class ExecutionLoader(InspectLoader):
super
()
.
init_module_attrs
(
module
)
super
()
.
init_module_attrs
(
module
)
_bootstrap
.
_init_file_attrs
(
self
,
module
)
_bootstrap
.
_init_file_attrs
(
self
,
module
)
_register
(
machinery
.
ExtensionFileLoader
)
class
FileLoader
(
_bootstrap
.
FileLoader
,
ResourceLoader
,
ExecutionLoader
):
class
FileLoader
(
_bootstrap
.
FileLoader
,
ResourceLoader
,
ExecutionLoader
):
...
...
Misc/NEWS
Dosyayı görüntüle @
51794455
...
@@ -361,6 +361,8 @@ Library
...
@@ -361,6 +361,8 @@ Library
-
Issue
#
19951
:
Fix
docstring
and
use
of
_get_suppported_file_loaders
()
to
-
Issue
#
19951
:
Fix
docstring
and
use
of
_get_suppported_file_loaders
()
to
reflect
2
-
tuples
.
reflect
2
-
tuples
.
-
Issue
#
19152
:
Add
ExtensionFileLoader
.
get_filename
().
-
Issue
#
18676
:
Change
'positive'
to
'non-negative'
in
queue
.
py
put
and
get
-
Issue
#
18676
:
Change
'positive'
to
'non-negative'
in
queue
.
py
put
and
get
docstrings
and
ValueError
messages
.
Patch
by
Zhongyue
Luo
docstrings
and
ValueError
messages
.
Patch
by
Zhongyue
Luo
...
...
Python/importlib.h
Dosyayı görüntüle @
51794455
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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