Skip to content

Commit 0e7bce1

Browse files
authored
Merge branch 'main' into issue-101703
2 parents c7dd348 + d40a23c commit 0e7bce1

25 files changed

+76
-251
lines changed

.azure-pipelines/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1q
60+
openssl_version: 1.1.1t
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1q
86+
openssl_version: 1.1.1t
8787

8888
steps:
8989
- template: ./posix-steps.yml

.azure-pipelines/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1q
60+
openssl_version: 1.1.1t
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1q
86+
openssl_version: 1.1.1t
8787

8888
steps:
8989
- template: ./posix-steps.yml

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Lib/ast.py @isidentical
151151

152152
**/*sysconfig* @FFY00
153153

154+
**/*cjkcodecs* @corona10
155+
154156
# macOS
155157
/Mac/ @python/macos-team
156158
**/*osx_support* @python/macos-team

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
needs: check_source
177177
if: needs.check_source.outputs.run_tests == 'true'
178178
env:
179-
OPENSSL_VER: 1.1.1s
179+
OPENSSL_VER: 1.1.1t
180180
PYTHONSTRICTEXTENSIONBUILD: 1
181181
steps:
182182
- uses: actions/checkout@v3
@@ -235,7 +235,7 @@ jobs:
235235
strategy:
236236
fail-fast: false
237237
matrix:
238-
openssl_ver: [1.1.1s, 3.0.7, 3.1.0-beta1]
238+
openssl_ver: [1.1.1t, 3.0.8, 3.1.0-beta1]
239239
env:
240240
OPENSSL_VER: ${{ matrix.openssl_ver }}
241241
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -282,7 +282,7 @@ jobs:
282282
needs: check_source
283283
if: needs.check_source.outputs.run_tests == 'true'
284284
env:
285-
OPENSSL_VER: 1.1.1s
285+
OPENSSL_VER: 1.1.1t
286286
PYTHONSTRICTEXTENSIONBUILD: 1
287287
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
288288
steps:

Doc/c-api/typeobj.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,16 @@ and :c:type:`PyType_Type` effectively act as defaults.)
13131313
.. versionadded:: 3.10
13141314

13151315

1316+
.. data:: Py_TPFLAGS_VALID_VERSION_TAG
1317+
1318+
Internal. Do not set or unset this flag.
1319+
To indicate that a class has changed call :c:func:`PyType_Modified`
1320+
1321+
.. warning::
1322+
This flag is present in header files, but is an internal feature and should
1323+
not be used. It will be removed in a future version of CPython
1324+
1325+
13161326
.. c:member:: const char* PyTypeObject.tp_doc
13171327
13181328
An optional pointer to a NUL-terminated C string giving the docstring for this

Doc/library/subprocess.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ underlying :class:`Popen` interface can be used directly.
111111
Added the *text* parameter, as a more understandable alias of *universal_newlines*.
112112
Added the *capture_output* parameter.
113113

114-
.. versionchanged:: 3.11.3
114+
.. versionchanged:: 3.12
115115

116116
Changed Windows shell search order for ``shell=True``. The current
117117
directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and
@@ -495,7 +495,7 @@ functions.
495495
*executable* parameter accepts a bytes and :term:`path-like object`
496496
on Windows.
497497

498-
.. versionchanged:: 3.11.3
498+
.. versionchanged:: 3.12
499499

500500
Changed Windows shell search order for ``shell=True``. The current
501501
directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and
@@ -1174,7 +1174,7 @@ calls these functions.
11741174
.. versionchanged:: 3.3
11751175
*timeout* was added.
11761176

1177-
.. versionchanged:: 3.11.3
1177+
.. versionchanged:: 3.12
11781178

11791179
Changed Windows shell search order for ``shell=True``. The current
11801180
directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and
@@ -1214,7 +1214,7 @@ calls these functions.
12141214
.. versionchanged:: 3.3
12151215
*timeout* was added.
12161216

1217-
.. versionchanged:: 3.11.3
1217+
.. versionchanged:: 3.12
12181218

12191219
Changed Windows shell search order for ``shell=True``. The current
12201220
directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and
@@ -1277,7 +1277,7 @@ calls these functions.
12771277
.. versionadded:: 3.7
12781278
*text* was added as a more readable alias for *universal_newlines*.
12791279

1280-
.. versionchanged:: 3.11.3
1280+
.. versionchanged:: 3.12
12811281

12821282
Changed Windows shell search order for ``shell=True``. The current
12831283
directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and

Lib/test/test_fstring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def test_missing_expression(self):
667667
"f'''{\t\f\r\n}'''",
668668
])
669669

670-
# Different error messeges are raised when a specfier ('!', ':' or '=') is used after an empty expression
670+
# Different error messages are raised when a specfier ('!', ':' or '=') is used after an empty expression
671671
self.assertAllRaise(SyntaxError, "f-string: expression required before '!'",
672672
["f'{!r}'",
673673
"f'{ !r}'",

Mac/BuildScript/build-installer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ def library_recipes():
246246

247247
result.extend([
248248
dict(
249-
name="OpenSSL 1.1.1s",
250-
url="https://www.openssl.org/source/openssl-1.1.1s.tar.gz",
251-
checksum='c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa',
249+
name="OpenSSL 1.1.1t",
250+
url="https://www.openssl.org/source/openssl-1.1.1t.tar.gz",
251+
checksum='8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b',
252252
buildrecipe=build_universal_openssl,
253253
configure=None,
254254
install=None,
@@ -359,9 +359,9 @@ def library_recipes():
359359
),
360360
),
361361
dict(
362-
name="SQLite 3.39.4",
363-
url="https://sqlite.org/2022/sqlite-autoconf-3390400.tar.gz",
364-
checksum="44b7e6691b0954086f717a6c43b622a5",
362+
name="SQLite 3.40.1",
363+
url="https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz",
364+
checksum="5498af3a357753d473ee713e363fa5b7",
365365
extra_cflags=('-Os '
366366
'-DSQLITE_ENABLE_FTS5 '
367367
'-DSQLITE_ENABLE_FTS4 '
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Document that the Py_TPFLAGS_VALID_VERSION_TAG is an internal feature,
2+
should not be used, and will be removed.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update :mod:`tracemalloc` to handle presize of object properly. Patch by
2+
Dong-hee Na.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Updated the OpenSSL version used in Windows and macOS binary release builds
2+
to 1.1.1t to address CVE-2023-0286, CVE-2022-4303, and CVE-2022-4303 per
3+
`the OpenSSL 2023-02-07 security advisory
4+
<https://www.openssl.org/news/secadv/20230207.txt>`_.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update macOS installer to SQLite 3.40.1.

Modules/_io/textio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ textiobase_detach(PyObject *self, PyObject *Py_UNUSED(ignored))
5656
}
5757

5858
PyDoc_STRVAR(textiobase_read_doc,
59-
"Read at most n characters from stream.\n"
59+
"Read at most size characters from stream.\n"
6060
"\n"
61-
"Read from underlying buffer until we have n characters or we hit EOF.\n"
62-
"If n is negative or omitted, read until EOF.\n"
61+
"Read from underlying buffer until we have size characters or we hit EOF.\n"
62+
"If size is negative or omitted, read until EOF.\n"
6363
);
6464

6565
static PyObject *

Modules/_math.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
static double
88
_Py_log1p(double x)
99
{
10-
/* Some platforms supply a log1p function but don't respect the sign of
11-
zero: log1p(-0.0) gives 0.0 instead of the correct result of -0.0.
10+
/* Some platforms (e.g. MacOS X 10.8, see gh-59682) supply a log1p function
11+
but don't respect the sign of zero: log1p(-0.0) gives 0.0 instead of
12+
the correct result of -0.0.
1213
1314
To save fiddling with configure tests and platform checks, we handle the
1415
special case of zero input directly on all platforms.

Modules/_tracemalloc.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "pycore_fileutils.h" // _Py_write_noraise()
33
#include "pycore_gc.h" // PyGC_Head
44
#include "pycore_hashtable.h" // _Py_hashtable_t
5+
#include "pycore_object.h" // _PyType_PreHeaderSize
56
#include "pycore_pymem.h" // _Py_tracemalloc_config
67
#include "pycore_runtime.h" // _Py_ID()
78
#include "pycore_traceback.h"
@@ -1400,20 +1401,16 @@ _tracemalloc__get_object_traceback(PyObject *module, PyObject *obj)
14001401
/*[clinic end generated code: output=41ee0553a658b0aa input=29495f1b21c53212]*/
14011402
{
14021403
PyTypeObject *type;
1403-
void *ptr;
14041404
traceback_t *traceback;
14051405

14061406
type = Py_TYPE(obj);
1407-
if (PyType_IS_GC(type)) {
1408-
ptr = (void *)((char *)obj - sizeof(PyGC_Head));
1409-
}
1410-
else {
1411-
ptr = (void *)obj;
1412-
}
1407+
const size_t presize = _PyType_PreHeaderSize(type);
1408+
uintptr_t ptr = (uintptr_t)((char *)obj - presize);
14131409

1414-
traceback = tracemalloc_get_traceback(DEFAULT_DOMAIN, (uintptr_t)ptr);
1415-
if (traceback == NULL)
1410+
traceback = tracemalloc_get_traceback(DEFAULT_DOMAIN, ptr);
1411+
if (traceback == NULL) {
14161412
Py_RETURN_NONE;
1413+
}
14171414

14181415
return traceback_to_pyobject(traceback, NULL);
14191416
}
@@ -1723,14 +1720,9 @@ _PyTraceMalloc_NewReference(PyObject *op)
17231720
return -1;
17241721
}
17251722

1726-
uintptr_t ptr;
17271723
PyTypeObject *type = Py_TYPE(op);
1728-
if (PyType_IS_GC(type)) {
1729-
ptr = (uintptr_t)((char *)op - sizeof(PyGC_Head));
1730-
}
1731-
else {
1732-
ptr = (uintptr_t)op;
1733-
}
1724+
const size_t presize = _PyType_PreHeaderSize(type);
1725+
uintptr_t ptr = (uintptr_t)((char *)op - presize);
17341726

17351727
int res = -1;
17361728

0 commit comments

Comments
 (0)