Skip to content

Commit 91b0509

Browse files
authored
Merge branch '3.10' into backport-735f25c-3.10
2 parents 777ef08 + 4413f2e commit 91b0509

File tree

8 files changed

+44
-20
lines changed

8 files changed

+44
-20
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ jobs:
227227
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
228228
- name: 'Restore OpenSSL build'
229229
id: cache-openssl
230-
uses: actions/cache@v3.0.2
230+
uses: actions/cache@v4
231231
with:
232232
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
233233
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -275,7 +275,7 @@ jobs:
275275
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
276276
- name: 'Restore OpenSSL build'
277277
id: cache-openssl
278-
uses: actions/cache@v3
278+
uses: actions/cache@v4
279279
with:
280280
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
281281
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}

.github/workflows/doc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,20 @@ jobs:
3838
- name: 'Set up Python'
3939
uses: actions/setup-python@v4
4040
with:
41-
python-version: '3'
41+
python-version: '3.12'
4242
cache: 'pip'
4343
cache-dependency-path: 'Doc/requirements.txt'
4444
- name: 'Install build dependencies'
4545
run: make -C Doc/ venv
4646
- name: 'Build HTML documentation'
4747
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
4848
- name: 'Upload'
49-
uses: actions/upload-artifact@v3
49+
uses: actions/upload-artifact@v4
5050
with:
5151
name: doc-html
5252
path: Doc/build/html
53+
include-hidden-files: true
54+
overwrite: true
5355

5456
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
5557
doctest:

.readthedocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# clicking on the docs preview link on a PR will result in a 404.
44
version: 2
55
formats: []
6+
sphinx:
7+
configuration: Doc/conf.py
68
build:
79
os: "ubuntu-22.04"
810
tools:

Doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ blurb
1515

1616
# The theme used by the documentation is stored separately, so we need
1717
# to install that as well.
18-
python-docs-theme>=2022.1
18+
python-docs-theme==2025.2
1919

2020
-c constraints.txt

Doc/tutorial/classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Now what can we do with instance objects? The only operations understood by
325325
instance objects are attribute references. There are two kinds of valid
326326
attribute names: data attributes and methods.
327327

328-
*data attributes* correspond to "instance variables" in Smalltalk, and to "data
328+
*Data attributes* correspond to "instance variables" in Smalltalk, and to "data
329329
members" in C++. Data attributes need not be declared; like local variables,
330330
they spring into existence when they are first assigned to. For example, if
331331
``x`` is the instance of :class:`MyClass` created above, the following piece of

Lib/test/test_socket.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
# test unicode string and carriage return
4242
MSG = 'Michael Gilfix was here\u1234\r\n'.encode('utf-8')
4343

44+
VMADDR_CID_LOCAL = 1
4445
VSOCKPORT = 1234
4546
AIX = platform.system() == "AIX"
4647

@@ -124,8 +125,8 @@ def _have_socket_qipcrtr():
124125

125126
def _have_socket_vsock():
126127
"""Check whether AF_VSOCK sockets are supported on this host."""
127-
ret = get_cid() is not None
128-
return ret
128+
cid = get_cid()
129+
return (cid is not None)
129130

130131

131132
def _have_socket_bluetooth():
@@ -487,8 +488,8 @@ def clientTearDown(self):
487488
@unittest.skipIf(fcntl is None, "need fcntl")
488489
@unittest.skipUnless(HAVE_SOCKET_VSOCK,
489490
'VSOCK sockets required for this test.')
490-
@unittest.skipUnless(get_cid() != 2,
491-
"This test can only be run on a virtual guest.")
491+
@unittest.skipUnless(get_cid() != 2, # VMADDR_CID_HOST
492+
"This test can only be run on a virtual guest.")
492493
class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest):
493494

494495
def __init__(self, methodName='runTest'):
@@ -509,10 +510,16 @@ def clientSetUp(self):
509510
self.cli = socket.socket(socket.AF_VSOCK, socket.SOCK_STREAM)
510511
self.addCleanup(self.cli.close)
511512
cid = get_cid()
513+
if cid in (socket.VMADDR_CID_HOST, socket.VMADDR_CID_ANY):
514+
# gh-119461: Use the local communication address (loopback)
515+
cid = VMADDR_CID_LOCAL
512516
self.cli.connect((cid, VSOCKPORT))
513517

514518
def testStream(self):
515-
msg = self.conn.recv(1024)
519+
try:
520+
msg = self.conn.recv(1024)
521+
except PermissionError as exc:
522+
self.skipTest(repr(exc))
516523
self.assertEqual(msg, MSG)
517524

518525
def _testStream(self):

Lib/tkinter/test/test_tkinter/test_widgets.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,9 @@ def test_configure_tabs(self):
676676
else:
677677
self.checkParam(widget, 'tabs', (10.2, 20.7, '1i', '2i'))
678678
self.checkParam(widget, 'tabs', '10.2 20.7 1i 2i',
679-
expected=('10.2', '20.7', '1i', '2i'))
679+
expected=(10.2, 20.7, '1i', '2i')
680+
if get_tk_patchlevel() >= (8, 6, 14)
681+
else ('10.2', '20.7', '1i', '2i'))
680682
self.checkParam(widget, 'tabs', '2c left 4c 6c center',
681683
expected=('2c', 'left', '4c', '6c', 'center'))
682684
self.checkInvalidParam(widget, 'tabs', 'spam',
@@ -1014,12 +1016,16 @@ def test_itemconfigure(self):
10141016
widget.itemconfigure()
10151017
with self.assertRaisesRegex(TclError, 'bad listbox index "red"'):
10161018
widget.itemconfigure('red')
1019+
if get_tk_patchlevel() >= (8, 6, 14):
1020+
prefix = ('background', '', '', '')
1021+
else:
1022+
prefix = ('background', 'background', 'Background', '')
10171023
self.assertEqual(widget.itemconfigure(0, 'background'),
1018-
('background', 'background', 'Background', '', 'red'))
1024+
(*prefix, 'red'))
10191025
self.assertEqual(widget.itemconfigure('end', 'background'),
1020-
('background', 'background', 'Background', '', 'violet'))
1026+
(*prefix, 'violet'))
10211027
self.assertEqual(widget.itemconfigure('@0,0', 'background'),
1022-
('background', 'background', 'Background', '', 'red'))
1028+
(*prefix, 'red'))
10231029

10241030
d = widget.itemconfigure(0)
10251031
self.assertIsInstance(d, dict)

Lib/tkinter/test/test_ttk/test_widgets.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ def test_configure_class(self):
2828

2929
def test_configure_padding(self):
3030
widget = self.create()
31-
self.checkParam(widget, 'padding', 0, expected=('0',))
32-
self.checkParam(widget, 'padding', 5, expected=('5',))
33-
self.checkParam(widget, 'padding', (5, 6), expected=('5', '6'))
31+
if get_tk_patchlevel() < (8, 6, 14):
32+
def padding_conv(value):
33+
self.assertIsInstance(value, tuple)
34+
return tuple(map(str, value))
35+
else:
36+
padding_conv = None
37+
self.checkParam(widget, 'padding', 0, expected=(0,), conv=padding_conv)
38+
self.checkParam(widget, 'padding', 5, expected=(5,), conv=padding_conv)
39+
self.checkParam(widget, 'padding', (5, 6),
40+
expected=(5, 6), conv=padding_conv)
3441
self.checkParam(widget, 'padding', (5, 6, 7),
35-
expected=('5', '6', '7'))
42+
expected=(5, 6, 7), conv=padding_conv)
3643
self.checkParam(widget, 'padding', (5, 6, 7, 8),
37-
expected=('5', '6', '7', '8'))
44+
expected=(5, 6, 7, 8), conv=padding_conv)
3845
self.checkParam(widget, 'padding', ('5p', '6p', '7p', '8p'))
3946
self.checkParam(widget, 'padding', (), expected='')
4047

0 commit comments

Comments
 (0)