Skip to content

Commit d3da915

Browse files
authored
Merge branch 'main' into arm-runners
2 parents 5648245 + 3afb639 commit d3da915

30 files changed

+1096
-247
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ jobs:
259259
fail-fast: false
260260
matrix:
261261
os: [ubuntu-24.04]
262-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
262+
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
263+
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
263264
env:
264265
OPENSSL_VER: ${{ matrix.openssl_ver }}
265266
MULTISSL_DIR: ${{ github.workspace }}/multissl

.github/workflows/reusable-macos.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ jobs:
3737
path: config.cache
3838
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
3939
- name: Install Homebrew dependencies
40-
run: brew install pkg-config openssl@3.0 xz gdbm tcl-tk make
40+
run: |
41+
brew install pkg-config openssl@3.0 xz gdbm tcl-tk@8 make
42+
# Because alternate versions are not symlinked into place by default:
43+
brew link tcl-tk@8
4144
- name: Configure CPython
4245
run: |
4346
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Object Protocol
8585
instead of the :func:`repr`.
8686
8787
88-
.. c:function:: int PyObject_HasAttrWithError(PyObject *o, const char *attr_name)
88+
.. c:function:: int PyObject_HasAttrWithError(PyObject *o, PyObject *attr_name)
8989
9090
Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.
9191
This is equivalent to the Python expression ``hasattr(o, attr_name)``.

Doc/library/ctypes.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,9 +2035,9 @@ Utility functions
20352035

20362036
.. function:: FormatError([code])
20372037

2038-
Returns a textual description of the error code *code*. If no
2039-
error code is specified, the last error code is used by calling the Windows
2040-
api function GetLastError.
2038+
Returns a textual description of the error code *code*. If no error code is
2039+
specified, the last error code is used by calling the Windows API function
2040+
:func:`GetLastError`.
20412041

20422042
.. availability:: Windows
20432043

@@ -2142,9 +2142,8 @@ Utility functions
21422142

21432143
.. function:: WinError(code=None, descr=None)
21442144

2145-
This function is probably the worst-named thing in ctypes. It
2146-
creates an instance of :exc:`OSError`. If *code* is not specified,
2147-
``GetLastError`` is called to determine the error code. If *descr* is not
2145+
Creates an instance of :exc:`OSError`. If *code* is not specified,
2146+
:func:`GetLastError` is called to determine the error code. If *descr* is not
21482147
specified, :func:`FormatError` is called to get a textual description of the
21492148
error.
21502149

Doc/library/token.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ the :mod:`tokenize` module.
7979
``type_comments=True``.
8080

8181

82+
.. data:: EXACT_TOKEN_TYPES
83+
84+
A dictionary mapping the string representation of a token to its numeric code.
85+
86+
.. versionadded:: 3.8
87+
88+
8289
.. versionchanged:: 3.5
8390
Added :data:`!AWAIT` and :data:`!ASYNC` tokens.
8491

Lib/test/clinic.test.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5303,9 +5303,7 @@ Test_meth_coexist_impl(TestObj *self)
53035303
Test.property
53045304
[clinic start generated code]*/
53055305

5306-
#if defined(Test_property_HAS_DOCSTR)
5307-
# define Test_property_DOCSTR Test_property__doc__
5308-
#else
5306+
#if !defined(Test_property_DOCSTR)
53095307
# define Test_property_DOCSTR NULL
53105308
#endif
53115309
#if defined(TEST_PROPERTY_GETSETDEF)
@@ -5326,16 +5324,14 @@ Test_property_get(TestObj *self, void *Py_UNUSED(context))
53265324

53275325
static PyObject *
53285326
Test_property_get_impl(TestObj *self)
5329-
/*[clinic end generated code: output=27b519719d992e03 input=2d92b3449fbc7d2b]*/
5327+
/*[clinic end generated code: output=7cadd0f539805266 input=2d92b3449fbc7d2b]*/
53305328

53315329
/*[clinic input]
53325330
@setter
53335331
Test.property
53345332
[clinic start generated code]*/
53355333

5336-
#if defined(TEST_PROPERTY_HAS_DOCSTR)
5337-
# define Test_property_DOCSTR Test_property__doc__
5338-
#else
5334+
#if !defined(Test_property_DOCSTR)
53395335
# define Test_property_DOCSTR NULL
53405336
#endif
53415337
#if defined(TEST_PROPERTY_GETSETDEF)
@@ -5360,7 +5356,7 @@ Test_property_set(TestObj *self, PyObject *value, void *Py_UNUSED(context))
53605356

53615357
static int
53625358
Test_property_set_impl(TestObj *self, PyObject *value)
5363-
/*[clinic end generated code: output=d51023f17c4ac3a1 input=3bc3f46a23c83a88]*/
5359+
/*[clinic end generated code: output=e4342fe9bb1d7817 input=3bc3f46a23c83a88]*/
53645360

53655361
/*[clinic input]
53665362
output push

Lib/test/test_asyncio/test_eager_task_factory.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,14 @@ async def fail():
220220
await asyncio.sleep(0)
221221
raise ValueError("no good")
222222

223+
async def blocked():
224+
fut = asyncio.Future()
225+
await fut
226+
223227
async def run():
224228
winner, index, excs = await asyncio.staggered.staggered_race(
225229
[
226-
lambda: asyncio.sleep(2, result="sleep2"),
230+
lambda: blocked(),
227231
lambda: asyncio.sleep(1, result="sleep1"),
228232
lambda: fail()
229233
],

Lib/test/test_threading_local.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,21 @@ def test_threading_local_clear_race(self):
208208

209209
_testcapi.join_temporary_c_thread()
210210

211+
@support.cpython_only
212+
def test_error(self):
213+
class Loop(self._local):
214+
attr = 1
215+
216+
# Trick the "if name == '__dict__':" test of __setattr__()
217+
# to always be true
218+
class NameCompareTrue:
219+
def __eq__(self, other):
220+
return True
221+
222+
loop = Loop()
223+
with self.assertRaisesRegex(AttributeError, 'Loop.*read-only'):
224+
loop.__setattr__(NameCompareTrue(), 2)
225+
211226

212227
class ThreadLocalTest(unittest.TestCase, BaseLocalTest):
213228
_local = _thread._local

Lib/token.py

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ Mark Lutz
11541154
Taras Lyapun
11551155
Jim Lynch
11561156
Mikael Lyngvig
1157+
Ilya Lyubavski
11571158
Jeff MacDonald
11581159
John Machin
11591160
Andrew I MacIntyre

0 commit comments

Comments
 (0)