Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Importlib was not matching import's handling of .pyc files where it had less | Brett Cannon | 2010-02-19 | 2 | -29/+109 |
| | | | | | | then 8 bytes total in the file. Fixes issues 7361 & 7875. | ||||
* | Clarify importlib.abc.PyPycLoader.write_bytecode(). | Brett Cannon | 2009-12-12 | 1 | -2/+3 |
| | |||||
* | no need to translate newlines in python code anymore | Benjamin Peterson | 2009-11-13 | 1 | -15/+0 |
| | |||||
* | When trying to write new bytecode, importlib was not catching the IOError | Brett Cannon | 2009-11-07 | 2 | -2/+28 |
| | | | | | | | thrown if the file happened to be read-only to keep the failure silent. Fixes issue #7187. Thanks, Dave Malcolm for the report and analysis of the problem. | ||||
* | Use tempfile.mkdtemp() instead of tempfile.tempdir for where importlib places | Brett Cannon | 2009-11-05 | 1 | -11/+4 |
| | | | | | | | source files for tests. Allows for concurrent execution of the tests by preventing various executions from trampling each other. Closes issue #7248. | ||||
* | importlib.test.source.util referenced variables in the 'finally' part of a | Brett Cannon | 2009-11-05 | 1 | -2/+6 |
| | | | | try/finally which may not have been set. | ||||
* | Rework importlib benchmarks so that they measure number of executions within a | Brett Cannon | 2009-09-03 | 1 | -51/+52 |
| | | | | | | | | second instead of some fixed number. Keeps benchmark faster by putting a cap on total execution time. Before a run using importlib took longer by some factor, but now it takes roughly the same amount of time as using the built-in __import__. | ||||
* | Clarify why test_import is failing under importlib. | Brett Cannon | 2009-08-30 | 1 | -2/+3 |
| | |||||
* | Trying to import a submodule from another module and not a package was raising | Brett Cannon | 2009-08-30 | 3 | -4/+11 |
| | | | | | | AttributeError in importlib when it should be an ImportError. Found when running importlib against test_runpy. | ||||
* | test_pep3120 is no longer a problem for importlib as the test was tweaked. | Brett Cannon | 2009-08-30 | 1 | -1/+0 |
| | |||||
* | When the globals argument to importlib.__import__() contained any value for | Brett Cannon | 2009-08-30 | 2 | -11/+17 |
| | | | | | | | | __package__, it was used. This was incorrect since it could be set to None to represent the fact that a proper value was unknown. Now None will trigger the calculation for __package__. Discovered when running importlib against test_importhooks. | ||||
* | Turn on verbose2 for importlib.test.regrtest so as to see failures when they ↵ | Brett Cannon | 2009-08-30 | 1 | -2/+1 |
| | | | | occur. | ||||
* | Raise TypeError if the name given to importlib.__import__() lacks an rpartition | Brett Cannon | 2009-08-30 | 3 | -1/+24 |
| | | | | | | | | attribute. Was throwing AttributeError before. Discovered when running test_builtin against importlib. This exception change is specific to importlib.__import__() and does not apply to import_module() as it is being done for compatibility reasons only. | ||||
* | Fix the importlib_only test decorator to work again; don't capture the flag ↵ | Brett Cannon | 2009-08-30 | 1 | -1/+3 |
| | | | | variable as it might change later. | ||||
* | Use the public API, not a private one. | Brett Cannon | 2009-08-30 | 1 | -1/+1 |
| | |||||
* | Allow importlib.__import__ to accept any iterable for fromlist. Discovered when | Brett Cannon | 2009-08-30 | 2 | -2/+10 |
| | | | | running importlib against test___all__. | ||||
* | Provide module docstrings for the two main test drivers in importlib that | Brett Cannon | 2009-08-30 | 2 | -2/+11 |
| | | | | | explain what they are for and how to use command-line arguments to tweak semantics. | ||||
* | Tweak importlib.test.regrtest to only specify the implicit tests to exclude | Brett Cannon | 2009-08-30 | 1 | -4/+6 |
| | | | | | when running entire test suite. Allows normal command-line arguments normally given to test.regrtest to work (e.g. specifying a single test). | ||||
* | Have importlib raise ImportError if None is found in sys.modules. This matches | Brett Cannon | 2009-08-30 | 2 | -5/+20 |
| | | | | current import semantics. | ||||
* | Add a test file to importlib that runs regrtest using importlib.__import__. | Brett Cannon | 2009-08-27 | 1 | -0/+33 |
| | | | | | | | | | The file must be run using runpy. Certain tests are currently excluded from being run as they have known failures based on golden value checks that fail for various reasons (typically because __loader__ is not expected to be set on modules). Running the tests with this file does discover some incompatibilites in importlib that will be fixed in the near future (as noted currently in the docstring). | ||||
* | Add support for a --builtin argument to importlib.test to trigger running | Brett Cannon | 2009-08-27 | 1 | -0/+5 |
| | | | | import-specific tests with __import__ instead of importlib. | ||||
* | Move over to using assertRaises as a context manager for importlib tests. | Brett Cannon | 2009-08-27 | 9 | -24/+36 |
| | | | | | Obviously one shouldn't do whole sale conversions like this, but I was already going through the test code and I was bored at the airport. | ||||
* | Make __package__ setting tests specific to importlib. Also move to ↵ | Brett Cannon | 2009-08-27 | 1 | -4/+5 |
| | | | | assertRaises context manager. | ||||
* | Move a test-skipping decorator over to unittest.skipIf. | Brett Cannon | 2009-08-27 | 1 | -10/+3 |
| | |||||
* | Implement the PEP 302 protocol for get_filename() as | Brett Cannon | 2009-07-20 | 4 | -22/+95 |
| | | | | | | 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. | ||||
* | Importlib's documentation said that importlib.abc.PyLoader inherited from | Brett Cannon | 2009-07-20 | 2 | -15/+62 |
| | | | | | | | | | 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. | ||||
* | Remove custom test-skipping code in importlib tests for unittest code. | Brett Cannon | 2009-07-20 | 1 | -13/+14 |
| | |||||
* | Some tests in importlib.test.source.test_abc_loader were testing what happens | Brett Cannon | 2009-07-20 | 1 | -8/+16 |
| | | | | | | | | 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. | ||||
* | Update importlib.test.source.test_abc_loader to new features added in Python ↵ | Brett Cannon | 2009-07-19 | 1 | -17/+19 |
| | | | | 3.1. | ||||
* | Importlib was using custom code to discover all test modules in importlib.test. | Brett Cannon | 2009-07-15 | 2 | -31/+14 |
| | | | | | This has now been removed in favor of using unittest's test discovery code in TestLoader.discover(). | ||||
* | Remove unused import for function that no longer exists. | R. David Murray | 2009-07-01 | 1 | -1/+0 |
| | |||||
* | convert old fail* assertions to assert* | Benjamin Peterson | 2009-06-30 | 19 | -85/+85 |
| | |||||
* | Fixup/simplify another nested context manager. | Raymond Hettinger | 2009-06-12 | 1 | -6/+3 |
| | |||||
* | Tests for case-senstivity were not being skipped for darwin when installed on a | Brett Cannon | 2009-05-11 | 6 | -45/+37 |
| | | | | | | | 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. | ||||
* | fix name again | Benjamin Peterson | 2009-04-04 | 1 | -1/+1 |
| | |||||
* | fix name | Benjamin Peterson | 2009-04-04 | 1 | -1/+1 |
| | |||||
* | fix naming | Benjamin Peterson | 2009-04-03 | 1 | -3/+3 |
| | |||||
* | os.path.listdir -> os.listdir | Benjamin Peterson | 2009-04-03 | 1 | -1/+1 |
| | |||||
* | importlib.test.source.test_abc_loader was making a bad assumption that all file | Brett Cannon | 2009-04-02 | 1 | -16/+21 |
| | | | | | | paths used '/' as a path separator. Fixes issue #5646. | ||||
* | Make a test in importlib have a more robust test value. | Brett Cannon | 2009-04-02 | 1 | -1/+1 |
| | |||||
* | Give a more informative message on an importlib test upon failure. | Brett Cannon | 2009-04-02 | 1 | -1/+3 |
| | |||||
* | Check that on a platform that is expected to have a case-insensitive filesystem | Brett Cannon | 2009-04-02 | 1 | -1/+8 |
| | | | | | | that is in fact the case. Closes issue #5442. | ||||
* | Rip out a useless method that the superclass implements properly. | Brett Cannon | 2009-04-01 | 1 | -19/+0 |
| | |||||
* | Fix importlib.machinery.PathFinder.find_module() to essentially skip over None | Brett Cannon | 2009-03-30 | 2 | -3/+23 |
| | | | | | | 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. | ||||
* | Add simple tests for __import__ for future optimizations to importlib. | Brett Cannon | 2009-03-30 | 1 | -0/+82 |
| | |||||
* | Document import's semantics for the language reference. This includes filling | Brett Cannon | 2009-03-21 | 1 | -7/+0 |
| | | | | in missing details for the sys module. | ||||
* | Implement InspectLoader for FrozenImporter. | Brett Cannon | 2009-03-15 | 4 | -9/+65 |
| | |||||
* | Implement InspectLoader for BuiltinImporter. | Brett Cannon | 2009-03-15 | 6 | -22/+80 |
| | |||||
* | A few more docstring/API cleanups for importlib. | Brett Cannon | 2009-03-15 | 4 | -53/+55 |
| | |||||
* | Clean up docstring from importlib.util.module_for_loader. | Brett Cannon | 2009-03-15 | 1 | -8/+8 |
| |