| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
descriptor, so as to avoid using many file descriptors when run in parallel from multiple threads.
|
|
|
|
| |
PATH_MAX is not available on "MIPS IRIX 6.5.30 [SB] 3.x" buildbot
|
|
|
|
|
| |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
|
|
|
| |
filenames anymore on Windows.
|
|
|
|
| |
sub-interpreter is shutdown (it would previously dump a fatal error).
|
|
|
|
|
|
|
|
|
|
| |
-I
Run Python in isolated mode. This also implies -E and -s. In isolated mode
sys.path contains neither the script’s directory nor the user’s
site-packages directory. All PYTHON* environment variables are ignored,
too. Further restrictions may be imposed to prevent the user from
injecting malicious code.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).
* PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
* Fix also some calls to PyDict_SetItemString(): handle error
|
|
|
|
| |
PyOS_InitInterrupts() can raise error when importing the signal module
|
|
|
|
|
|
|
|
|
|
|
|
| |
structseq.c
_PyDict_GetItemId() is more efficient: it only builds the Unicode string once.
Identifiers (dictionary keys) are now created at Python initialization, and if
the creation failed, Python does exit with a fatal error.
Before, PyDict_GetItemString() failure was not handled: structseq_new() could
call PyObject_GC_NewVar() with a negative size, and structseq_dealloc() could
also crash.
|
|
|
|
|
| |
Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.
|
|
|
|
|
|
|
| |
PyMem_Malloc() or PyObject_Malloc().
For example, PyCFunction_Fini() calls PyObject_GC_Del() which calls
PyObject_FREE().
|
|
|
|
| |
garbage-collected at shutdown.
|
|\
| |
| |
| | |
(thanks Arfrever for reporting).
|
| |
| |
| |
| | |
(thanks Arfrever for reporting).
|
| | |
|
|\ \
| |/
| |
| | |
the interpreter is shutdown and then started again.
|
| |
| |
| |
| | |
the interpreter is shutdown and then started again.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
attributes to None.
The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.
This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
Also, make the private function static.
|
| |
| |
| |
| | |
by default. It can be re-enabled with the `-X showrefcount` option.
|
|/
|
|
|
|
| |
number of memory blocks currently allocated.
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
|
|\
| |
| |
| | |
Patch by Victor Stinner.
|
| |
| |
| |
| | |
Patch by Victor Stinner.
|
| |
| |
| |
| | |
sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
|
| |
| |
| |
| | |
Patch by Serhiy Storchaka.
|
| |
| |
| |
| | |
when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup of the fp. I've changed the code to use another FILE ptr for pyc files and moved the fclose() to PyRun_SimpleFileExFlags() to make it more obvious what's happening.
|
| |
| |
| |
| | |
filename points to a pyc/pyo file and closeit is false.
|
| |
| |
| |
| | |
sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
|
| |
| |
| |
| |
| |
| |
| | |
faulthandler requires the importlib if "-X faulthandler" option is present on
the command line, so initialize faulthandler after importlib.
Add also an unit test.
|
| | |
|
| | |
|
| |
| |
| |
| | |
corresponding type objects
|
| |
| |
| |
| | |
by basing pkgutil explicitly on importlib, deprecating its internal import emulation and setting __main__.__loader__ correctly so that runpy still works (Affects #15343, #15314, #15357)
|
|\ \
| |/
| |
| | |
python3 under Unix, not python.
|
| |
| |
| |
| | |
"python3" under Unix, not "python".
|
| |
| |
| |
| | |
allocation issues
|
| |
| |
| |
| | |
(Modules/_freeze_importlib) to build Python/importlib.h.
|
| |
| |
| |
| |
| |
| | |
attribute
This replaces the original PEP 409 implementation. See #14133.
|
| |
| |
| |
| | |
Thanks to Eric Snow for the patch.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
rewriting functionality in pure Python.
To start, imp.new_module() has been rewritten in pure Python, put into
importlib (privately) and then publicly exposed in imp.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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__().
|
|\ \
| |/ |
|