Skip to content

Commit 53cf150

Browse files
committed
Merge branch 'rightlib' into merge-libs-250217-0050
2 parents e03ee59 + d7d6214 commit 53cf150

File tree

105 files changed

+1057
-549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1057
-549
lines changed

contrib/tools/python3/.yandex_meta/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ def post_install(self):
256256
"sys/byteorder.h",
257257
"sys/lwp.h",
258258
"sys/memfd.h",
259+
"sys/pidfd.h",
259260
# ifdef __VXWORKS__
260261
"rtpLib.h",
261262
"taskLib.h",

contrib/tools/python3/.yandex_meta/override.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
pkgs: attrs: with pkgs; with attrs; rec {
2-
version = "3.12.8";
2+
version = "3.12.9";
33

44
src = fetchFromGitHub {
55
owner = "python";
66
repo = "cpython";
77
rev = "v${version}";
8-
hash = "sha256-1Z2SMEut5YY9tTtrzPpmXcsIQKw5MGcGI4l0ysJbg28=";
8+
hash = "sha256-5Hl+kKhavxihPmxVOyzUpchxiYMfYRfcjTbjiIq1i1o=";
99
};
1010

1111
patches = [];

contrib/tools/python3/Include/cpython/pytime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ functions and constants
5353
extern "C" {
5454
#endif
5555

56-
#ifdef __clang__
56+
#if defined(__clang__) || defined(_MSC_VER)
5757
struct timeval;
5858
#endif
5959

contrib/tools/python3/Include/internal/pycore_object.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ static inline void _Py_RefcntAdd(PyObject* op, Py_ssize_t n)
6565
_Py_AddRefTotal(_PyInterpreterState_GET(), n);
6666
#endif
6767
op->ob_refcnt += n;
68+
69+
// Although the ref count was increased by `n` (which may be greater than 1)
70+
// it is only a single increment (i.e. addition) operation, so only 1 refcnt
71+
// increment operation is counted.
72+
_Py_INCREF_STAT_INC();
6873
}
6974
#define _Py_RefcntAdd(op, n) _Py_RefcntAdd(_PyObject_CAST(op), n)
7075

contrib/tools/python3/Include/internal/pycore_pyerrors.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ PyAPI_FUNC(void) _PyErr_SetString(
7575
PyObject *exception,
7676
const char *string);
7777

78+
/*
79+
* Set an exception with the error message decoded from the current locale
80+
* encoding (LC_CTYPE).
81+
*
82+
* Exceptions occurring in decoding take priority over the desired exception.
83+
*
84+
* Exported for '_ctypes' shared extensions.
85+
*/
86+
PyAPI_FUNC(void) _PyErr_SetLocaleString(
87+
PyObject *exception,
88+
const char *string);
89+
7890
PyAPI_FUNC(PyObject *) _PyErr_Format(
7991
PyThreadState *tstate,
8092
PyObject *exception,

contrib/tools/python3/Include/patchlevel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
/*--start constants--*/
1919
#define PY_MAJOR_VERSION 3
2020
#define PY_MINOR_VERSION 12
21-
#define PY_MICRO_VERSION 8
21+
#define PY_MICRO_VERSION 9
2222
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
2323
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.12.8"
26+
#define PY_VERSION "3.12.9"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

contrib/tools/python3/Include/pyconfig-linux.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
/* Define if --enable-ipv6 is specified */
4949
#define ENABLE_IPV6 1
5050

51-
/* Define to 1 if your system stores words within floats with the most
52-
significant word first */
53-
/* #undef FLOAT_WORDS_BIGENDIAN */
54-
5551
/* Define if getpgrp() must be called as getpgrp(0). */
5652
/* #undef GETPGRP_HAVE_ARG */
5753

@@ -1339,6 +1335,9 @@
13391335
/* Define to 1 if you have the <sys/param.h> header file. */
13401336
#define HAVE_SYS_PARAM_H 1
13411337

1338+
/* Define to 1 if you have the <sys/pidfd.h> header file. */
1339+
/* #undef HAVE_SYS_PIDFD_H */
1340+
13421341
/* Define to 1 if you have the <sys/poll.h> header file. */
13431342
#define HAVE_SYS_POLL_H 1
13441343

@@ -1439,8 +1438,8 @@
14391438
/* Define to 1 if you have the `truncate' function. */
14401439
#define HAVE_TRUNCATE 1
14411440

1442-
/* Define to 1 if you have the `ttyname' function. */
1443-
#define HAVE_TTYNAME 1
1441+
/* Define to 1 if you have the `ttyname_r' function. */
1442+
#define HAVE_TTYNAME_R 1
14441443

14451444
/* Define to 1 if you don't have `tm_zone' but do have the external array
14461445
`tzname'. */

contrib/tools/python3/Include/pyconfig-osx-arm64.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
/* Define if --enable-ipv6 is specified */
4949
#define ENABLE_IPV6 1
5050

51-
/* Define to 1 if your system stores words within floats with the most
52-
significant word first */
53-
/* #undef FLOAT_WORDS_BIGENDIAN */
54-
5551
/* Define if getpgrp() must be called as getpgrp(0). */
5652
/* #undef GETPGRP_HAVE_ARG */
5753

@@ -1337,6 +1333,9 @@
13371333
/* Define to 1 if you have the <sys/param.h> header file. */
13381334
#define HAVE_SYS_PARAM_H 1
13391335

1336+
/* Define to 1 if you have the <sys/pidfd.h> header file. */
1337+
/* #undef HAVE_SYS_PIDFD_H */
1338+
13401339
/* Define to 1 if you have the <sys/poll.h> header file. */
13411340
#define HAVE_SYS_POLL_H 1
13421341

@@ -1437,8 +1436,8 @@
14371436
/* Define to 1 if you have the `truncate' function. */
14381437
#define HAVE_TRUNCATE 1
14391438

1440-
/* Define to 1 if you have the `ttyname' function. */
1441-
#define HAVE_TTYNAME 1
1439+
/* Define to 1 if you have the `ttyname_r' function. */
1440+
#define HAVE_TTYNAME_R 1
14421441

14431442
/* Define to 1 if you don't have `tm_zone' but do have the external array
14441443
`tzname'. */

contrib/tools/python3/Include/pymacro.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,15 @@
118118
*/
119119
#if defined(__GNUC__) || defined(__clang__)
120120
# define Py_UNUSED(name) _unused_ ## name __attribute__((unused))
121+
#elif defined(_MSC_VER)
122+
// Disable warning C4100: unreferenced formal parameter,
123+
// declare the parameter,
124+
// restore old compiler warnings.
125+
# define Py_UNUSED(name) \
126+
__pragma(warning(push)) \
127+
__pragma(warning(suppress: 4100)) \
128+
_unused_ ## name \
129+
__pragma(warning(pop))
121130
#else
122131
# define Py_UNUSED(name) _unused_ ## name
123132
#endif

contrib/tools/python3/Include/tracemalloc.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#ifndef Py_TRACEMALLOC_H
22
#define Py_TRACEMALLOC_H
3-
43
#ifndef Py_LIMITED_API
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
7+
58
/* Track an allocated memory block in the tracemalloc module.
69
Return 0 on success, return -1 on error (failed to allocate memory to store
710
the trace).
@@ -47,7 +50,7 @@ PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetTraces(void);
4750
PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetObjectTraceback(PyObject *obj);
4851

4952
/* Initialize tracemalloc */
50-
PyAPI_FUNC(int) _PyTraceMalloc_Init(void);
53+
PyAPI_FUNC(PyStatus) _PyTraceMalloc_Init(void);
5154

5255
/* Start tracemalloc */
5356
PyAPI_FUNC(int) _PyTraceMalloc_Start(int max_nframe);
@@ -67,6 +70,8 @@ PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetTracedMemory(void);
6770
/* Set the peak size of traced memory blocks to the current size */
6871
PyAPI_FUNC(void) _PyTraceMalloc_ResetPeak(void);
6972

73+
#ifdef __cplusplus
74+
}
7075
#endif
71-
76+
#endif /* !Py_LIMITED_API */
7277
#endif /* !Py_TRACEMALLOC_H */

0 commit comments

Comments
 (0)