- 20 Kas, 2012 3 kayıt (commit)
-
-
Barry Warsaw yazdı
-
Barry Warsaw yazdı
-
Barry Warsaw yazdı
(actually, any non-string or non-bytes type).
-
- 20 Tem, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
This should make the Linux distros happy as it is now easier to leave importlib's tests out of their base Python distribution.
-
- 28 Haz, 2012 1 kayıt (commit)
-
-
Eric V. Smith yazdı
-
- 27 Haz, 2012 1 kayıt (commit)
-
-
Eric V. Smith yazdı
-
- 27 Nis, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
finder instead of using some (now non-existent) implicit finder.
-
- 26 Nis, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
be implicit. Added a warning for when sys.path_hooks is found to be empty. Also changed the meaning of None in sys.path_importer_cache to represent trying sys.path_hooks again (an interpretation of previous semantics). Also added a warning for when None was found. The long-term goal is for None in sys.path_importer_cache to represent the same as imp.NullImporter: no finder found for that sys.path entry.
-
- 18 Nis, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
in importlib. Thanks to PJE for pointing out the issue and Nick Coghlan for filing the bug.
-
- 14 Nis, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
-
- 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.
-
- 16 Şub, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
It seems better to cache the finder for the cwd under its full path insetad of '' in case the cwd changes. Otherwise FileFinder needs to dynamically change itself based on whether it is given '' instead of caching a finder for every change to the cwd.
-
- 08 Şub, 2012 1 kayıt (commit)
-
-
Brett Cannon yazdı
__file__ being an absolute path when the module is found in the current directory.
-
- 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).
-
- 13 Agu, 2009 1 kayıt (commit)
-
-
Georg Brandl yazdı
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* ........
-
- 01 Tem, 2009 1 kayıt (commit)
-
-
R. David Murray yazdı
-
- 30 Haz, 2009 1 kayıt (commit)
-
-
Benjamin Peterson yazdı
-
- 30 Mar, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
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.
-
- 21 Şub, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
+ Ditch using arguments to super(). + Ditch subclassing from object directly. + Move directory check out of chaining path hook to file path hook/finder. + Rename some classes to better reflect they are finders, not importers.
-
- 15 Şub, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
not handled by importlib._bootstrap._DefaultPathFinder).
-
- 07 Şub, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
and relies much more on meta path finders to abstract out various parts of import. As part of this the semantics for import_module tightened up and now follow __import__ much more closely (biggest thing is that the 'package' argument must now already be imported, else a SystemError is raised).
-
- 06 Şub, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
implicit hooks are handled properly.
-
- 05 Şub, 2009 3 kayıt (commit)
-
-
Brett Cannon yazdı
-
Brett Cannon yazdı
importlib.machinery.PathFinder.
-
Brett Cannon yazdı
-
- 01 Şub, 2009 2 kayıt (commit)
-
-
Brett Cannon yazdı
-
Brett Cannon yazdı
-
- 18 Ock, 2009 1 kayıt (commit)
-
-
Brett Cannon yazdı
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.
-