8000 Merge branch 'main' into inlinecomp2 · carljm/cpython@add772e · GitHub
[go: up one dir, main page]

Skip to content

Commit add772e

Browse files
committed
Merge branch 'main' into inlinecomp2
* main: Fix some typos in asdl_c.py (pythonGH-101757) pythongh-101747: Fix refleak in new `OrderedDict` repr (pythonGH-101748) pythongh-101430: Update tracemalloc to handle presize properly. (pythongh-101745) pythonGH-101228: Fix typo in docstring for read method of `_io.TextIOWrapper` class (python#101227) Fix typo in `test_fstring.py` (python#101600) pythongh-101726: Update the OpenSSL version to 1.1.1t (pythonGH-101727) pythongh-101283: Fix 'versionchanged' for the shell=True fallback on Windows in 3.12 (pythonGH-101728) LibFFI build requires x64 Cygwin, and skip the ARM build (pythonGH-101743)
2 parents 568a470 + 448c7d1 commit add772e

File tree

18 files changed

+47
-53
lines changed

18 files changed

+47
-53
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/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/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: 3 additions & 3 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,
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>`_.

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/_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)
0