- 13 May, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 12 May, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
The long-term goal is to deprecate imp.find_module() in favour of this API, but it will take some time as some APIs explicitly return/use what imp.find_module() returns.
-
- 11 May, 2012 2 kayıt (commit)
-
-
Brett Cannon yazdı
importlib.abc.FileLoader.load_module()/get_filename() and importlib.machinery.ExtensionFileLoader.load_module() have their single argument be optional as the loader's constructor has all the ncessary information. This allows for the deprecation of imp.load_source()/load_compile()/load_package().
-
Brett Cannon yazdı
importlib.machinery that provide the suffix details for import. The attributes were not put on imp so as to compartmentalize everything importlib needs for setting up imports in importlib.machinery. This also led to an indirect deprecation of inspect.getmoduleinfo() as it directly returned imp.get_suffix's returned tuple which no longer makes sense.
-
- 27 Nis, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
importlib.util.module_for_loader also will set __loader__ along with __package__. This is in conjunction to a forthcoming update to PEP 302 which will make these two attributes required for loaders to set.
-
- 25 Nis, 2012 2 kayıt (commit)
-
-
Marc-Andre Lemburg yazdı
This time also recreating the Python/importlib.h file to make make happy. See the ticket for details.
-
Marc-Andre Lemburg yazdı
the buildbots to fail.
-
- 24 Nis, 2012 1 kayıt (commit)
-
-
Marc-Andre Lemburg yazdı
-
- 22 Nis, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
importlib.machinery.(FileFinder, SourceFileLoader, _SourcelessFileLoader, ExtensionFileLoader). This exposes all of importlib's mechanisms that will become public on the sys module.
-
- 02 Mar, 2012 2 kayıt (commit)
-
-
Brett Cannon yazdı
-
Brett Cannon yazdı
-
- 27 Şub, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 20 Şub, 2012 1 kayıt (commit)
-
-
Antoine Pitrou yazdı
Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new importlib.invalidate_caches() function. importlib is now often faster than imp.find_module() at finding modules.
-
- 13 Ock, 2012 1 kayıt (commit)
-
-
Antoine Pitrou yazdı
code, to avoid timestamp collisions (especially on filesystems with a low timestamp resolution) when checking for freshness of the bytecode.
-
- 15 Ock, 2011 1 kayıt (commit)
-
-
Georg Brandl yazdı
-
- 21 Eyl, 2010 1 kayıt (commit)
-
-
Georg Brandl yazdı
-
- 29 Tem, 2010 1 kayıt (commit)
-
-
Georg Brandl yazdı
-
- 21 Tem, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 03 Tem, 2010 1 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).
-
- 29 Haz, 2010 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 28 Haz, 2010 1 kayıt (commit)
-
-
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.
-
- 27 Haz, 2010 2 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.
-
Brett Cannon yazdı
Closes issue 8667. Thanks Ashley Sands for the patch.
-
- 13 Ock, 2010 2 kayıt (commit)
-
-
Brett Cannon yazdı
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r77479 | brett.cannon | 2010-01-13 11:21:00 -0800 (Wed, 13 Jan 2010) | 1 line Fix the wrong numbering of a PEP. ........
-
Brett Cannon yazdı
-
- 10 Ara, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 09 Ara, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 13 Kas, 2009 1 kayıt (commit)
-
-
Benjamin Peterson yazdı
-
- 07 Kas, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 18 Agu, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 20 Tem, 2009 3 kayıt (commit)
-
-
Brett Cannon yazdı
Make the wdocs for importlib.abc.ExecutionLoader to be weaker in terms of what is needed to execute a module.
-
Brett Cannon yazdı
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.
-
Brett Cannon yazdı
-
- 14 May, 2009 1 kayıt (commit)
-
-
Tarek Ziadé yazdı
-
- 01 Nis, 2009 3 kayıt (commit)
-
-
Brett Cannon yazdı
-
Brett Cannon yazdı
-
Brett Cannon yazdı
-
- 30 Mar, 2009 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 16 Mar, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
-
- 15 Mar, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
-