An error occurred fetching the project authors.
- 02 Jul, 2011 1 commit
-
-
Vinay Sajip authored
-
- 22 Aug, 2010 1 commit
-
-
Brett Cannon authored
imports with an empty string in sys.path.
-
- 03 Jul, 2010 2 commits
-
-
Brett Cannon authored
This required moving the class from importlib/abc.py into importlib/_bootstrap.py and jiggering some code to work better with the class. This included changing how the file finder worked to better meet import semantics. This also led to fixing importlib to handle the empty string from sys.path as import currently does (and making me wish we didn't support that instead just required people to insert '.' instead to represent cwd). It also required making the new set_data abstractmethod create any needed subdirectories implicitly thanks to __pycache__ (it was either this or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir method or have set_data with no data arg mean to create a directory). Lastly, as an optimization the file loaders cache the file path where the finder found something to use for loading (this is thanks to having a sourceless loader separate from the source loader to simplify the code and cut out stat calls). Unfortunately test_runpy assumed a loader would always work for a module, even if you changed from underneath it what it was expected to work with. By simply dropping the previous loader in test_runpy so the proper loader can be returned by the finder fixed the failure. At this point importlib deviates from import on two points: 1. The exception raised when trying to import a file is different (import does an explicit file check to print a special message, importlib just says the path cannot be imported as if it was just some module name). 2. the co_filename on a code object is not being set to where bytecode was actually loaded from instead of where the marshalled code object originally came from (a solution for this has already been agreed upon on python-dev but has not been implemented yet; issue8611).
-
Brett Cannon authored
This required moving the class from importlib/abc.py into importlib/_bootstrap.py and jiggering some code to work better with the class. This included changing how the file finder worked to better meet import semantics. This also led to fixing importlib to handle the empty string from sys.path as import currently does (and making me wish we didn't support that instead just required people to insert '.' instead to represent cwd). It also required making the new set_data abstractmethod create any needed subdirectories implicitly thanks to __pycache__ (it was either this or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir method or have set_data with no data arg mean to create a directory). Lastly, as an optimization the file loaders cache the file path where the finder found something to use for loading (this is thanks to having a sourceless loader separate from the source loader to simplify the code and cut out stat calls). Unfortunately test_runpy assumed a loader would always work for a module, even if you changed from underneath it what it was expected to work with. By simply dropping the previous loader in test_runpy so the proper loader can be returned by the finder fixed the failure. At this point importlib deviates from import on two points: 1. The exception raised when trying to import a file is different (import does an explicit file check to print a special message, importlib just says the path cannot be imported as if it was just some module name). 2. the co_filename on a code object is not being set to where bytecode was actually loaded from instead of where the marshalled code object originally came from (a solution for this has already been agreed upon on python-dev but has not been implemented yet; issue8611).
-
- 18 May, 2010 1 commit
-
-
Barry Warsaw authored
-
- 17 Apr, 2010 1 commit
-
-
Barry Warsaw authored
-
- 19 Feb, 2010 2 commits
-
-
Brett Cannon authored
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78242 | brett.cannon | 2010-02-19 11:01:06 -0500 (Fri, 19 Feb 2010) | 5 lines Importlib was not matching import's handling of .pyc files where it had less then 8 bytes total in the file. Fixes issues 7361 & 7875. ........
-
Brett Cannon authored
then 8 bytes total in the file. Fixes issues 7361 & 7875.
-
- 07 Nov, 2009 2 commits
-
-
Brett Cannon authored
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76146 | brett.cannon | 2009-11-07 15:55:05 -0800 (Sat, 07 Nov 2009) | 6 lines When trying to write new bytecode, importlib was not catching the IOError 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. ........
-
Brett Cannon authored
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.
-
- 27 Aug, 2009 1 commit
-
-
Brett Cannon authored
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.
-
- 13 Aug, 2009 1 commit
-
-
Georg Brandl authored
svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
-
- 30 Jun, 2009 1 commit
-
-
Benjamin Peterson authored
-
- 11 May, 2009 1 commit
-
-
Brett Cannon authored
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.
-
- 12 Mar, 2009 1 commit
-
-
Brett Cannon authored
-
- 09 Mar, 2009 1 commit
-
-
Brett Cannon authored
(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.
-
- 21 Feb, 2009 1 commit
-
-
Brett Cannon authored
are source-only and source/bytecode loaders.
-
- 07 Feb, 2009 1 commit
-
-
Brett Cannon authored
string for top-level modules.
-
- 01 Feb, 2009 3 commits
-
-
Brett Cannon authored
-
Brett Cannon authored
importlib.test.support to importlib.test.source.util.
-
Brett Cannon authored
importlib.test.abc.LoaderTests.
-
- 18 Jan, 2009 1 commit
-
-
Brett Cannon authored
planned for the package. There are no docs yet, but they are coming once the API for the first new function, importlib.import_module() is finalized.
-