| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
|\
| |
| |
| | |
error messages and comments.
|
| |
| |
| |
| | |
error messages and comments.
|
| |
| |
| |
| | |
filenames anymore on Windows.
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Patch by Neil Schemenauer, minimally modified.
(re-apply after fix for tkinter-related crash)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
-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.
|
| | |
|
| | |
|
| |
| |
| |
| | |
expensive details (local variables) and break reference cycles.
|
| | |
|
|\ \ |
|
| |\ \
| | |/ |
|
| | | |
|
|/ / |
|
| |
| |
| |
| | |
deallocating a Tkapp object.
|
| |
| |
| |
| | |
Patch by Neil Schemenauer, minimally modified.
|
| | |
|
|\ \
| |/
| |
| | |
Replace 8 spaces with 4.
|
| |
| |
| |
| | |
Replace 8 spaces with 4.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add new enum:
* PyMemAllocatorDomain
Add new structures:
* PyMemAllocator
* PyObjectArenaAllocator
Add new functions:
* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()
Changes:
* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
macros
|
| |
| |
| |
| | |
ModuleNotFoundError.
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
constants instead
of arbitrary looking numbers.
|
| | |
|
| |
| |
| |
| |
| |
| | |
allocators
The new API require more discussion.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add a new PyMemAllocators structure
* New functions:
- PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree(): GIL-free memory
allocator functions
- PyMem_GetRawAllocators(), PyMem_SetRawAllocators()
- PyMem_GetAllocators(), PyMem_SetAllocators()
- PyMem_SetupDebugHooks()
- _PyObject_GetArenaAllocators(), _PyObject_SetArenaAllocators()
* Add unit test for PyMem_Malloc(0) and PyObject_Malloc(0)
* Add unit test for new get/set allocators functions
* PyObject_Malloc() now falls back on PyMem_Malloc() instead of malloc() if
size is bigger than SMALL_REQUEST_THRESHOLD, and PyObject_Realloc() falls
back on PyMem_Realloc() instead of realloc()
* PyMem_Malloc() and PyMem_Realloc() now always call malloc() and realloc(),
instead of calling PyObject_Malloc() and PyObject_Realloc() in debug mode
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Forgot to raise ModuleNotFoundError when None is found in sys.modules.
This led to introducing the C function PyErr_SetImportErrorSubclass()
to make setting ModuleNotFoundError easier.
Also updated the reference docs to mention ModuleNotFoundError
appropriately. Updated the docs for ModuleNotFoundError to mention the
None in sys.modules case.
Lastly, it was noticed that PyErr_SetImportError() was not setting an
exception when returning None in one case. That issue is now fixed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ImportError.
The exception is raised by import when a module could not be found.
Technically this is defined as no viable loader could be found for the
specified module. This includes ``from ... import`` statements so that
the module usage is consistent for all situations where import
couldn't find what was requested.
This should allow for the common idiom of::
try:
import something
except ImportError:
pass
to be updated to using ModuleNotFoundError and not accidentally mask
ImportError messages that should propagate (e.g. issues with a
loader).
This work was driven by the fact that the ``from ... import``
statement needed to be able to tell the difference between an
ImportError that simply couldn't find a module (and thus silence the
exception so that ceval can raise it) and an ImportError that
represented an actual problem.
|
| | |
|
| |
| |
| |
| | |
by their HANDLE which is a pointer (and not a long, which is smaller).
|
| |
| |
| |
| |
| | |
PyObject_CallMethod() now changed to `const char*`.
Based on patches by Jörg Müller and Lars Buitinck.
|
| |
| |
| |
| |
| |
| | |
(closes #17206)
A patch from Illia Polosukhin.
|
|\ \
| |/
| |
| |
| |
| |
| | |
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
|
| |
| |
| |
| |
| |
| |
| | |
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
|
|\ \
| |/
| |
| | |
an internal XML encoding is UTF-8 or US-ASCII.
|
| |
| |
| |
| | |
an internal XML encoding is UTF-8 or US-ASCII.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
the proper environment
|