summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
Commit message (Collapse)AuthorAgeFilesLines
* Issue #17099: Have importlib.find_loader() raise ValueError whenBrett Cannon2013-03-131-0/+2
| | | | | | __loader__ is not set on a module. This brings the exception in line with when __loader__ is None (which is equivalent to not having the attribute defined).
* Issue #17117: Have both import itself and importlib.util.set_loader()Brett Cannon2013-03-131-6/+3
| | | | | | set __loader__ on a module when set to None. Thanks to Gökcen Eraslan for the fix.
* Issue #17220: two fixes for changeset 2528e4aea338.Brett Cannon2013-02-251-2/+2
| | | | | | | | | First, because the mtime can exceed 4 bytes, make sure to mask it down to 4 bytes before getting its little-endian representation for writing out to a .pyc file. Two, cap an rsplit() call to 1 split, else can lead to too many values being returned for unpacking.
* Issue #17220: Little cleanup of _bootstrap.py.Serhiy Storchaka2013-02-251-30/+14
|
* Merge from 3.3Eric Snow2013-02-171-2/+2
|\
| * Fixes a FileFinder docstring to reflect an old change.Eric Snow2013-02-171-2/+2
| | | | | | | | That change was in 1db6553f3f8c.
* | evaluate lambda keyword-only defaults after positional defaults (#16967 again)Benjamin Peterson2013-02-101-2/+2
| |
* | evaluate positional defaults before keyword-only defaults (closes #16967)Benjamin Peterson2013-02-101-1/+3
| |
* | Merge w/ 3.3 more fixes thanks to issue #17098Brett Cannon2013-02-011-2/+5
|\ \ | |/
| * Issue #17098: Be more stringent of setting __loader__ on early importedBrett Cannon2013-02-011-2/+5
| | | | | | | | modules. Also made test more rigorous.
* | Issue #17098: all modules should have __loader__Brett Cannon2013-02-011-3/+5
|\ \ | |/
| * Issue #17098: Make sure every module has __loader__ defined.Brett Cannon2013-02-011-3/+5
| | | | | | | | Thanks to Thomas Heller for the bug report.
* | Tweak an exception messageBrett Cannon2013-01-271-1/+1
| |
* | Port py_compile over to importlibBrett Cannon2013-01-261-7/+14
| |
* | Touch up exception messagingBrett Cannon2013-01-251-4/+4
| |
* | Issue #15031: Refactor some code in importlib pertaining to validatingBrett Cannon2013-01-111-66/+73
| | | | | | | | | | | | | | and compiling bytecode. Thanks to Ronan Lamy for pointing the redundancy and taking an initial stab at the refactor (as did Nick Coghlan).
* | Merge from 3.3 for fix for issue #16730Brett Cannon2013-01-111-2/+3
|\ \ | |/
| * Issue #16730: Don't raise an exception inBrett Cannon2013-01-111-2/+3
| | | | | | | | | | | | | | | | importlib.machinery.FileFinder when the directory has become unreadable or a file. This brings semantics in line with Python 3.2 import. Reported and diagnosed by David Pritchard.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-2/+2
| |
* | Issue #16719: Get rid of WindowsError. Use OSError insteadAndrew Svetlov2012-12-191-2/+2
| | | | | | | | Patch by Serhiy Storchaka.
* | Issue #15627: This is simply an update to the name of a new method recently ↵Eric Snow2012-12-051-2/+2
| | | | | | | | | | | | added to importlib.abc.SourceLoader.
* | - Issue #16514: Fix regression causing a traceback when sys.path[0] is NoneBarry Warsaw2012-11-201-0/+2
|\ \ | |/ | | | | (actually, any non-string or non-bytes type).
| * - Issue #16514: Fix regression causing a traceback when sys.path[0] is NoneBarry Warsaw2012-11-201-0/+2
| | | | | | | | (actually, any non-string or non-bytes type).
* | Issue #15627: Add the compile_source() method toBrett Cannon2012-11-181-3/+9
| | | | | | | | | | | | | | importlib.abc.SourceLoader. This provides an easy hook into the import system to allow for source transformations, AST optimizations, etc.
* | Merge fix for #16489 from 3.3Brett Cannon2012-11-171-1/+3
|\ \ | |/
| * Issue #16489: Make it clearer that importlib.find_loader() requiresBrett Cannon2012-11-171-1/+3
| | | | | | | | the user to import any parent packages.
* | merge 3.3Benjamin Peterson2012-11-121-1/+1
|\ \ | |/
| * missing letterBenjamin Peterson2012-11-121-1/+1
| |
* | Issue #15641: Clean up deprecated classes from importlibAndrew Svetlov2012-11-051-177/+0
| | | | | | | | Patch by Taras Lyapun.
* | Merge fix from #6074 from 3.3Nick Coghlan2012-10-191-0/+3
|\ \ | |/
| * Issue #6074: Apply an appropriate fix for importlib based importsNick Coghlan2012-10-191-0/+3
| |
* | Merge issue #15833: don't raise an exception if importlib can't writeTrent Nelson2012-10-161-7/+7
|\ \ | |/ | | | | | | | | | | | | byte-compiled files. This fixes a regression introduced by 3.3. Patch by Charles-François Natali.
| * Issue #15833: don't raise an exception if importlib can't write byte-compiledTrent Nelson2012-10-161-7/+7
| | | | | | | | | | | | files. This fixes a regression introduced by 3.3. Patch by Charles-François Natali.
* | Remove uses of % with str.format.Brett Cannon2012-10-121-3/+3
| |
* | Merge fix for issue #15111.Brett Cannon2012-10-101-6/+6
|\ \ | |/
| * Closes issue #15111: Calling __import__ with a module specified inBrett Cannon2012-10-101-6/+6
| | | | | | | | | | fromlist which causes its own ImportError (e.g. the module tries to import a non-existent module) should have that exception propagate.
* | #16135: Removal of OS/2 support (Python code partial cleanup)Jesus Cea2012-10-051-4/+1
|/
* Add some comments.Brett Cannon2012-09-281-0/+4
|
* rephraseBenjamin Peterson2012-09-261-2/+2
|
* don't depend on __debug__ because it's baked in at freeze time (issue #16046)Benjamin Peterson2012-09-251-8/+9
|
* Issue #15781: Fix two small race conditions in import's module locking.Antoine Pitrou2012-08-271-2/+8
|
* Issue #15316: Let exceptions raised during imports triggered by theBrett Cannon2012-08-241-4/+14
| | | | | | | | | | | | | | | fromlist of __import__ propagate. The problem previously was that if something listed in fromlist didn't exist then that's okay. The fix for that was too broad in terms of catching ImportError. The trick with the solution to this issue is that the proper refactoring of import thanks to importlib doesn't allow for a way to distinguish (portably) between an ImportError because finders couldn't find a loader, or a loader raised the exception. In Python 3.4 the hope is to introduce a new exception (e.g. ModuleNotFound) to make it clean to differentiate why ImportError was raised.
* Issue #2051: Tweak last commit for this issue to pass in mode insteadBrett Cannon2012-08-241-9/+7
| | | | | of source path to set_data() and make the new argument private until possible API changes can be discussed more thoroughly in Python 3.4.
* Close #2501: Permission bits are once again correctly copied from the source ↵Nick Coghlan2012-08-241-5/+26
| | | | file to the cached bytecode file. Test by Eric Snow.
* Close #14846: Handle a sys.path entry going awayNick Coghlan2012-08-201-1/+5
|
* Issue #15715: Ignore failed imports triggered by the use of fromlist.Brett Cannon2012-08-171-2/+7
| | | | | | | | | | | When the fromlist argument is specified for __import__() and the attribute doesn't already exist, an import is attempted. If that fails (e.g. module doesn't exist), the ImportError will now be silenced (for backwards-compatibility). This *does not* affect ``from ... import ...`` statements. Thanks to Eric Snow for the patch and Simon Feltman for reporting the regression.
* Don't overwrite a __path__ value from extension modules if alreadyBrett Cannon2012-08-111-1/+1
| | | | set.
* fix docstring wordingPhilip Jenvey2012-08-101-3/+3
|
* Issue #15502: Refactor some code.Brett Cannon2012-08-102-15/+17
|
* update docstring per the extension package fix, refactorPhilip Jenvey2012-08-101-6/+3
|