| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Adds `load_package_tests` function to test.support, uses it in test_asyncio,
test_email, test_json, test_tools, test_importlib and all test_importlib
sub-packages to implement test discovery.
|
| |\ |
|
| | |
| |
| |
| | |
Patch by Berker Peksag.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
unittest.TestCase in prep of running tests under frozen and source
importlib.
|
| |\ \
| |/
| |
| | |
now detect Python source code encoding only in comment lines.
|
| | |
| |
| |
| | |
now detect Python source code encoding only in comment lines.
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/
| |
| |
| | |
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
|
| | |
| |
| |
| |
| | |
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
|
| | |
| |
| |
| |
| |
| | |
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
importlib.abc.Loader.init_module_attrs() and implement
importlib.abc.InspectLoader.load_module().
The importlib.abc.Loader.init_module_attrs() method sets the various
attributes on the module being loaded. It is done unconditionally to
support reloading. Typically people used
importlib.util.module_for_loader, but since that's a decorator there
was no way to override it's actions, so init_module_attrs() came into
existence to allow for overriding. This is also why module_for_loader
is now pending deprecation (having its other use replaced by
importlib.util.module_to_load).
All of this allowed for importlib.abc.InspectLoader.load_module() to
be implemented. At this point you can now implement a loader with
nothing more than get_code() (which only requires get_source();
package support requires is_package()). Thanks to init_module_attrs()
the implementation of load_module() is basically a context manager
containing 2 methods calls, a call to exec(), and a return statement.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the default exception/value when called instead of raising/returning
NotimplementedError/NotImplemented (except where appropriate).
This should allow for the ABCs to act as the bottom/end of the MRO with expected
default results.
As part of this work, also make importlib.abc.Loader.module_repr()
optional instead of an abstractmethod.
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
importlib.machinery.FileFinder when the directory has become
unreadable or a file. This brings semantics in line with Python 3.2
import.
Reported and diagnosed by David Pritchard.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
added
to importlib.abc.SourceLoader.
|
| | |
| |
| |
| |
| |
| |
| | |
importlib.abc.SourceLoader.
This provides an easy hook into the import system to allow for source
transformations, AST optimizations, etc.
|
| |/
|
|
| |
Patch by Taras Lyapun.
|
| | |
|
| |
|
|
|
| |
module again. Also took the opportunity to stop accidentally exporting
_imp.extension_suffixes() as public.
|
| |
|
|
| |
the import protocols given PEP 420. Original patch by Eric Snow.
|
| | |
|
|
|
This should make the Linux distros happy as it is now easier to leave
importlib's tests out of their base Python distribution.
|