mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Implement the PEP 302 protocol for get_filename() as
importlib.abc.ExecutionLoader. PyLoader now inherits from this ABC instead of InspectLoader directly. Both PyLoader and PyPycLoader provide concrete implementations of get_filename in terms of source_path and bytecode_path.
This commit is contained in:
parent
64ef00fa60
commit
6919427e94
6 changed files with 136 additions and 27 deletions
|
|
@ -53,9 +53,15 @@ class InspectLoader(InheritanceTests, unittest.TestCase):
|
|||
machinery.FrozenImporter]
|
||||
|
||||
|
||||
class ExecutionLoader(InheritanceTests, unittest.TestCase):
|
||||
|
||||
superclasses = [abc.InspectLoader]
|
||||
subclasses = [abc.PyLoader]
|
||||
|
||||
|
||||
class PyLoader(InheritanceTests, unittest.TestCase):
|
||||
|
||||
superclasses = [abc.Loader, abc.ResourceLoader, abc.InspectLoader]
|
||||
superclasses = [abc.Loader, abc.ResourceLoader, abc.ExecutionLoader]
|
||||
|
||||
|
||||
class PyPycLoader(InheritanceTests, unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue