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.
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r74107 | brett.cannon | 2009-07-19 20:19:18 -0700 (Sun, 19 Jul 2009) | 8 lines
Importlib's documentation said that importlib.abc.PyLoader inherited from
importlib.abc.ResourceLoader, when in fact it did not. Fixed the ABC to inherit
as documented.
This does in introduce an backwards-incompatiblity as the code in PyLoader
already required the single method ResourceLoader defined as an abstract
method.
........
importlib.abc.ResourceLoader, when in fact it did not. Fixed the ABC to inherit
as documented.
This doesn't introduce an backwards-incompatiblity as the code in PyLoader
already required the single method ResourceLoader defined as an abstract
method.
when a loader is given missing or bad code object bytecode. Unfortunately an
exception related to source paths was masking what the proper exception to test
should be. Making the test explicitly set the environment fixed the test.
The code being test was not affected.
case-sensitive filesystems -- which is not the default case. Along the way also
fixed the skipping of tests when sys.dont_write_bytecode is true.
Closes issue #5442 again.
entries in sys.path_importer_cache. While this differs from semantics in how
__import__ works, it prevents any implicit semantics from taking hold with
users.
(mostly stuff specified by PEP 302). There are two ABCs, PyLoader and
PyPycLoader, which help with implementing source and source/bytecode loaders by
implementing load_module in terms of other methods. This removes a lot of
gritty details loaders typically have to worry about.
+ Ditch using arguments to super().
+ Ditch subclassing from object directly.
+ Move directory check out of chaining path hook to file path hook/finder.
+ Rename some classes to better reflect they are finders, not importers.
load failure in relation to reloads. Also expose
importlib.util.module_for_loader to handle all of the details of this along
with making sure all current loaders behave nicely.
and relies much more on meta path finders to abstract out various parts of
import.
As part of this the semantics for import_module tightened up and now follow
__import__ much more closely (biggest thing is that the 'package' argument must
now already be imported, else a SystemError is raised).
FrozenImporter. Docs forthcoming.
I plan on all finders and loaders (and most likely hooks) to live
in imoprtlib.machinery. Utility stuff will end up in importlib.util.
Higher-level API stuff will stay on imoprtlib directly (e.g. import_module).
case-insensitive file system, leading to test failures. This was due to using
the TestCase objects directly instead of the guard in the test_main() function.
Move over to a class decorator instead to control if the tests should be run.