| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Reject valid IPv6 addresses which doesn't contain "::" but have
a length of 17 characters.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extension modules: m_traverse, m_clear and m_free functions of
PyModuleDef are no longer called if the module state was requested
but is not allocated yet. This is the case immediately after the
module is created and before the module is executed (Py_mod_exec
function). More precisely, these functions are not called if m_size is
greater than 0 and the module state (as returned by
PyModule_GetState()) is NULL.
Extension modules without module state (m_size <= 0) are not affected.
Co-Authored-By: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#19032)
* bpo-26067: Do not fail test_shutil.chown when gid/uid cannot be resolved
There is no guarantee that the users primary uid or gid can be resolved
in the unix group/account databases. Skip the last part of the chown
test if we cannot resolve the gid or uid to a name.
* 📜🤖 Added by blurb_it.
* Address review feedback
* address review feedback correctly
* fix typo
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
| |
uuid.getnode() now skips IPv6 addresses with the same string length
than a MAC address (17 characters): only use MAC addresses.
|
|
|
|
| |
PyObject_GenericSetDict() takes three arguments, not two.
|
|
|
|
| |
on POSIX (GH-19030)
|
|
|
|
| |
489) (GH-19012)
|
| |
|
| |
|
|
|
|
| |
If PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(),
log the error as an unraisable exception.
|
| |
|
| |
|
| |
|
|
|
|
| |
functions (GH-19017)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-19009)
When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads.
This commit moves the notification to the _terminate_pool function so is called from both code paths.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)
|
| |
|
|
|
|
| |
Add host validation for control characters for more CVE-2019-18348 protection.
|
|
|
|
| |
for 3.6+ (GC-18550)
|
|
|
| |
Add status codes 103 EARLY_HINTS and 425 TOO_EARLY.
|
|
|
|
| |
(GH-18412)
|
| |
|
|
|
|
|
|
| |
Some inline functions use mixed declarations and code. These end up
visible in third-party code that includes Python.h, which might not be
using a C99 compiler. Fix by moving the declarations first, like in
the old days.
|
|
|
|
|
|
| |
In math_2(), the first PyFloat_AsDouble() call should be checked
for failure before the second call.
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
|
|
|
|
|
|
|
| |
* Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer() (GH-17659)"
This reverts commit c7ad974d341d3edb6b9d2a2dcae4d3d4794ada6b.
* Update unicodeobject.h
|
|
|
|
|
|
|
| |
changelog (GH-18937)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
| |
Add PyThreadState_GetInterpreter(tstate): get the interpreter of a
Python thread state.
|
|
|
|
|
|
| |
* Rename _PyInterpreterState_Get() to PyInterpreterState_Get() and
move it the limited C API.
* Add _PyInterpreterState_Get() alias to PyInterpreterState_Get() for
backward compatibility with Python 3.8.
|
|
|
|
|
|
|
| |
Replace _PyInterpreterState_Get() function call with
_PyInterpreterState_GET_UNSAFE() macro which is more efficient but
don't check if tstate or interp is NULL.
_Py_GetConfigsAsDict() now uses _PyThreadState_GET().
|
| |
|
| |
|
|
|
|
|
|
| |
Py_TRASHCAN_BEGIN_CONDITION and Py_TRASHCAN_END macro no longer
access PyThreadState attributes, but call new private
_PyTrash_begin() and _PyTrash_end() functions which hide
implementation details.
|
|
|
|
|
|
|
|
|
| |
* sys.settrace(), sys.setprofile() and _lsprof.Profiler.enable() now
properly report PySys_Audit() error if "sys.setprofile" or
"sys.settrace" audit event is denied.
* Add _PyEval_SetProfile() and _PyEval_SetTrace() function: similar
to PyEval_SetProfile() and PyEval_SetTrace() but take a tstate
parameter and return -1 on error.
* Add _PyObject_FastCallTstate() function.
|
|
|
|
|
|
|
|
|
|
|
| |
Master:
./python.exe -m pyperf timeit "tuple((1, 2, 3, 4, 5))"
Mean +- std dev: 361 ns +- 15 ns
PEP-590:
./python.exe -m pyperf timeit "tuple((1, 2, 3, 4, 5))"
Mean +- std dev: 203 ns +- 13 ns
|
|
|
|
|
| |
Move get_recursion_depth() function from _testcapi to
_testinternalcapi to avoid accessing PyThreadState attributes
directly in _testcapi.
|
|
|
|
|
|
| |
Move the static inline function flavor of Py_EnterRecursiveCall() and
Py_LeaveRecursiveCall() to the internal C API: they access
PyThreadState attributes. The limited C API provides regular
functions which hide implementation details.
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyInterpreterState.eval_frame function now requires a tstate (Python
thread state) parameter.
Add private functions to the C API to get and set the frame
evaluation function:
* Add tstate parameter to _PyFrameEvalFunction function type.
* Add _PyInterpreterState_GetEvalFrameFunc() and
_PyInterpreterState_SetEvalFrameFunc() functions.
* Add tstate parameter to _PyEval_EvalFrameDefault().
|
|
|
|
|
|
|
|
| |
AIX: Fix _aix_support module when the subprocess is not available,
when building Python from scratch. It now uses new private
_bootsubprocess module, rather than having two implementations
depending if subprocess is available or not. So
_aix_support.aix_platform() result is now the same if subprocess is
available or not.
|
|
|
| |
- When casting to _Bool, arrays should only contain zeros or ones.
|
| |
|
|
|
|
|
| |
Received email on the docs mailing list to fix a typo from `sys.platlitdir` which doesn't exist to the correct new attribute `sys.platlibdir`
Automerge-Triggered-By: @vstinner
|
|
|
|
| |
* Remove unused tstate argument from init_set_builtins_open()
* Replace fd (int) with tstate (PyThreadState *) in in _Py_FatalError_PrintExc()
|