- 15 Mar, 2011 1 kayıt (commit)
-
-
Ezio Melotti yazdı
-
- 13 Ock, 2011 2 kayıt (commit)
-
-
Raymond Hettinger yazdı
-
Raymond Hettinger yazdı
-
- 21 Kas, 2010 1 kayıt (commit)
-
-
Ezio Melotti yazdı
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
-
- 20 Kas, 2010 1 kayıt (commit)
-
-
Ezio Melotti yazdı
-
- 18 Kas, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
message in importlib. Thanks to Éric Araujo for spotting the inconsistency.
-
- 03 Eyl, 2010 1 kayıt (commit)
-
-
Florent Xicluna yazdı
-
- 26 Agu, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
already exists, not IOError. Part of the continuing saga of issue #9572.
-
- 24 Agu, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
Related to the fix for issue #9572. Thanks to Łukasz Czuja for catching the bug.
-
- 22 Agu, 2010 3 kayıt (commit)
-
-
Brett Cannon yazdı
test_importlib is that it discovers special little race conditions. For instance, it turns out that importlib would throw an exception if two different Python processes both tried to create the __pycache__ directory as one process would succeed, causing the other process to fail as it didn't expect to get any "help". So now importlib simply stays calm and just accepts someone else did the work of creating the __pycache__ directory for it, moving on with life. Closes issue #9572.
-
Brett Cannon yazdı
imports with an empty string in sys.path.
-
Brett Cannon yazdı
importlib._bootstrap, add the optional methods for importlib.abc.SourceLoader for completeness.
-
- 22 Tem, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
module which is the largest module in the stdlib.
-
- 16 Tem, 2010 2 kayıt (commit)
-
-
Brett Cannon yazdı
-
Brett Cannon yazdı
while writing bytecode, and importing bytecode with source existing (don't care about sourceless imports).
-
- 15 Tem, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 03 Tem, 2010 4 kayıt (commit)
-
-
Brett Cannon yazdı
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 yazdı
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 yazdı
-
Brett Cannon yazdı
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).
-
- 28 Haz, 2010 3 kayıt (commit)
-
-
Brett Cannon yazdı
-
Brett Cannon yazdı
Required updating code relying on other modules to switch to _bootstrap's unique module requirements. This led to the realization that get_code was being too liberal in its exception catching when calling set_data by blindly grabbing IOError. Shifted the responsibility of safely ignoring writes to a read-only path to set_data. Importlib is still not relying on SourceLoader yet; requires creating a SourcelessLoader and updating the source finder.
-
Benjamin Peterson yazdı
-
- 27 Haz, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
SourceLoader is a simplification of both PyLoader and PyPycLoader. If one only wants to use source, then they need to only implement get_data and get_filename. To also use bytecode -- sourceless loading is not supported -- then two abstract methods -- path_mtime and set_data -- need to be implemented. Compared to PyLoader and PyPycLoader, there are less abstract methods introduced and bytecode files become an optimization controlled by the ABC and hidden from the user (this need came about as PEP 3147 showed that not treating bytecode as an optimization can cause problems for compatibility). PyLoader is deprecated in favor of SourceLoader. To be compatible from Python 3.1 onwards, a subclass need only use simple methods for source_path and is_package. Otherwise conditional subclassing based on whether Python 3.1 or Python 3.2 is being is the only change. The documentation and docstring for PyLoader explain what is exactly needed. PyPycLoader is deprecated also in favor of SourceLoader. Because PEP 3147 shifted bytecode path details so much, there is no foolproof way to provide backwards-compatibility with SourceLoader. Because of this the class is simply deprecated and users should move to SourceLoader (and optionally PyLoader for Python 3.1). This does lead to a loss of support for sourceless loading unfortunately. At some point before Python 3.2 is released, SourceLoader will be moved over to importlib._bootstrap so that the core code of importlib relies on the new code instead of the old PyPycLoader code. This commit is being done now so that there is no issue in having the API in Python 3.1a1.
-
- 21 Haz, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 18 May, 2010 1 kayıt (commit)
-
-
Barry Warsaw yazdı
-
- 17 Nis, 2010 2 kayıt (commit)
-
-
Barry Warsaw yazdı
-
Barry Warsaw yazdı
-
- 19 Şub, 2010 2 kayıt (commit)
-
-
Brett Cannon yazdı
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 yazdı
then 8 bytes total in the file. Fixes issues 7361 & 7875.
-
- 12 Ara, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 13 Kas, 2009 1 kayıt (commit)
-
-
Benjamin Peterson yazdı
-
- 07 Kas, 2009 2 kayıt (commit)
-
-
Brett Cannon yazdı
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 yazdı
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.
-
- 05 Kas, 2009 3 kayıt (commit)
-
-
Brett Cannon yazdı
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76113 | brett.cannon | 2009-11-04 17:17:22 -0800 (Wed, 04 Nov 2009) | 3 lines importlib.test.source.util referenced variables in the 'finally' part of a try/finally which may not have been set. ........ r76114 | brett.cannon | 2009-11-04 17:26:57 -0800 (Wed, 04 Nov 2009) | 6 lines Use tempfile.mkdtemp() instead of tempfile.tempdir for where importlib places source files for tests. Allows for concurrent execution of the tests by preventing various executions from trampling each other. Closes issue #7248. ........
-
Brett Cannon yazdı
source files for tests. Allows for concurrent execution of the tests by preventing various executions from trampling each other. Closes issue #7248.
-
Brett Cannon yazdı
try/finally which may not have been set.
-
- 03 Eyl, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
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__.
-
- 30 Agu, 2009 2 kayıt (commit)
-
-
Brett Cannon yazdı
-
Brett Cannon yazdı
AttributeError in importlib when it should be an ImportError. Found when running importlib against test_runpy.
-