summaryrefslogtreecommitdiff
path: root/Python/importlib.h
AgeCommit message (Collapse)AuthorLines
2017-03-04Refresh Python/importlib.h and Python/importlib_external.h (#464)Ned Deily-1/+1
2016-10-25Issue #28517: Fixed of-by-one error in the peephole optimizer that causedSerhiy Storchaka-1149/+1147
keeping unreachable code.
2016-09-30Issue #27942: String constants now interned recursively in tuples and ↵Serhiy Storchaka-1739/+1737
frozensets.
2016-09-30Issue #27942: String constants now interned recursively in tuples and ↵Serhiy Storchaka-66/+65
frozensets.
2016-09-12Issue #27213: Fixed different issues with reworked CALL_FUNCTION* opcodes.Serhiy Storchaka-1446/+1446
* BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK_WITH_CALL no longer generated with single tuple or dict. * Restored more informative error messages for incorrect var-positional and var-keyword arguments. * Removed code duplications in _PyEval_EvalCodeWithName(). * Removed redundant runtime checks and parameters in _PyStack_AsDict(). * Added a workaround and enabled previously disabled test in test_traceback. * Removed dead code from the dis module.
2016-09-09Rework CALL_FUNCTION* opcodesVictor Stinner-1445/+1445
Issue #27213: Rework CALL_FUNCTION* opcodes to produce shorter and more efficient bytecode: * CALL_FUNCTION now only accepts position arguments * CALL_FUNCTION_KW accepts position arguments and keyword arguments, but keys of keyword arguments are packed into a constant tuple. * CALL_FUNCTION_EX is the most generic, it expects a tuple and a dict for positional and keyword arguments. CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW opcodes have been removed. 2 tests of test_traceback are currently broken: skip test, the issue #28050 was created to track the issue. Patch by Demur Rumed, design by Serhiy Storchaka, reviewed by Serhiy Storchaka and Victor Stinner.
2016-09-08Issue #28026: Raise ImportError when exec_module() exists but ↵Eric Snow-899/+895
create_module() is missing.
2016-09-07Issue #15767: Use ModuleNotFoundError.Eric Snow-251/+250
2016-09-06Issue #27974: Remove importlib._bootstrap._ManageReload.Brett Cannon-1799/+1746
Class was dead code. Thanks to Xiang Zhang for the patch.
2016-09-06Issue #27078: Added BUILD_STRING opcode. Optimized f-strings evaluation.Serhiy Storchaka-205/+204
2016-07-08Update frozen importlib codeBrett Cannon-843/+844
2016-06-12Issue #27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes.Serhiy Storchaka-1650/+1652
Patch by Demur Rumed.
2016-05-26Issue #27076: Merge spelling from 3.5Martin Panter-146/+146
2016-05-26Issue #27076: Doc, comment and tests spelling fixesMartin Panter-154/+154
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-24Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode.Serhiy Storchaka-1929/+1790
Patch by Demur Rumed.
2016-03-25Fix bug in __import__ during Python shutdownVictor Stinner-439/+445
Issue #26637: The importlib module now emits an ImportError rather than a TypeError if __import__() is tried during the Python shutdown process but sys.path is already cleared (set to None).
2016-02-20Merge for issue #26367Brett Cannon-393/+398
2016-02-20Issue #26367: Have importlib.__init__() raise RuntimeError whenBrett Cannon-370/+371
'level' is specified but no __package__. This brings the function inline with builtins.__import__(). Thanks to Manuel Jacob for the patch.
2016-01-22Issue #25791: Warn when __package__ != __spec__.parent.Brett Cannon-54/+63
In a previous change, __spec__.parent was prioritized over __package__. That is a backwards-compatibility break, but we do eventually want __spec__ to be the ground truth for module details. So this change reverts the change in semantics and instead raises an ImportWarning when __package__ != __spec__.parent to give people time to adjust to using spec objects.
2016-01-15Issue #25791: Raise an ImportWarning when __spec__ or __package__ areBrett Cannon-273/+286
not defined for a relative import. This is the start of work to try and clean up import semantics to rely more on a module's spec than on the myriad attributes that get set on a module. Thanks to Rose Ames for the patch.
2015-08-24Issue #24769: Interpreter now starts properly when dynamic loadingLarry Hastings-1/+1
is disabled. Patch by Petr Viktorin.
2015-05-23PEP 489: Multi-phase extension module initializationNick Coghlan-753/+769
Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles.
2015-05-15Issue #24192: Fix namespace package imports.Eric Snow-1942/+1942
2015-05-11PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov-1733/+1733
2015-05-02Issue #23911: Move path-based bootstrap code to a separate frozen module.Eric Snow-4305/+1922
2015-04-13Issue #23731: Implement PEP 488.Brett Cannon-4220/+4281
The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
2015-02-02merge 3.4 (#21295)Benjamin Peterson-349/+349
2015-02-02revert lineno and col_offset changes from #16795 (closes #21295)Benjamin Peterson-3895/+3895
2015-01-09Issue #23014: Make importlib.abc.Loader.create_module() required whenBrett Cannon-2330/+2375
importlib.abc.Loader.exec_module() is also defined. Before this change, create_module() was optional **and** could return None to trigger default semantics. This change now reduces the options for choosing default semantics to one and in the most backporting-friendly way (define create_module() to return None).
2014-12-15Update Python/importlib.hZachary Ware-3763/+3763
2014-12-01- Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile isBarry Warsaw-3611/+3612
asked to compile a source file containing multiple dots in the source file name.
2014-12-01- Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile isBarry Warsaw-3495/+3496
asked to compile a source file containing multiple dots in the source file name.
2014-11-24Issue #22934: Update the comment to mention Programs/_freeze_importlib.c.Berker Peksag-1/+1
2014-11-23Update importlib.hAntoine Pitrou-430/+430
2014-11-21Issue #22834: Have import suppress FileNotFoundError when the currentBrett Cannon-998/+1000
working directory no longer exists. Thanks to Martin Panter for the bug report.
2014-10-10Issue #21052: Don't raise ImportWarning for sys.meta_path orBrett Cannon-24/+26
sys.path_hooks when set to None during interpreter shutdown. Thanks to Martin Panter for the initial bug report.
2014-09-24Update importlib.h frozen bytecode (changed due to commit c0ca9d32aed4).Georg Brandl-3817/+3796
2014-05-30Fix a parameter name to make sense againBrett Cannon-3178/+3178
2014-05-30Issue #20383: Introduce importlib.util.module_from_spec().Brett Cannon-4288/+4178
Along the way, dismantle importlib._bootstrap._SpecMethods as it was no longer relevant and constructing the new function required partially dismantling the class anyway.
2014-05-12Merge from 3.4 (for #21226).Eric Snow-4248/+4275
2014-05-12Issue #21226: Set all attrs in PyImport_ExecCodeModuleObject.Eric Snow-4248/+4275
2014-04-09PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson-160/+160
2014-02-26Issue #20763: Fix importlib.machinery.PathFinder to supportBrett Cannon-1/+1
PathEntryFinder instances which only define find_module(). Reported by Yukihiro Nakadaira.
2014-02-26Issue #20763: Fix importlib.machinery.PathFinder to supportBrett Cannon-1/+1
PathEntryFinder instances which only define find_module(). Reported by Yukihiro Nakadaira.
2014-02-19update magic number for #20625Benjamin Peterson-160/+160
2014-02-19update magic number for #20625Benjamin Peterson-160/+160
2014-01-07Issue 19713: Remove PEP 451-related code that should have been factored out.Eric Snow-1216/+1187
This code was an artifact of issuing a DeprecationWarning for the lack of loader.exec_module(). However, we have deferred such warnings to later Python versions.
2014-01-07Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!"Larry Hastings-4357/+4342
format unit.
2014-01-06Issue 19713: Add PEP 451-related deprecations.Eric Snow-3943/+4031
2014-01-04Issue #19927: Add __eq__ to path-based loaders in importlib.Eric Snow-619/+659