| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30876: Relative import from unloaded package now reimports the package
instead of failing with SystemError.
Relative import from non-package now fails with ImportError rather than
SystemError.
(cherry picked from commit 8a9cd20edca7d01b68292036029ae3735ce65edd)
* bpo-18018: Import raises ImportError instead of SystemError if a relative
import is attempted without a known parent package.
* bpo-26367: importlib.__init__() raises ImportError like
builtins.__import__() when ``level`` is specified but without an accompanying
package specified.
|
|
|
|
|
| |
In rare circumstances PyImport_Import() could return NULL without raising
an error.
(cherry picked from commit 145541c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bpo-27286 fixed a problem where BUILD_MAP_UNPACK_WITH_CALL could
be emitted with an incorrect oparg value, causing the eval loop
to access the wrong stack entry when attempting to read the
function name.
The associated magic number change caused significant problems when
attempting to upgrade to 3.5.3 for anyone that relies on pre-cached
bytecode remaining valid across maintenance releases.
This patch restores the ability to import legacy bytecode generated
by 3.5.0, 3.5.1 or 3.5.2, and modifies the eval loop to
avoid any harmful consequences from the potentially malformed legacy
bytecode.
Original import patch by Petr Viktorin, eval loop patch by Serhiy Storchaka,
and tests and integration by Nick Coghlan.
|
|
|
|
|
|
| |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
or builtins for importing submodules or "from import". Fixed handling an
error of non-string package name.
|
|
|
|
| |
generated by Argument Clinic. Patch by Petr Viktorin.
|
|
|
|
| |
if the stack is too deep.
|
| |
|
|
|
|
| |
is disabled. Patch by Petr Viktorin.
|
|\
| |
| |
| |
| | |
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
|
| |
| |
| |
| |
| | |
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
* If fopen() fails, OSError is raised with the original filename object.
* The GIL is now released while calling fopen()
|
| | |
| | |
| | |
| | | |
Corresponding functions now accept `const char *` (issue #1772673).
|
|\ \ \
| |/ /
| | |
| | | |
PySys_FormatStderr() call
|
| | |
| | |
| | |
| | | |
PySys_FormatStderr() call
|
|/ / |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
__file__.
This causes _frozen_importlib to no longer have __file__ set as well
as any frozen module imported using imp.init_frozen() (which is
deprecated).
|
| |
| |
| |
| | |
Remove unused variables.
|
| |
| |
| |
| | |
cleaning other modules. The sys and builtins modules are cleaned last.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The new syntax is highly human readable while still preventing false
positives. The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
|
| |
| |
| |
| |
| | |
including correctly generating code for Clinic blocks inside C
preprocessor conditional blocks.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326: Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
|
| |
| |
| |
| |
| |
| | |
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
|
| |
| |
| |
| | |
delaying its output or even redirecting it to a separate file.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
failure
|
| |
| |
| |
| | |
PyUnicode_Substring() failure (ex: MemoryError)
|
| |
| |
| |
| |
| |
| |
| | |
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
| | |
|
| |
| |
| |
| |
| |
| | |
Patch by Neil Schemenauer, minimally modified.
(re-apply after fix for tkinter-related crash)
|
| | |
|