summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Python
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/Python')
-rw-r--r--contrib/tools/python3/Python/Python-ast.c4
-rw-r--r--contrib/tools/python3/Python/ceval.c6
-rw-r--r--contrib/tools/python3/Python/context.c12
-rw-r--r--contrib/tools/python3/Python/crossinterp.c16
-rw-r--r--contrib/tools/python3/Python/errors.c6
-rw-r--r--contrib/tools/python3/Python/frozen_modules/_sitebuiltins.h216
-rw-r--r--contrib/tools/python3/Python/frozen_modules/stat.h318
-rw-r--r--contrib/tools/python3/Python/hamt.c27
-rw-r--r--contrib/tools/python3/Python/import.c11
-rw-r--r--contrib/tools/python3/Python/initconfig.c4
-rw-r--r--contrib/tools/python3/Python/marshal.c4
-rw-r--r--contrib/tools/python3/Python/perf_jit_trampoline.c4
-rw-r--r--contrib/tools/python3/Python/perf_trampoline.c68
-rw-r--r--contrib/tools/python3/Python/pylifecycle.c2
-rw-r--r--contrib/tools/python3/Python/pystate.c8
-rw-r--r--contrib/tools/python3/Python/sysmodule.c23
-rw-r--r--contrib/tools/python3/Python/traceback.c3
17 files changed, 405 insertions, 327 deletions
diff --git a/contrib/tools/python3/Python/Python-ast.c b/contrib/tools/python3/Python/Python-ast.c
index a71262c7f84..1871ca3fb3d 100644
--- a/contrib/tools/python3/Python/Python-ast.c
+++ b/contrib/tools/python3/Python/Python-ast.c
@@ -5136,7 +5136,7 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
}
if (p == 0) {
PyErr_Format(PyExc_TypeError,
- "%.400s got multiple values for argument '%U'",
+ "%.400s got multiple values for argument %R",
Py_TYPE(self)->tp_name, key);
res = -1;
goto cleanup;
@@ -5159,7 +5159,7 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
else if (contains == 0) {
if (PyErr_WarnFormat(
PyExc_DeprecationWarning, 1,
- "%.400s.__init__ got an unexpected keyword argument '%U'. "
+ "%.400s.__init__ got an unexpected keyword argument %R. "
"Support for arbitrary keyword arguments is deprecated "
"and will be removed in Python 3.15.",
Py_TYPE(self)->tp_name, key
diff --git a/contrib/tools/python3/Python/ceval.c b/contrib/tools/python3/Python/ceval.c
index 0be6c57c1cf..ca07bfbaaf6 100644
--- a/contrib/tools/python3/Python/ceval.c
+++ b/contrib/tools/python3/Python/ceval.c
@@ -1696,10 +1696,10 @@ clear_gen_frame(PyThreadState *tstate, _PyInterpreterFrame * frame)
gen->gi_exc_state.previous_item = NULL;
tstate->c_recursion_remaining--;
assert(frame->frame_obj == NULL || frame->frame_obj->f_frame == frame);
+ frame->previous = NULL;
_PyFrame_ClearExceptCode(frame);
_PyErr_ClearExcState(&gen->gi_exc_state);
tstate->c_recursion_remaining++;
- frame->previous = NULL;
}
void
@@ -2272,6 +2272,10 @@ monitor_unwind(PyThreadState *tstate,
do_monitor_exc(tstate, frame, instr, PY_MONITORING_EVENT_PY_UNWIND);
}
+bool
+_PyEval_NoToolsForUnwind(PyThreadState *tstate) {
+ return no_tools_for_global_event(tstate, PY_MONITORING_EVENT_PY_UNWIND);
+}
static int
monitor_handled(PyThreadState *tstate,
diff --git a/contrib/tools/python3/Python/context.c b/contrib/tools/python3/Python/context.c
index c9675f44772..1b2797b8af5 100644
--- a/contrib/tools/python3/Python/context.c
+++ b/contrib/tools/python3/Python/context.c
@@ -264,12 +264,6 @@ PyContextVar_Set(PyObject *ovar, PyObject *val)
ENSURE_ContextVar(ovar, NULL)
PyContextVar *var = (PyContextVar *)ovar;
- if (!PyContextVar_CheckExact(var)) {
- PyErr_SetString(
- PyExc_TypeError, "an instance of ContextVar was expected");
- return NULL;
- }
-
PyContext *ctx = context_get();
if (ctx == NULL) {
return NULL;
@@ -979,12 +973,6 @@ static PyObject *
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value)
/*[clinic end generated code: output=0746bd0aa2ced7bf input=30aa2ab9e433e401]*/
{
- if (!PyContextVar_CheckExact(self)) {
- PyErr_SetString(
- PyExc_TypeError, "an instance of ContextVar was expected");
- return NULL;
- }
-
PyObject *val;
if (PyContextVar_Get((PyObject *)self, default_value, &val) < 0) {
return NULL;
diff --git a/contrib/tools/python3/Python/crossinterp.c b/contrib/tools/python3/Python/crossinterp.c
index 2f6324d300d..d150c6e03c0 100644
--- a/contrib/tools/python3/Python/crossinterp.c
+++ b/contrib/tools/python3/Python/crossinterp.c
@@ -337,7 +337,7 @@ _PyCrossInterpreterData_ReleaseAndRawFree(_PyCrossInterpreterData *data)
/* convenience utilities */
/*************************/
-static const char *
+static char *
_copy_string_obj_raw(PyObject *strobj, Py_ssize_t *p_size)
{
Py_ssize_t size = -1;
@@ -441,11 +441,16 @@ _format_TracebackException(PyObject *tbexc)
}
Py_ssize_t size = -1;
- const char *formatted = _copy_string_obj_raw(formatted_obj, &size);
+ char *formatted = _copy_string_obj_raw(formatted_obj, &size);
Py_DECREF(formatted_obj);
- // We remove trailing the newline added by TracebackException.format().
- assert(formatted[size-1] == '\n');
- ((char *)formatted)[size-1] = '\0';
+ if (formatted == NULL || size == 0) {
+ return formatted;
+ }
+ assert(formatted[size] == '\0');
+ // Remove a trailing newline if needed.
+ if (formatted[size-1] == '\n') {
+ formatted[size-1] = '\0';
+ }
return formatted;
}
@@ -1687,6 +1692,7 @@ _PyXI_ApplyCapturedException(_PyXI_session *session)
assert(session->error != NULL);
PyObject *res = _PyXI_ApplyError(session->error);
assert((res == NULL) != (PyErr_Occurred() == NULL));
+ _PyXI_excinfo_Clear(&session->error->uncaught);
session->error = NULL;
return res;
}
diff --git a/contrib/tools/python3/Python/errors.c b/contrib/tools/python3/Python/errors.c
index 63e4844b1c0..b565722ef56 100644
--- a/contrib/tools/python3/Python/errors.c
+++ b/contrib/tools/python3/Python/errors.c
@@ -1598,6 +1598,7 @@ format_unraisable_v(const char *format, va_list va, PyObject *obj)
_Py_EnsureTstateNotNULL(tstate);
PyObject *err_msg = NULL;
+ PyObject *hook = NULL;
PyObject *exc_type, *exc_value, *exc_tb;
_PyErr_Fetch(tstate, &exc_type, &exc_value, &exc_tb);
@@ -1642,7 +1643,6 @@ format_unraisable_v(const char *format, va_list va, PyObject *obj)
goto error;
}
- PyObject *hook;
if (_PySys_GetOptionalAttr(&_Py_ID(unraisablehook), &hook) < 0) {
Py_DECREF(hook_args);
err_msg_str = NULL;
@@ -1655,7 +1655,6 @@ format_unraisable_v(const char *format, va_list va, PyObject *obj)
}
if (_PySys_Audit(tstate, "sys.unraisablehook", "OO", hook, hook_args) < 0) {
- Py_DECREF(hook);
Py_DECREF(hook_args);
err_msg_str = "Exception ignored in audit hook";
obj = NULL;
@@ -1663,13 +1662,11 @@ format_unraisable_v(const char *format, va_list va, PyObject *obj)
}
if (hook == Py_None) {
- Py_DECREF(hook);
Py_DECREF(hook_args);
goto default_hook;
}
PyObject *res = PyObject_CallOneArg(hook, hook_args);
- Py_DECREF(hook);
Py_DECREF(hook_args);
if (res != NULL) {
Py_DECREF(res);
@@ -1699,6 +1696,7 @@ done:
Py_XDECREF(exc_value);
Py_XDECREF(exc_tb);
Py_XDECREF(err_msg);
+ Py_XDECREF(hook);
_PyErr_Clear(tstate); /* Just in case */
}
diff --git a/contrib/tools/python3/Python/frozen_modules/_sitebuiltins.h b/contrib/tools/python3/Python/frozen_modules/_sitebuiltins.h
index 5913f78f1a3..4455a6bdb0d 100644
--- a/contrib/tools/python3/Python/frozen_modules/_sitebuiltins.h
+++ b/contrib/tools/python3/Python/frozen_modules/_sitebuiltins.h
@@ -85,7 +85,7 @@ const unsigned char _Py_M___sitebuiltins[] = {
0,0,0,0,0,0,9,0,0,0,3,0,0,0,243,184,
0,0,0,149,0,83,1,83,0,75,0,110,5,88,16,108,
1,0,0,0,0,0,0,0,0,88,32,108,2,0,0,0,
- 0,0,0,0,0,83,0,85,0,108,3,0,0,0,0,0,
+ 0,0,0,0,0,47,0,85,0,108,3,0,0,0,0,0,
0,0,0,85,4,19,0,86,6,86,7,115,3,47,0,115,
2,19,0,72,40,0,0,110,6,85,3,19,0,19,0,72,
30,0,0,110,7,85,5,82,8,0,0,0,0,0,0,0,
@@ -108,7 +108,7 @@ const unsigned char _Py_M___sitebuiltins[] = {
114,13,0,0,0,218,17,95,80,114,105,110,116,101,114,46,
95,95,105,110,105,116,95,95,35,0,0,0,115,85,0,0,
0,128,0,219,8,17,216,22,26,140,11,216,22,26,140,11,
- 216,23,27,136,4,140,12,225,39,43,244,3,2,28,51,218,
+ 216,23,25,136,4,140,12,225,39,43,244,3,2,28,51,218,
39,43,160,3,220,44,49,160,8,240,5,0,29,31,159,71,
153,71,159,76,153,76,168,19,214,28,55,225,44,49,241,5,
0,29,56,217,39,43,242,3,2,28,51,136,4,213,8,24,
@@ -188,121 +188,101 @@ const unsigned char _Py_M___sitebuiltins[] = {
12,42,224,19,54,184,52,191,59,185,59,184,46,200,17,209,
58,74,209,19,75,208,12,75,114,15,0,0,0,99,1,0,
0,0,0,0,0,0,0,0,0,0,5,0,0,0,3,0,
- 0,0,243,38,1,0,0,149,0,85,0,82,1,0,0,0,
+ 0,0,243,148,0,0,0,149,0,83,1,83,2,75,0,74,
+ 1,110,1,32,0,85,0,82,5,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,53,0,0,0,0,
+ 0,0,0,32,0,85,1,34,0,53,0,0,0,0,0,0,
+ 0,110,2,83,3,82,7,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,85,0,82,8,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,
- 0,0,0,0,0,0,0,32,0,83,1,110,1,83,2,110,
- 2,30,0,30,0,91,3,0,0,0,0,0,0,0,0,88,
- 34,85,0,82,4,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,45,0,0,0,53,2,0,0,0,
- 0,0,0,19,0,72,27,0,0,110,3,91,7,0,0,0,
- 0,0,0,0,0,85,0,82,8,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,85,3,5,0,0,
- 0,53,1,0,0,0,0,0,0,32,0,77,29,0,0,11,
- 0,32,0,88,32,82,4,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,45,13,0,0,110,2,83,
- 0,110,4,85,4,99,24,0,0,91,11,0,0,0,0,0,
- 0,0,0,85,1,53,1,0,0,0,0,0,0,110,4,85,
- 4,83,3,59,1,0,0,97,2,0,0,83,0,110,4,85,
- 4,99,2,0,0,77,24,0,0,85,4,83,4,58,88,0,
- 0,97,1,0,0,103,0,30,0,77,109,0,0,33,0,91,
- 12,0,0,0,0,0,0,0,0,7,0,97,3,0,0,32,
- 0,31,0,103,0,102,0,61,3,31,0,102,1,41,5,78,
- 122,48,72,105,116,32,82,101,116,117,114,110,32,102,111,114,
- 32,109,111,114,101,44,32,111,114,32,113,32,40,97,110,100,
- 32,82,101,116,117,114,110,41,32,116,111,32,113,117,105,116,
- 58,32,114,2,0,0,0,41,2,218,0,218,1,113,114,72,
- 0,0,0,41,7,114,67,0,0,0,218,5,114,97,110,103,
- 101,114,68,0,0,0,218,5,112,114,105,110,116,114,43,0,
- 0,0,218,5,105,110,112,117,116,218,10,73,110,100,101,120,
- 69,114,114,111,114,41,5,114,11,0,0,0,218,6,112,114,
- 111,109,112,116,218,6,108,105,110,101,110,111,218,1,105,218,
- 3,107,101,121,115,5,0,0,0,32,32,32,32,32,114,12,
- 0,0,0,114,26,0,0,0,218,17,95,80,114,105,110,116,
- 101,114,46,95,95,99,97,108,108,95,95,67,0,0,0,115,
- 164,0,0,0,128,0,216,8,12,143,12,137,12,140,14,216,
- 17,67,136,6,216,17,18,136,6,216,14,15,240,2,13,13,
- 26,220,25,30,152,118,176,4,183,13,177,13,209,39,61,214,
- 25,62,144,65,220,20,25,152,36,159,44,153,44,160,113,153,
- 47,214,20,42,241,3,0,26,63,240,10,0,17,23,159,45,
- 153,45,209,16,39,144,6,216,22,26,144,3,216,22,25,145,
- 107,220,26,31,160,6,155,45,144,67,216,23,26,160,41,211,
- 23,43,216,30,34,152,3,240,7,0,23,26,147,107,240,8,
- 0,20,23,152,35,147,58,216,20,25,240,3,0,20,30,241,
- 27,0,15,16,248,244,8,0,20,30,243,0,1,13,22,217,
- 16,21,240,3,1,13,22,250,115,17,0,0,0,151,55,66,
- 3,0,194,3,10,66,16,3,194,15,1,66,16,3,41,5,
- 218,6,95,95,100,97,116,97,218,11,95,95,102,105,108,101,
- 110,97,109,101,115,218,9,95,95,108,105,110,101,99,110,116,
- 218,7,95,95,108,105,110,101,115,218,6,95,95,110,97,109,
- 101,78,41,2,114,33,0,0,0,114,33,0,0,0,41,11,
- 114,28,0,0,0,114,29,0,0,0,114,30,0,0,0,114,
- 31,0,0,0,218,7,95,95,100,111,99,95,95,114,68,0,
- 0,0,114,13,0,0,0,114,67,0,0,0,114,18,0,0,
- 0,114,26,0,0,0,114,32,0,0,0,114,33,0,0,0,
- 114,15,0,0,0,114,12,0,0,0,114,35,0,0,0,114,
- 35,0,0,0,29,0,0,0,115,35,0,0,0,134,0,241,
- 2,1,5,46,240,6,0,16,18,128,72,244,4,7,5,51,
- 242,18,14,5,43,242,32,5,5,76,1,245,14,18,5,26,
- 114,15,0,0,0,114,35,0,0,0,99,0,0,0,0,0,
- 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,243,
- 36,0,0,0,149,0,92,0,114,1,83,0,114,2,83,1,
- 114,3,83,2,114,4,83,3,26,0,114,5,83,4,26,0,
- 114,6,83,5,114,7,103,6,41,7,218,7,95,72,101,108,
- 112,101,114,233,88,0,0,0,97,31,1,0,0,68,101,102,
- 105,110,101,32,116,104,101,32,98,117,105,108,116,105,110,32,
- 39,104,101,108,112,39,46,10,10,84,104,105,115,32,105,115,
- 32,97,32,119,114,97,112,112,101,114,32,97,114,111,117,110,
- 100,32,112,121,100,111,99,46,104,101,108,112,32,116,104,97,
- 116,32,112,114,111,118,105,100,101,115,32,97,32,104,101,108,
- 112,102,117,108,32,109,101,115,115,97,103,101,10,119,104,101,
- 110,32,39,104,101,108,112,39,32,105,115,32,116,121,112,101,
- 100,32,97,116,32,116,104,101,32,80,121,116,104,111,110,32,
- 105,110,116,101,114,97,99,116,105,118,101,32,112,114,111,109,
- 112,116,46,10,10,67,97,108,108,105,110,103,32,104,101,108,
- 112,40,41,32,97,116,32,116,104,101,32,80,121,116,104,111,
- 110,32,112,114,111,109,112,116,32,115,116,97,114,116,115,32,
- 97,110,32,105,110,116,101,114,97,99,116,105,118,101,32,104,
- 101,108,112,32,115,101,115,115,105,111,110,46,10,67,97,108,
- 108,105,110,103,32,104,101,108,112,40,116,104,105,110,103,41,
- 32,112,114,105,110,116,115,32,104,101,108,112,32,102,111,114,
- 32,116,104,101,32,112,121,116,104,111,110,32,111,98,106,101,
- 99,116,32,39,116,104,105,110,103,39,46,10,99,1,0,0,
- 0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,
- 0,243,4,0,0,0,149,0,103,1,41,2,78,122,72,84,
- 121,112,101,32,104,101,108,112,40,41,32,102,111,114,32,105,
- 110,116,101,114,97,99,116,105,118,101,32,104,101,108,112,44,
- 32,111,114,32,104,101,108,112,40,111,98,106,101,99,116,41,
- 32,102,111,114,32,104,101,108,112,32,97,98,111,117,116,32,
- 111,98,106,101,99,116,46,114,33,0,0,0,114,17,0,0,
- 0,115,1,0,0,0,32,114,12,0,0,0,114,18,0,0,
- 0,218,16,95,72,101,108,112,101,114,46,95,95,114,101,112,
- 114,95,95,98,0,0,0,115,7,0,0,0,128,0,240,2,
- 1,16,56,114,15,0,0,0,99,1,0,0,0,0,0,0,
- 0,0,0,0,0,5,0,0,0,15,0,0,0,243,46,0,
- 0,0,149,0,83,1,83,0,75,0,110,3,85,3,82,2,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,34,0,85,1,48,0,85,2,68,1,54,1,36,0,
- 114,39,0,0,0,41,2,218,5,112,121,100,111,99,218,4,
- 104,101,108,112,41,4,114,11,0,0,0,218,4,97,114,103,
- 115,218,4,107,119,100,115,114,94,0,0,0,115,4,0,0,
- 0,32,32,32,32,114,12,0,0,0,114,26,0,0,0,218,
- 16,95,72,101,108,112,101,114,46,95,95,99,97,108,108,95,
- 95,101,0,0,0,115,25,0,0,0,128,0,219,8,20,216,
- 15,20,143,122,138,122,152,52,208,15,40,160,52,209,15,40,
- 208,8,40,114,15,0,0,0,114,33,0,0,0,78,41,8,
- 114,28,0,0,0,114,29,0,0,0,114,30,0,0,0,114,
- 31,0,0,0,114,87,0,0,0,114,18,0,0,0,114,26,
- 0,0,0,114,32,0,0,0,114,33,0,0,0,114,15,0,
- 0,0,114,12,0,0,0,114,89,0,0,0,114,89,0,0,
- 0,88,0,0,0,115,17,0,0,0,134,0,241,2,7,5,
- 8,242,18,2,5,56,245,6,2,5,41,114,15,0,0,0,
- 114,89,0,0,0,41,6,114,87,0,0,0,114,21,0,0,
- 0,218,6,111,98,106,101,99,116,114,4,0,0,0,114,35,
- 0,0,0,114,89,0,0,0,114,33,0,0,0,114,15,0,
- 0,0,114,12,0,0,0,218,8,60,109,111,100,117,108,101,
- 62,114,100,0,0,0,1,0,0,0,115,52,0,0,0,240,
- 3,1,1,1,241,2,2,1,4,243,20,0,1,11,244,4,
- 13,1,31,136,102,244,0,13,1,31,244,32,56,1,26,136,
- 118,244,0,56,1,26,244,118,1,15,1,41,136,102,245,0,
- 15,1,41,114,15,0,0,0,
+ 1,0,0,0,0,0,0,110,3,85,2,34,0,88,48,82,
+ 10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,83,4,57,2,32,0,103,0,41,5,78,114,2,
+ 0,0,0,41,1,218,9,103,101,116,95,112,97,103,101,114,
+ 114,55,0,0,0,41,1,218,5,116,105,116,108,101,41,6,
+ 218,13,95,112,121,114,101,112,108,46,112,97,103,101,114,114,
+ 71,0,0,0,114,67,0,0,0,114,45,0,0,0,114,43,
+ 0,0,0,114,41,0,0,0,41,4,114,11,0,0,0,114,
+ 71,0,0,0,218,5,112,97,103,101,114,218,4,116,101,120,
+ 116,115,4,0,0,0,32,32,32,32,114,12,0,0,0,114,
+ 26,0,0,0,218,17,95,80,114,105,110,116,101,114,46,95,
+ 95,99,97,108,108,95,95,67,0,0,0,115,51,0,0,0,
+ 128,0,221,8,43,216,8,12,143,12,137,12,140,14,225,16,
+ 25,147,11,136,5,216,15,19,143,121,137,121,152,20,159,28,
+ 153,28,211,15,38,136,4,217,8,13,136,100,159,43,153,43,
+ 211,8,38,114,15,0,0,0,41,5,218,6,95,95,100,97,
+ 116,97,218,11,95,95,102,105,108,101,110,97,109,101,115,218,
+ 9,95,95,108,105,110,101,99,110,116,218,7,95,95,108,105,
+ 110,101,115,218,6,95,95,110,97,109,101,78,41,2,114,33,
+ 0,0,0,114,33,0,0,0,41,11,114,28,0,0,0,114,
+ 29,0,0,0,114,30,0,0,0,114,31,0,0,0,218,7,
+ 95,95,100,111,99,95,95,114,68,0,0,0,114,13,0,0,
+ 0,114,67,0,0,0,114,18,0,0,0,114,26,0,0,0,
+ 114,32,0,0,0,114,33,0,0,0,114,15,0,0,0,114,
+ 12,0,0,0,114,35,0,0,0,114,35,0,0,0,29,0,
+ 0,0,115,35,0,0,0,134,0,241,2,1,5,46,240,6,
+ 0,16,18,128,72,244,4,7,5,51,242,18,14,5,43,242,
+ 32,5,5,76,1,245,14,6,5,39,114,15,0,0,0,114,
+ 35,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,
+ 0,1,0,0,0,0,0,0,0,243,36,0,0,0,149,0,
+ 92,0,114,1,83,0,114,2,83,1,114,3,83,2,114,4,
+ 83,3,26,0,114,5,83,4,26,0,114,6,83,5,114,7,
+ 103,6,41,7,218,7,95,72,101,108,112,101,114,233,76,0,
+ 0,0,97,31,1,0,0,68,101,102,105,110,101,32,116,104,
+ 101,32,98,117,105,108,116,105,110,32,39,104,101,108,112,39,
+ 46,10,10,84,104,105,115,32,105,115,32,97,32,119,114,97,
+ 112,112,101,114,32,97,114,111,117,110,100,32,112,121,100,111,
+ 99,46,104,101,108,112,32,116,104,97,116,32,112,114,111,118,
+ 105,100,101,115,32,97,32,104,101,108,112,102,117,108,32,109,
+ 101,115,115,97,103,101,10,119,104,101,110,32,39,104,101,108,
+ 112,39,32,105,115,32,116,121,112,101,100,32,97,116,32,116,
+ 104,101,32,80,121,116,104,111,110,32,105,110,116,101,114,97,
+ 99,116,105,118,101,32,112,114,111,109,112,116,46,10,10,67,
+ 97,108,108,105,110,103,32,104,101,108,112,40,41,32,97,116,
+ 32,116,104,101,32,80,121,116,104,111,110,32,112,114,111,109,
+ 112,116,32,115,116,97,114,116,115,32,97,110,32,105,110,116,
+ 101,114,97,99,116,105,118,101,32,104,101,108,112,32,115,101,
+ 115,115,105,111,110,46,10,67,97,108,108,105,110,103,32,104,
+ 101,108,112,40,116,104,105,110,103,41,32,112,114,105,110,116,
+ 115,32,104,101,108,112,32,102,111,114,32,116,104,101,32,112,
+ 121,116,104,111,110,32,111,98,106,101,99,116,32,39,116,104,
+ 105,110,103,39,46,10,99,1,0,0,0,0,0,0,0,0,
+ 0,0,0,1,0,0,0,3,0,0,0,243,4,0,0,0,
+ 149,0,103,1,41,2,78,122,72,84,121,112,101,32,104,101,
+ 108,112,40,41,32,102,111,114,32,105,110,116,101,114,97,99,
+ 116,105,118,101,32,104,101,108,112,44,32,111,114,32,104,101,
+ 108,112,40,111,98,106,101,99,116,41,32,102,111,114,32,104,
+ 101,108,112,32,97,98,111,117,116,32,111,98,106,101,99,116,
+ 46,114,33,0,0,0,114,17,0,0,0,115,1,0,0,0,
+ 32,114,12,0,0,0,114,18,0,0,0,218,16,95,72,101,
+ 108,112,101,114,46,95,95,114,101,112,114,95,95,86,0,0,
+ 0,115,7,0,0,0,128,0,240,2,1,16,56,114,15,0,
+ 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,5,
+ 0,0,0,15,0,0,0,243,46,0,0,0,149,0,83,1,
+ 83,0,75,0,110,3,85,3,82,2,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,34,0,85,1,
+ 48,0,85,2,68,1,54,1,36,0,114,39,0,0,0,41,
+ 2,218,5,112,121,100,111,99,218,4,104,101,108,112,41,4,
+ 114,11,0,0,0,218,4,97,114,103,115,218,4,107,119,100,
+ 115,114,89,0,0,0,115,4,0,0,0,32,32,32,32,114,
+ 12,0,0,0,114,26,0,0,0,218,16,95,72,101,108,112,
+ 101,114,46,95,95,99,97,108,108,95,95,89,0,0,0,115,
+ 25,0,0,0,128,0,219,8,20,216,15,20,143,122,138,122,
+ 152,52,208,15,40,160,52,209,15,40,208,8,40,114,15,0,
+ 0,0,114,33,0,0,0,78,41,8,114,28,0,0,0,114,
+ 29,0,0,0,114,30,0,0,0,114,31,0,0,0,114,82,
+ 0,0,0,114,18,0,0,0,114,26,0,0,0,114,32,0,
+ 0,0,114,33,0,0,0,114,15,0,0,0,114,12,0,0,
+ 0,114,84,0,0,0,114,84,0,0,0,76,0,0,0,115,
+ 17,0,0,0,134,0,241,2,7,5,8,242,18,2,5,56,
+ 245,6,2,5,41,114,15,0,0,0,114,84,0,0,0,41,
+ 6,114,82,0,0,0,114,21,0,0,0,218,6,111,98,106,
+ 101,99,116,114,4,0,0,0,114,35,0,0,0,114,84,0,
+ 0,0,114,33,0,0,0,114,15,0,0,0,114,12,0,0,
+ 0,218,8,60,109,111,100,117,108,101,62,114,95,0,0,0,
+ 1,0,0,0,115,52,0,0,0,240,3,1,1,1,241,2,
+ 2,1,4,243,20,0,1,11,244,4,13,1,31,136,102,244,
+ 0,13,1,31,244,32,44,1,39,136,118,244,0,44,1,39,
+ 244,94,1,15,1,41,136,102,245,0,15,1,41,114,15,0,
+ 0,0,
};
diff --git a/contrib/tools/python3/Python/frozen_modules/stat.h b/contrib/tools/python3/Python/frozen_modules/stat.h
index 62b2f11b8a2..0f7254b5fa9 100644
--- a/contrib/tools/python3/Python/frozen_modules/stat.h
+++ b/contrib/tools/python3/Python/frozen_modules/stat.h
@@ -186,162 +186,170 @@ const unsigned char _Py_M__stat[] = {
0,64,218,1,108,218,1,115,218,1,45,218,1,98,218,1,
100,218,1,99,218,1,112,218,1,114,218,1,119,218,1,83,
218,1,120,218,1,116,218,1,84,99,1,0,0,0,0,0,
- 0,0,0,0,0,0,5,0,0,0,3,0,0,0,243,250,
- 0,0,0,149,0,47,0,110,1,91,1,0,0,0,0,0,
+ 0,0,0,0,0,0,5,0,0,0,3,0,0,0,243,80,
+ 1,0,0,149,0,47,0,110,1,91,1,0,0,0,0,0,
0,0,0,91,2,0,0,0,0,0,0,0,0,53,1,0,
- 0,0,0,0,0,19,0,72,86,0,0,117,2,0,0,112,
- 35,85,3,19,0,72,33,0,0,117,2,0,0,112,69,88,
- 4,45,1,0,0,85,4,58,88,0,0,100,2,0,0,77,
- 15,0,0,85,1,82,5,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,85,5,53,1,0,0,0,
- 0,0,0,32,0,32,0,77,42,0,0,11,0,32,0,85,
- 2,83,1,58,88,0,0,97,19,0,0,85,1,82,5,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,83,2,53,1,0,0,0,0,0,0,32,0,77,69,0,
- 0,85,1,82,5,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,83,3,53,1,0,0,0,0,0,
- 0,32,0,77,88,0,0,11,0,32,0,83,4,82,7,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,85,1,53,1,0,0,0,0,0,0,36,0,41,5,122,
- 59,67,111,110,118,101,114,116,32,97,32,102,105,108,101,39,
- 115,32,109,111,100,101,32,116,111,32,97,32,115,116,114,105,
- 110,103,32,111,102,32,116,104,101,32,102,111,114,109,32,39,
- 45,114,119,120,114,119,120,114,119,120,39,46,114,2,0,0,
- 0,218,1,63,114,58,0,0,0,218,0,41,4,218,9,101,
- 110,117,109,101,114,97,116,101,218,15,95,102,105,108,101,109,
- 111,100,101,95,116,97,98,108,101,218,6,97,112,112,101,110,
- 100,218,4,106,111,105,110,41,6,114,15,0,0,0,218,4,
- 112,101,114,109,218,5,105,110,100,101,120,218,5,116,97,98,
- 108,101,218,3,98,105,116,218,4,99,104,97,114,115,6,0,
- 0,0,32,32,32,32,32,32,114,16,0,0,0,218,8,102,
- 105,108,101,109,111,100,101,114,81,0,0,0,164,0,0,0,
- 115,110,0,0,0,128,0,224,11,13,128,68,220,24,33,164,
- 47,214,24,50,137,12,136,5,219,25,30,137,73,136,67,216,
- 15,19,137,122,152,83,213,15,32,216,16,20,151,11,145,11,
- 152,68,212,16,33,218,16,21,241,7,0,26,31,240,10,0,
- 16,21,152,1,139,122,224,16,20,151,11,145,11,152,67,214,
- 16,32,224,16,20,151,11,145,11,152,67,214,16,32,241,21,
- 0,25,51,240,22,0,12,14,143,55,137,55,144,52,139,61,
- 208,4,24,114,18,0,0,0,41,1,218,1,42,78,41,92,
- 218,7,95,95,100,111,99,95,95,218,7,83,84,95,77,79,
- 68,69,218,6,83,84,95,73,78,79,218,6,83,84,95,68,
- 69,86,218,8,83,84,95,78,76,73,78,75,218,6,83,84,
- 95,85,73,68,218,6,83,84,95,71,73,68,218,7,83,84,
- 95,83,73,90,69,218,8,83,84,95,65,84,73,77,69,218,
- 8,83,84,95,77,84,73,77,69,218,8,83,84,95,67,84,
- 73,77,69,114,17,0,0,0,114,20,0,0,0,114,22,0,
- 0,0,114,26,0,0,0,114,29,0,0,0,114,32,0,0,
- 0,114,35,0,0,0,114,38,0,0,0,114,41,0,0,0,
- 218,8,83,95,73,70,68,79,79,82,218,8,83,95,73,70,
- 80,79,82,84,218,7,83,95,73,70,87,72,84,114,23,0,
- 0,0,114,27,0,0,0,114,30,0,0,0,114,33,0,0,
- 0,114,36,0,0,0,114,39,0,0,0,114,42,0,0,0,
- 114,44,0,0,0,114,47,0,0,0,114,49,0,0,0,218,
- 7,83,95,73,83,85,73,68,218,7,83,95,73,83,71,73,
- 68,218,7,83,95,69,78,70,77,84,218,7,83,95,73,83,
- 86,84,88,218,7,83,95,73,82,69,65,68,218,8,83,95,
- 73,87,82,73,84,69,218,7,83,95,73,69,88,69,67,218,
- 7,83,95,73,82,87,88,85,218,7,83,95,73,82,85,83,
- 82,218,7,83,95,73,87,85,83,82,218,7,83,95,73,88,
- 85,83,82,218,7,83,95,73,82,87,88,71,218,7,83,95,
- 73,82,71,82,80,218,7,83,95,73,87,71,82,80,218,7,
- 83,95,73,88,71,82,80,218,7,83,95,73,82,87,88,79,
- 218,7,83,95,73,82,79,84,72,218,7,83,95,73,87,79,
- 84,72,218,7,83,95,73,88,79,84,72,218,11,85,70,95,
- 83,69,84,84,65,66,76,69,218,9,85,70,95,78,79,68,
- 85,77,80,218,12,85,70,95,73,77,77,85,84,65,66,76,
- 69,218,9,85,70,95,65,80,80,69,78,68,218,9,85,70,
- 95,79,80,65,81,85,69,218,11,85,70,95,78,79,85,78,
- 76,73,78,75,218,13,85,70,95,67,79,77,80,82,69,83,
- 83,69,68,218,10,85,70,95,84,82,65,67,75,69,68,218,
- 12,85,70,95,68,65,84,65,86,65,85,76,84,218,9,85,
- 70,95,72,73,68,68,69,78,218,11,83,70,95,83,69,84,
- 84,65,66,76,69,218,11,83,70,95,65,82,67,72,73,86,
- 69,68,218,12,83,70,95,73,77,77,85,84,65,66,76,69,
- 218,9,83,70,95,65,80,80,69,78,68,218,13,83,70,95,
- 82,69,83,84,82,73,67,84,69,68,218,11,83,70,95,78,
- 79,85,78,76,73,78,75,218,11,83,70,95,83,78,65,80,
- 83,72,79,84,218,11,83,70,95,70,73,82,77,76,73,78,
- 75,218,11,83,70,95,68,65,84,65,76,69,83,83,114,73,
- 0,0,0,114,81,0,0,0,218,22,70,73,76,69,95,65,
- 84,84,82,73,66,85,84,69,95,65,82,67,72,73,86,69,
- 218,25,70,73,76,69,95,65,84,84,82,73,66,85,84,69,
- 95,67,79,77,80,82,69,83,83,69,68,218,21,70,73,76,
- 69,95,65,84,84,82,73,66,85,84,69,95,68,69,86,73,
- 67,69,218,24,70,73,76,69,95,65,84,84,82,73,66,85,
- 84,69,95,68,73,82,69,67,84,79,82,89,218,24,70,73,
- 76,69,95,65,84,84,82,73,66,85,84,69,95,69,78,67,
- 82,89,80,84,69,68,218,21,70,73,76,69,95,65,84,84,
- 82,73,66,85,84,69,95,72,73,68,68,69,78,218,31,70,
- 73,76,69,95,65,84,84,82,73,66,85,84,69,95,73,78,
- 84,69,71,82,73,84,89,95,83,84,82,69,65,77,218,21,
- 70,73,76,69,95,65,84,84,82,73,66,85,84,69,95,78,
- 79,82,77,65,76,218,34,70,73,76,69,95,65,84,84,82,
- 73,66,85,84,69,95,78,79,84,95,67,79,78,84,69,78,
- 84,95,73,78,68,69,88,69,68,218,28,70,73,76,69,95,
- 65,84,84,82,73,66,85,84,69,95,78,79,95,83,67,82,
- 85,66,95,68,65,84,65,218,22,70,73,76,69,95,65,84,
- 84,82,73,66,85,84,69,95,79,70,70,76,73,78,69,218,
- 23,70,73,76,69,95,65,84,84,82,73,66,85,84,69,95,
- 82,69,65,68,79,78,76,89,218,28,70,73,76,69,95,65,
- 84,84,82,73,66,85,84,69,95,82,69,80,65,82,83,69,
- 95,80,79,73,78,84,218,26,70,73,76,69,95,65,84,84,
- 82,73,66,85,84,69,95,83,80,65,82,83,69,95,70,73,
- 76,69,218,21,70,73,76,69,95,65,84,84,82,73,66,85,
- 84,69,95,83,89,83,84,69,77,218,24,70,73,76,69,95,
- 65,84,84,82,73,66,85,84,69,95,84,69,77,80,79,82,
- 65,82,89,218,22,70,73,76,69,95,65,84,84,82,73,66,
- 85,84,69,95,86,73,82,84,85,65,76,218,5,95,115,116,
- 97,116,218,11,73,109,112,111,114,116,69,114,114,111,114,114,
- 13,0,0,0,114,18,0,0,0,114,16,0,0,0,218,8,
- 60,109,111,100,117,108,101,62,114,154,0,0,0,1,0,0,
- 0,115,232,2,0,0,240,3,1,1,1,241,2,3,1,4,
- 240,14,0,12,13,128,7,216,11,12,128,6,216,11,12,128,
- 6,216,11,12,128,8,216,11,12,128,6,216,11,12,128,6,
- 216,11,12,128,7,216,11,12,128,8,216,11,12,128,8,216,
- 11,12,128,8,242,8,4,1,25,242,12,4,1,27,240,18,
- 0,12,20,128,7,216,11,19,128,7,216,11,19,128,7,216,
- 11,19,128,7,216,11,19,128,7,216,11,19,128,7,216,11,
- 19,128,8,224,11,12,128,8,216,11,12,128,8,216,10,11,
- 128,7,242,8,2,1,35,242,8,2,1,35,242,8,2,1,
- 35,242,8,2,1,35,242,8,2,1,35,242,8,2,1,35,
- 242,8,2,1,36,242,8,2,1,17,242,8,2,1,17,242,
- 8,2,1,17,240,12,0,11,17,128,7,216,10,16,128,7,
- 216,10,17,128,7,216,10,16,128,7,216,10,16,128,7,216,
- 11,17,128,8,216,10,16,128,7,216,10,16,128,7,216,10,
- 16,128,7,216,10,16,128,7,216,10,16,128,7,216,10,16,
+ 0,0,0,0,0,19,0,72,129,0,0,117,2,0,0,112,
+ 35,85,3,19,0,72,76,0,0,117,2,0,0,112,69,85,
+ 2,83,1,58,88,0,0,97,37,0,0,91,5,0,0,0,
+ 0,0,0,0,0,85,0,53,1,0,0,0,0,0,0,85,
+ 4,58,88,0,0,97,20,0,0,85,1,82,7,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,85,
+ 5,53,1,0,0,0,0,0,0,32,0,32,0,77,53,0,
+ 0,77,48,0,0,88,4,45,1,0,0,85,4,58,88,0,
+ 0,100,2,0,0,77,58,0,0,85,1,82,7,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,85,
+ 5,53,1,0,0,0,0,0,0,32,0,32,0,77,85,0,
+ 0,11,0,32,0,85,2,83,1,58,88,0,0,97,19,0,
+ 0,85,1,82,7,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,83,2,53,1,0,0,0,0,0,
+ 0,32,0,77,112,0,0,85,1,82,7,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,83,3,53,
+ 1,0,0,0,0,0,0,32,0,77,131,0,0,11,0,32,
+ 0,83,4,82,9,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,85,1,53,1,0,0,0,0,0,
+ 0,36,0,41,5,122,59,67,111,110,118,101,114,116,32,97,
+ 32,102,105,108,101,39,115,32,109,111,100,101,32,116,111,32,
+ 97,32,115,116,114,105,110,103,32,111,102,32,116,104,101,32,
+ 102,111,114,109,32,39,45,114,119,120,114,119,120,114,119,120,
+ 39,46,114,2,0,0,0,218,1,63,114,58,0,0,0,218,
+ 0,41,5,218,9,101,110,117,109,101,114,97,116,101,218,15,
+ 95,102,105,108,101,109,111,100,101,95,116,97,98,108,101,114,
+ 20,0,0,0,218,6,97,112,112,101,110,100,218,4,106,111,
+ 105,110,41,6,114,15,0,0,0,218,4,112,101,114,109,218,
+ 5,105,110,100,101,120,218,5,116,97,98,108,101,218,3,98,
+ 105,116,218,4,99,104,97,114,115,6,0,0,0,32,32,32,
+ 32,32,32,114,16,0,0,0,218,8,102,105,108,101,109,111,
+ 100,101,114,81,0,0,0,164,0,0,0,115,151,0,0,0,
+ 128,0,224,11,13,128,68,220,24,33,164,47,214,24,50,137,
+ 12,136,5,219,25,30,137,73,136,67,216,15,20,152,1,139,
+ 122,220,19,25,152,36,147,60,160,51,211,19,38,216,20,24,
+ 151,75,145,75,160,4,212,20,37,218,20,25,241,5,0,20,
+ 39,240,8,0,20,24,145,58,160,19,213,19,36,216,20,24,
+ 151,75,145,75,160,4,212,20,37,218,20,25,241,17,0,26,
+ 31,240,20,0,16,21,152,1,139,122,224,16,20,151,11,145,
+ 11,152,67,214,16,32,224,16,20,151,11,145,11,152,67,214,
+ 16,32,241,31,0,25,51,240,32,0,12,14,143,55,137,55,
+ 144,52,139,61,208,4,24,114,18,0,0,0,41,1,218,1,
+ 42,78,41,92,218,7,95,95,100,111,99,95,95,218,7,83,
+ 84,95,77,79,68,69,218,6,83,84,95,73,78,79,218,6,
+ 83,84,95,68,69,86,218,8,83,84,95,78,76,73,78,75,
+ 218,6,83,84,95,85,73,68,218,6,83,84,95,71,73,68,
+ 218,7,83,84,95,83,73,90,69,218,8,83,84,95,65,84,
+ 73,77,69,218,8,83,84,95,77,84,73,77,69,218,8,83,
+ 84,95,67,84,73,77,69,114,17,0,0,0,114,20,0,0,
+ 0,114,22,0,0,0,114,26,0,0,0,114,29,0,0,0,
+ 114,32,0,0,0,114,35,0,0,0,114,38,0,0,0,114,
+ 41,0,0,0,218,8,83,95,73,70,68,79,79,82,218,8,
+ 83,95,73,70,80,79,82,84,218,7,83,95,73,70,87,72,
+ 84,114,23,0,0,0,114,27,0,0,0,114,30,0,0,0,
+ 114,33,0,0,0,114,36,0,0,0,114,39,0,0,0,114,
+ 42,0,0,0,114,44,0,0,0,114,47,0,0,0,114,49,
+ 0,0,0,218,7,83,95,73,83,85,73,68,218,7,83,95,
+ 73,83,71,73,68,218,7,83,95,69,78,70,77,84,218,7,
+ 83,95,73,83,86,84,88,218,7,83,95,73,82,69,65,68,
+ 218,8,83,95,73,87,82,73,84,69,218,7,83,95,73,69,
+ 88,69,67,218,7,83,95,73,82,87,88,85,218,7,83,95,
+ 73,82,85,83,82,218,7,83,95,73,87,85,83,82,218,7,
+ 83,95,73,88,85,83,82,218,7,83,95,73,82,87,88,71,
+ 218,7,83,95,73,82,71,82,80,218,7,83,95,73,87,71,
+ 82,80,218,7,83,95,73,88,71,82,80,218,7,83,95,73,
+ 82,87,88,79,218,7,83,95,73,82,79,84,72,218,7,83,
+ 95,73,87,79,84,72,218,7,83,95,73,88,79,84,72,218,
+ 11,85,70,95,83,69,84,84,65,66,76,69,218,9,85,70,
+ 95,78,79,68,85,77,80,218,12,85,70,95,73,77,77,85,
+ 84,65,66,76,69,218,9,85,70,95,65,80,80,69,78,68,
+ 218,9,85,70,95,79,80,65,81,85,69,218,11,85,70,95,
+ 78,79,85,78,76,73,78,75,218,13,85,70,95,67,79,77,
+ 80,82,69,83,83,69,68,218,10,85,70,95,84,82,65,67,
+ 75,69,68,218,12,85,70,95,68,65,84,65,86,65,85,76,
+ 84,218,9,85,70,95,72,73,68,68,69,78,218,11,83,70,
+ 95,83,69,84,84,65,66,76,69,218,11,83,70,95,65,82,
+ 67,72,73,86,69,68,218,12,83,70,95,73,77,77,85,84,
+ 65,66,76,69,218,9,83,70,95,65,80,80,69,78,68,218,
+ 13,83,70,95,82,69,83,84,82,73,67,84,69,68,218,11,
+ 83,70,95,78,79,85,78,76,73,78,75,218,11,83,70,95,
+ 83,78,65,80,83,72,79,84,218,11,83,70,95,70,73,82,
+ 77,76,73,78,75,218,11,83,70,95,68,65,84,65,76,69,
+ 83,83,114,73,0,0,0,114,81,0,0,0,218,22,70,73,
+ 76,69,95,65,84,84,82,73,66,85,84,69,95,65,82,67,
+ 72,73,86,69,218,25,70,73,76,69,95,65,84,84,82,73,
+ 66,85,84,69,95,67,79,77,80,82,69,83,83,69,68,218,
+ 21,70,73,76,69,95,65,84,84,82,73,66,85,84,69,95,
+ 68,69,86,73,67,69,218,24,70,73,76,69,95,65,84,84,
+ 82,73,66,85,84,69,95,68,73,82,69,67,84,79,82,89,
+ 218,24,70,73,76,69,95,65,84,84,82,73,66,85,84,69,
+ 95,69,78,67,82,89,80,84,69,68,218,21,70,73,76,69,
+ 95,65,84,84,82,73,66,85,84,69,95,72,73,68,68,69,
+ 78,218,31,70,73,76,69,95,65,84,84,82,73,66,85,84,
+ 69,95,73,78,84,69,71,82,73,84,89,95,83,84,82,69,
+ 65,77,218,21,70,73,76,69,95,65,84,84,82,73,66,85,
+ 84,69,95,78,79,82,77,65,76,218,34,70,73,76,69,95,
+ 65,84,84,82,73,66,85,84,69,95,78,79,84,95,67,79,
+ 78,84,69,78,84,95,73,78,68,69,88,69,68,218,28,70,
+ 73,76,69,95,65,84,84,82,73,66,85,84,69,95,78,79,
+ 95,83,67,82,85,66,95,68,65,84,65,218,22,70,73,76,
+ 69,95,65,84,84,82,73,66,85,84,69,95,79,70,70,76,
+ 73,78,69,218,23,70,73,76,69,95,65,84,84,82,73,66,
+ 85,84,69,95,82,69,65,68,79,78,76,89,218,28,70,73,
+ 76,69,95,65,84,84,82,73,66,85,84,69,95,82,69,80,
+ 65,82,83,69,95,80,79,73,78,84,218,26,70,73,76,69,
+ 95,65,84,84,82,73,66,85,84,69,95,83,80,65,82,83,
+ 69,95,70,73,76,69,218,21,70,73,76,69,95,65,84,84,
+ 82,73,66,85,84,69,95,83,89,83,84,69,77,218,24,70,
+ 73,76,69,95,65,84,84,82,73,66,85,84,69,95,84,69,
+ 77,80,79,82,65,82,89,218,22,70,73,76,69,95,65,84,
+ 84,82,73,66,85,84,69,95,86,73,82,84,85,65,76,218,
+ 5,95,115,116,97,116,218,11,73,109,112,111,114,116,69,114,
+ 114,111,114,114,13,0,0,0,114,18,0,0,0,114,16,0,
+ 0,0,218,8,60,109,111,100,117,108,101,62,114,154,0,0,
+ 0,1,0,0,0,115,232,2,0,0,240,3,1,1,1,241,
+ 2,3,1,4,240,14,0,12,13,128,7,216,11,12,128,6,
+ 216,11,12,128,6,216,11,12,128,8,216,11,12,128,6,216,
+ 11,12,128,6,216,11,12,128,7,216,11,12,128,8,216,11,
+ 12,128,8,216,11,12,128,8,242,8,4,1,25,242,12,4,
+ 1,27,240,18,0,12,20,128,7,216,11,19,128,7,216,11,
+ 19,128,7,216,11,19,128,7,216,11,19,128,7,216,11,19,
+ 128,7,216,11,19,128,8,224,11,12,128,8,216,11,12,128,
+ 8,216,10,11,128,7,242,8,2,1,35,242,8,2,1,35,
+ 242,8,2,1,35,242,8,2,1,35,242,8,2,1,35,242,
+ 8,2,1,35,242,8,2,1,36,242,8,2,1,17,242,8,
+ 2,1,17,242,8,2,1,17,240,12,0,11,17,128,7,216,
+ 10,16,128,7,216,10,17,128,7,216,10,16,128,7,216,10,
+ 16,128,7,216,11,17,128,8,216,10,16,128,7,216,10,16,
128,7,216,10,16,128,7,216,10,16,128,7,216,10,16,128,
7,216,10,16,128,7,216,10,16,128,7,216,10,16,128,7,
- 216,10,16,128,7,240,6,0,16,26,128,11,216,15,25,128,
- 9,216,15,25,128,12,216,15,25,128,9,216,15,25,128,9,
- 216,15,25,128,11,216,16,26,128,13,216,15,25,128,10,216,
- 15,25,128,12,216,15,25,128,9,216,15,25,128,11,216,15,
- 25,128,11,216,15,25,128,12,216,15,25,128,9,216,16,26,
- 128,13,216,15,25,128,11,216,15,25,128,11,216,15,25,128,
- 11,216,15,25,128,11,240,12,0,7,14,144,115,208,5,27,
- 216,6,14,144,115,208,5,27,216,6,13,144,115,208,5,27,
- 216,6,13,144,115,208,5,27,216,6,13,144,115,208,5,27,
- 216,6,13,144,115,208,5,27,216,6,13,144,115,208,5,27,
- 240,13,6,5,29,240,16,0,7,14,144,115,208,5,27,208,
- 4,29,216,6,13,144,115,208,5,27,208,4,29,216,6,13,
- 136,103,129,111,144,115,208,5,27,216,6,13,144,115,208,5,
- 27,216,6,13,144,115,208,5,27,240,5,2,5,29,240,8,
- 0,7,14,144,115,208,5,27,208,4,29,216,6,13,144,115,
- 208,5,27,208,4,29,216,6,13,136,103,129,111,144,115,208,
- 5,27,216,6,13,144,115,208,5,27,216,6,13,144,115,208,
- 5,27,240,5,2,5,29,240,8,0,7,14,144,115,208,5,
- 27,208,4,29,216,6,13,144,115,208,5,27,208,4,29,216,
- 6,13,136,103,129,111,144,115,208,5,27,216,6,13,144,115,
- 208,5,27,216,6,13,144,115,208,5,27,240,5,2,5,29,
- 240,51,28,19,2,128,15,242,60,14,1,25,240,40,0,26,
- 28,208,0,22,216,28,32,208,0,25,216,24,26,208,0,21,
- 216,27,29,208,0,24,216,27,32,208,0,24,216,24,25,208,
- 0,21,216,34,39,208,0,31,216,24,27,208,0,21,216,37,
- 41,208,0,34,216,31,37,208,0,28,216,25,29,208,0,22,
- 216,26,27,208,0,23,216,31,35,208,0,28,216,29,32,208,
- 0,26,216,24,25,208,0,21,216,27,30,208,0,24,216,25,
- 30,208,0,22,240,8,3,1,9,221,4,23,248,216,7,18,
- 243,0,1,1,9,217,4,8,240,3,1,1,9,250,115,18,
- 0,0,0,196,24,5,68,30,0,196,30,6,68,39,3,196,
- 38,1,68,39,3,
+ 216,10,16,128,7,216,10,16,128,7,216,10,16,128,7,216,
+ 10,16,128,7,216,10,16,128,7,240,6,0,16,26,128,11,
+ 216,15,25,128,9,216,15,25,128,12,216,15,25,128,9,216,
+ 15,25,128,9,216,15,25,128,11,216,16,26,128,13,216,15,
+ 25,128,10,216,15,25,128,12,216,15,25,128,9,216,15,25,
+ 128,11,216,15,25,128,11,216,15,25,128,12,216,15,25,128,
+ 9,216,16,26,128,13,216,15,25,128,11,216,15,25,128,11,
+ 216,15,25,128,11,216,15,25,128,11,240,12,0,7,14,144,
+ 115,208,5,27,216,6,14,144,115,208,5,27,216,6,13,144,
+ 115,208,5,27,216,6,13,144,115,208,5,27,216,6,13,144,
+ 115,208,5,27,216,6,13,144,115,208,5,27,216,6,13,144,
+ 115,208,5,27,240,13,6,5,29,240,16,0,7,14,144,115,
+ 208,5,27,208,4,29,216,6,13,144,115,208,5,27,208,4,
+ 29,216,6,13,136,103,129,111,144,115,208,5,27,216,6,13,
+ 144,115,208,5,27,216,6,13,144,115,208,5,27,240,5,2,
+ 5,29,240,8,0,7,14,144,115,208,5,27,208,4,29,216,
+ 6,13,144,115,208,5,27,208,4,29,216,6,13,136,103,129,
+ 111,144,115,208,5,27,216,6,13,144,115,208,5,27,216,6,
+ 13,144,115,208,5,27,240,5,2,5,29,240,8,0,7,14,
+ 144,115,208,5,27,208,4,29,216,6,13,144,115,208,5,27,
+ 208,4,29,216,6,13,136,103,129,111,144,115,208,5,27,216,
+ 6,13,144,115,208,5,27,216,6,13,144,115,208,5,27,240,
+ 5,2,5,29,240,51,28,19,2,128,15,242,60,19,1,25,
+ 240,50,0,26,28,208,0,22,216,28,32,208,0,25,216,24,
+ 26,208,0,21,216,27,29,208,0,24,216,27,32,208,0,24,
+ 216,24,25,208,0,21,216,34,39,208,0,31,216,24,27,208,
+ 0,21,216,37,41,208,0,34,216,31,37,208,0,28,216,25,
+ 29,208,0,22,216,26,27,208,0,23,216,31,35,208,0,28,
+ 216,29,32,208,0,26,216,24,25,208,0,21,216,27,30,208,
+ 0,24,216,25,30,208,0,22,240,8,3,1,9,221,4,23,
+ 248,216,7,18,243,0,1,1,9,217,4,8,240,3,1,1,
+ 9,250,115,18,0,0,0,196,24,5,68,30,0,196,30,6,
+ 68,39,3,196,38,1,68,39,3,
};
diff --git a/contrib/tools/python3/Python/hamt.c b/contrib/tools/python3/Python/hamt.c
index 91abaecd3e7..a9f811f4422 100644
--- a/contrib/tools/python3/Python/hamt.c
+++ b/contrib/tools/python3/Python/hamt.c
@@ -2368,6 +2368,10 @@ _PyHamt_Eq(PyHamtObject *v, PyHamtObject *w)
return 0;
}
+ Py_INCREF(v);
+ Py_INCREF(w);
+
+ int res = 1;
PyHamtIteratorState iter;
hamt_iter_t iter_res;
hamt_find_t find_res;
@@ -2383,25 +2387,38 @@ _PyHamt_Eq(PyHamtObject *v, PyHamtObject *w)
find_res = hamt_find(w, v_key, &w_val);
switch (find_res) {
case F_ERROR:
- return -1;
+ res = -1;
+ goto done;
case F_NOT_FOUND:
- return 0;
+ res = 0;
+ goto done;
case F_FOUND: {
+ Py_INCREF(v_key);
+ Py_INCREF(v_val);
+ Py_INCREF(w_val);
int cmp = PyObject_RichCompareBool(v_val, w_val, Py_EQ);
+ Py_DECREF(v_key);
+ Py_DECREF(v_val);
+ Py_DECREF(w_val);
if (cmp < 0) {
- return -1;
+ res = -1;
+ goto done;
}
if (cmp == 0) {
- return 0;
+ res = 0;
+ goto done;
}
}
}
}
} while (iter_res != I_END);
- return 1;
+done:
+ Py_DECREF(v);
+ Py_DECREF(w);
+ return res;
}
Py_ssize_t
diff --git a/contrib/tools/python3/Python/import.c b/contrib/tools/python3/Python/import.c
index 32a25e4478c..03a49ea0599 100644
--- a/contrib/tools/python3/Python/import.c
+++ b/contrib/tools/python3/Python/import.c
@@ -4678,6 +4678,7 @@ static PyObject *
_imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file)
/*[clinic end generated code: output=83249b827a4fde77 input=c31b954f4cf4e09d]*/
{
+ FILE *fp = NULL;
PyObject *mod = NULL;
PyThreadState *tstate = _PyThreadState_GET();
@@ -4720,16 +4721,12 @@ _imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file)
/* We would move this (and the fclose() below) into
* _PyImport_GetModInitFunc(), but it isn't clear if the intervening
* code relies on fp still being open. */
- FILE *fp;
if (file != NULL) {
fp = _Py_fopen_obj(info.filename, "r");
if (fp == NULL) {
goto finally;
}
}
- else {
- fp = NULL;
- }
PyModInitFunction p0 = _PyImport_GetModInitFunc(&info, fp);
if (p0 == NULL) {
@@ -4753,12 +4750,10 @@ _imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file)
}
#endif
- // XXX Shouldn't this happen in the error cases too (i.e. in "finally")?
- if (fp) {
+finally:
+ if (fp != NULL) {
fclose(fp);
}
-
-finally:
_Py_ext_module_loader_info_clear(&info);
return mod;
}
diff --git a/contrib/tools/python3/Python/initconfig.c b/contrib/tools/python3/Python/initconfig.c
index 7542cb0d375..0b5f917a0f5 100644
--- a/contrib/tools/python3/Python/initconfig.c
+++ b/contrib/tools/python3/Python/initconfig.c
@@ -1576,7 +1576,9 @@ config_read_env_vars(PyConfig *config)
_Py_get_env_flag(use_env, &config->parser_debug, "PYTHONDEBUG");
_Py_get_env_flag(use_env, &config->verbose, "PYTHONVERBOSE");
_Py_get_env_flag(use_env, &config->optimization_level, "PYTHONOPTIMIZE");
- _Py_get_env_flag(use_env, &config->inspect, "PYTHONINSPECT");
+ if (!config->inspect && _Py_GetEnv(use_env, "PYTHONINSPECT")) {
+ config->inspect = 1;
+ }
int dont_write_bytecode = 0;
_Py_get_env_flag(use_env, &dont_write_bytecode, "PYTHONDONTWRITEBYTECODE");
diff --git a/contrib/tools/python3/Python/marshal.c b/contrib/tools/python3/Python/marshal.c
index 76fa701b541..65481341bdf 100644
--- a/contrib/tools/python3/Python/marshal.c
+++ b/contrib/tools/python3/Python/marshal.c
@@ -362,6 +362,10 @@ w_object(PyObject *v, WFILE *p)
{
char flag = '\0';
+ if (p->error != WFERR_OK) {
+ return;
+ }
+
p->depth++;
if (p->depth > MAX_MARSHAL_STACK_DEPTH) {
diff --git a/contrib/tools/python3/Python/perf_jit_trampoline.c b/contrib/tools/python3/Python/perf_jit_trampoline.c
index a44a74f58df..b03da66e92e 100644
--- a/contrib/tools/python3/Python/perf_jit_trampoline.c
+++ b/contrib/tools/python3/Python/perf_jit_trampoline.c
@@ -372,6 +372,7 @@ static void perf_map_jit_write_header(int pid, FILE* out_file) {
header.version = 1; // Current jitdump version
header.size = sizeof(Header); // Header size for validation
header.elf_mach_target = GetElfMachineArchitecture(); // Target architecture
+ header.reserved = 0; // padding reserved for future use
header.process_id = pid; // Process identifier
header.time_stamp = get_current_time_microseconds(); // Creation time
header.flags = 0; // No special flags currently used
@@ -1052,7 +1053,8 @@ static void* perf_map_jit_init(void) {
0 // Offset 0 (first page)
);
- if (perf_jit_map_state.mapped_buffer == NULL) {
+ if (perf_jit_map_state.mapped_buffer == MAP_FAILED) {
+ perf_jit_map_state.mapped_buffer = NULL;
close(fd);
return NULL; // Memory mapping failed
}
diff --git a/contrib/tools/python3/Python/perf_trampoline.c b/contrib/tools/python3/Python/perf_trampoline.c
index b1b787fc278..5589ec1c362 100644
--- a/contrib/tools/python3/Python/perf_trampoline.c
+++ b/contrib/tools/python3/Python/perf_trampoline.c
@@ -204,6 +204,43 @@ enum perf_trampoline_type {
#define perf_map_file _PyRuntime.ceval.perf.map_file
#define persist_after_fork _PyRuntime.ceval.perf.persist_after_fork
#define perf_trampoline_type _PyRuntime.ceval.perf.perf_trampoline_type
+#define prev_eval_frame _PyRuntime.ceval.perf.prev_eval_frame
+#define trampoline_refcount _PyRuntime.ceval.perf.trampoline_refcount
+#define code_watcher_id _PyRuntime.ceval.perf.code_watcher_id
+
+static void free_code_arenas(void);
+
+static void
+perf_trampoline_reset_state(void)
+{
+ free_code_arenas();
+ if (code_watcher_id >= 0) {
+ PyCode_ClearWatcher(code_watcher_id);
+ code_watcher_id = -1;
+ }
+ extra_code_index = -1;
+}
+
+static int
+perf_trampoline_code_watcher(PyCodeEvent event, PyCodeObject *co)
+{
+ if (event != PY_CODE_EVENT_DESTROY) {
+ return 0;
+ }
+ if (extra_code_index == -1) {
+ return 0;
+ }
+ py_trampoline f = NULL;
+ int ret = _PyCode_GetExtra((PyObject *)co, extra_code_index, (void **)&f);
+ if (ret != 0 || f == NULL) {
+ return 0;
+ }
+ trampoline_refcount--;
+ if (trampoline_refcount == 0) {
+ perf_trampoline_reset_state();
+ }
+ return 0;
+}
static void
perf_map_write_entry(void *state, const void *code_addr,
@@ -405,6 +442,7 @@ py_trampoline_evaluator(PyThreadState *ts, _PyInterpreterFrame *frame,
perf_code_arena->code_size, co);
_PyCode_SetExtra((PyObject *)co, extra_code_index,
(void *)new_trampoline);
+ trampoline_refcount++;
f = new_trampoline;
}
assert(f != NULL);
@@ -428,6 +466,7 @@ int PyUnstable_PerfTrampoline_CompileCode(PyCodeObject *co)
}
trampoline_api.write_state(trampoline_api.state, new_trampoline,
perf_code_arena->code_size, co);
+ trampoline_refcount++;
return _PyCode_SetExtra((PyObject *)co, extra_code_index,
(void *)new_trampoline);
}
@@ -482,6 +521,10 @@ _PyPerfTrampoline_Init(int activate)
{
#ifdef PY_HAVE_PERF_TRAMPOLINE
PyThreadState *tstate = _PyThreadState_GET();
+ if (code_watcher_id == 0) {
+ // Initialize to -1 since 0 is a valid watcher ID
+ code_watcher_id = -1;
+ }
if (tstate->interp->eval_frame &&
tstate->interp->eval_frame != py_trampoline_evaluator) {
PyErr_SetString(PyExc_RuntimeError,
@@ -505,6 +548,13 @@ _PyPerfTrampoline_Init(int activate)
if (new_code_arena() < 0) {
return -1;
}
+ code_watcher_id = PyCode_AddWatcher(perf_trampoline_code_watcher);
+ if (code_watcher_id < 0) {
+ PyErr_FormatUnraisable("Failed to register code watcher for perf trampoline");
+ free_code_arenas();
+ return -1;
+ }
+ trampoline_refcount = 1; // Base refcount held by the system
perf_status = PERF_STATUS_OK;
}
#endif
@@ -526,17 +576,19 @@ _PyPerfTrampoline_Fini(void)
trampoline_api.free_state(trampoline_api.state);
perf_trampoline_type = PERF_TRAMPOLINE_UNSET;
}
- extra_code_index = -1;
+
+ // Prevent new trampolines from being created
perf_status = PERF_STATUS_NO_INIT;
-#endif
- return 0;
-}
-void _PyPerfTrampoline_FreeArenas(void) {
-#ifdef PY_HAVE_PERF_TRAMPOLINE
- free_code_arenas();
+ // Decrement base refcount. If refcount reaches 0, all code objects are already
+ // dead so clean up now. Otherwise, watcher remains active to clean up when last
+ // code object dies; extra_code_index stays valid so watcher can identify them.
+ trampoline_refcount--;
+ if (trampoline_refcount == 0) {
+ perf_trampoline_reset_state();
+ }
#endif
- return;
+ return 0;
}
int
diff --git a/contrib/tools/python3/Python/pylifecycle.c b/contrib/tools/python3/Python/pylifecycle.c
index 8cc6bd0fa78..8ba9b2bd006 100644
--- a/contrib/tools/python3/Python/pylifecycle.c
+++ b/contrib/tools/python3/Python/pylifecycle.c
@@ -1609,6 +1609,7 @@ finalize_remove_modules(PyObject *modules, int verbose)
PyObject *value = PyObject_GetItem(modules, key);
if (value == NULL) {
PyErr_FormatUnraisable("Exception ignored on removing modules");
+ Py_DECREF(key);
continue;
}
CLEAR_MODULE(key, value);
@@ -1929,7 +1930,6 @@ finalize_interp_clear(PyThreadState *tstate)
_PyArg_Fini();
_Py_ClearFileSystemEncoding();
_PyPerfTrampoline_Fini();
- _PyPerfTrampoline_FreeArenas();
}
finalize_interp_types(tstate->interp);
diff --git a/contrib/tools/python3/Python/pystate.c b/contrib/tools/python3/Python/pystate.c
index 2b1bff7f108..85c20ead488 100644
--- a/contrib/tools/python3/Python/pystate.c
+++ b/contrib/tools/python3/Python/pystate.c
@@ -1748,6 +1748,14 @@ PyThreadState_Clear(PyThreadState *tstate)
// Remove ourself from the biased reference counting table of threads.
_Py_brc_remove_thread(tstate);
+
+ // Flush the thread's local GC allocation count to the global count
+ // before the thread state is cleared, otherwise the count is lost.
+ _PyThreadStateImpl *tstate_impl = (_PyThreadStateImpl *)tstate;
+ _Py_atomic_add_int(&tstate->interp->gc.generations[0].count,
+ (int)tstate_impl->gc.alloc_count);
+ tstate_impl->gc.alloc_count = 0;
+
#endif
// Merge our queue of pointers to be freed into the interpreter queue.
diff --git a/contrib/tools/python3/Python/sysmodule.c b/contrib/tools/python3/Python/sysmodule.c
index cf06943c7c8..782c595d2ab 100644
--- a/contrib/tools/python3/Python/sysmodule.c
+++ b/contrib/tools/python3/Python/sysmodule.c
@@ -2609,20 +2609,31 @@ PyAPI_FUNC(int) PyUnstable_CopyPerfMapFile(const char* parent_filename) {
}
char buf[4096];
PyThread_acquire_lock(perf_map_state.map_lock, 1);
- int fflush_result = 0, result = 0;
+ int result = 0;
while (1) {
size_t bytes_read = fread(buf, 1, sizeof(buf), from);
+ if (bytes_read == 0) {
+ if (ferror(from)) {
+ result = -1;
+ }
+ break;
+ }
+
size_t bytes_written = fwrite(buf, 1, bytes_read, perf_map_state.perf_map);
- fflush_result = fflush(perf_map_state.perf_map);
- if (fflush_result != 0 || bytes_read == 0 || bytes_written < bytes_read) {
+ if (bytes_written < bytes_read) {
result = -1;
- goto close_and_release;
+ break;
}
+
+ if (fflush(perf_map_state.perf_map) != 0) {
+ result = -1;
+ break;
+ }
+
if (bytes_read < sizeof(buf) && feof(from)) {
- goto close_and_release;
+ break;
}
}
-close_and_release:
fclose(from);
PyThread_release_lock(perf_map_state.map_lock);
return result;
diff --git a/contrib/tools/python3/Python/traceback.c b/contrib/tools/python3/Python/traceback.c
index f9840833716..81960a76927 100644
--- a/contrib/tools/python3/Python/traceback.c
+++ b/contrib/tools/python3/Python/traceback.c
@@ -356,6 +356,9 @@ _Py_FindSourceFile(PyObject *filename, char* namebuf, size_t namelen, PyObject *
npath = PyList_Size(syspath);
open = PyObject_GetAttr(io, &_Py_ID(open));
+ if (open == NULL) {
+ goto error;
+ }
for (i = 0; i < npath; i++) {
v = PyList_GetItem(syspath, i);
if (v == NULL) {