| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
tracemalloc in objects destructor
Replace atexit handler with an harcoded C function _PyTraceMalloc_Fini().
|
| |
|
|
|
|
| |
Python now uses SipHash24 on all major platforms.
|
|\
| |
| |
| |
| | |
the size of the env_home buffer, not PATH_MAX+1. env_home is declared using
MAXPATHLEN+1, and PATH_MAX is not declared on IRIX.
|
| |
| |
| |
| |
| | |
the env_home buffer, not PATH_MAX+1. env_home is declared using MAXPATHLEN+1,
and PATH_MAX is not declared on IRIX.
|
| |
| |
| |
| | |
Patch written by Andrei Dorian Duma.
|
| | |
|
| |
| |
| |
| |
| | |
shutdown to call objects destructors. So "unclosed file" resource warnings are
now corretly emitted for daemon threads.
|
| |
| |
| |
| |
| |
| |
| | |
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
|
| |
| |
| |
| |
| |
| | |
Use aslo PyUnicode_FromFormat() to format the line so only one call to
PyFile_WriteObject() is needed. tb_displayline() of Python/traceback.c has
similar implementation.
|
| |
| |
| |
| |
| |
| |
| | |
_PyUnicode_CompareWithId() is faster than PyUnicode_CompareWithASCIIString()
when both strings are equal and interned.
Add also _PyId_builtins identifier for "builtins" common string.
|
| |
| |
| |
| | |
Replace _PyUnicode_AsString()+strcmp() with PyUnicode_CompareWithASCIIString().
|
| |
| |
| |
| |
| |
| |
| | |
instead of creating temporary Unicode string objects
Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
|
| |
| |
| |
| |
| | |
Only decode the filename once. PyRun_InteractiveOneObject() uses an identifier
for "<string>" string, so the byte string is only decoded once.
|
| |
| |
| |
| | |
key from sys._xoptions
|
|\ \
| |/
| |
| | |
Python executable and not removed by the linker's optimizer.
|
| |
| |
| |
| | |
Python executable and not removed by the linker's optimizer.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- don't call PyErr_NoMemory with interpreter is not initialised
- note that it's OK to call _PyMem_RawStrDup here
- don't include this in the limited API
- capitalise "IO"
- be explicit that a non-zero return indicates an error
- include versionadded marker in docs
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.
Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.
(Initial patch by Bastien Montagne)
|
|\ \
| |/
| |
| | |
raise an exception.
|
| |
| |
| |
| | |
raise an exception.
|
| | |
|
| |
| |
| |
| | |
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.
|