Skip to content

Commit 82a09ec

Browse files
authored
Merge branch 'main' into gh-138216-fix-testGetServBy
2 parents e6b1b79 + 11a5fc8 commit 82a09ec

File tree

79 files changed

+2041
-934
lines changed

Some content is hidden

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

79 files changed

+2041
-934
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"dnf",
66
"install",
77
"-y",
8-
"which",
9-
"zsh",
10-
"fish",
118
// For umask fix below.
129
"/usr/bin/setfacl"
1310
],

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
- name: Build CPython
131131
run: |
132132
make -j4 regen-all
133-
make regen-stdlib-module-names regen-sbom regen-unicodedata
133+
make regen-stdlib-module-names regen-sbom
134134
- name: Check for changes
135135
run: |
136136
git add -u

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ repos:
1414
name: Run Ruff (lint) on Tools/build/
1515
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]
1616
files: ^Tools/build/
17+
- id: ruff
18+
name: Run Ruff (lint) on Tools/i18n/
19+
args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
20+
files: ^Tools/i18n/
1721
- id: ruff
1822
name: Run Ruff (lint) on Argument Clinic
1923
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]

Doc/deprecations/pending-removal-in-3.15.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ Pending removal in Python 3.15
107107

108108
* :mod:`zipimport`:
109109

110-
* :meth:`~zipimport.zipimporter.load_module` has been deprecated since
110+
* :meth:`!zipimport.zipimporter.load_module` has been deprecated since
111111
Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead.
112-
(Contributed by Jiahao Li in :gh:`125746`.)
112+
(:gh:`125746`.)

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ Here are three practical data validation utilities:
420420

421421
def validate(self, value):
422422
if not isinstance(value, str):
423-
raise TypeError(f'Expected {value!r} to be an str')
423+
raise TypeError(f'Expected {value!r} to be a str')
424424
if self.minsize is not None and len(value) < self.minsize:
425425
raise ValueError(
426426
f'Expected {value!r} to be no smaller than {self.minsize!r}'

Doc/library/exceptions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,9 @@ The following exceptions are used as warning categories; see the
897897

898898
Base class for warnings about dubious syntax.
899899

900+
This warning is typically emitted when compiling Python source code, and usually won't be reported
901+
when running already compiled code.
902+
900903

901904
.. exception:: RuntimeWarning
902905

Doc/library/shutil.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ In the final archive, :file:`please_add.txt` should be included, but
860860
... root_dir='tmp/root',
861861
... base_dir='structure/content',
862862
... )
863-
'/Users/tarek/my_archive.tar'
863+
'/Users/tarek/myarchive.tar'
864864

865865
Listing the files in the resulting archive gives us:
866866

Doc/library/ssl.rst

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,19 +1684,33 @@ to speed up repeated connections from the same clients.
16841684

16851685
.. method:: SSLContext.set_ciphers(ciphers)
16861686

1687-
Set the available ciphers for sockets created with this context.
1688-
It should be a string in the `OpenSSL cipher list format
1687+
Set the allowed ciphers for sockets created with this context when
1688+
connecting using TLS 1.2 and earlier. The *ciphers* argument should
1689+
be a string in the `OpenSSL cipher list format
16891690
<https://docs.openssl.org/master/man1/ciphers/>`_.
1691+
To set allowed TLS 1.3 ciphers, use :meth:`SSLContext.set_ciphersuites`.
1692+
16901693
If no cipher can be selected (because compile-time options or other
16911694
configuration forbids use of all the specified ciphers), an
16921695
:class:`SSLError` will be raised.
16931696

16941697
.. note::
1695-
when connected, the :meth:`SSLSocket.cipher` method of SSL sockets will
1696-
give the currently selected cipher.
1698+
When connected, the :meth:`SSLSocket.cipher` method of SSL sockets will
1699+
return details about the negotiated cipher.
1700+
1701+
.. method:: SSLContext.set_ciphersuites(ciphersuites)
1702+
1703+
Set the allowed ciphers for sockets created with this context when
1704+
connecting using TLS 1.3. The *ciphersuites* argument should be a
1705+
colon-separate string of TLS 1.3 cipher names. If no cipher can be
1706+
selected (because compile-time options or other configuration forbids
1707+
use of all the specified ciphers), an :class:`SSLError` will be raised.
1708+
1709+
.. note::
1710+
When connected, the :meth:`SSLSocket.cipher` method of SSL sockets will
1711+
return details about the negotiated cipher.
16971712

1698-
TLS 1.3 cipher suites cannot be disabled with
1699-
:meth:`~SSLContext.set_ciphers`.
1713+
.. versionadded:: next
17001714

17011715
.. method:: SSLContext.set_groups(groups)
17021716

@@ -2845,10 +2859,15 @@ TLS 1.3
28452859
The TLS 1.3 protocol behaves slightly differently than previous version
28462860
of TLS/SSL. Some new TLS 1.3 features are not yet available.
28472861

2848-
- TLS 1.3 uses a disjunct set of cipher suites. All AES-GCM and
2849-
ChaCha20 cipher suites are enabled by default. The method
2850-
:meth:`SSLContext.set_ciphers` cannot enable or disable any TLS 1.3
2851-
ciphers yet, but :meth:`SSLContext.get_ciphers` returns them.
2862+
- TLS 1.3 uses a disjunct set of cipher suites. All AES-GCM and ChaCha20
2863+
cipher suites are enabled by default. To restrict which TLS 1.3 ciphers
2864+
are allowed, the :meth:`SSLContext.set_ciphersuites` method should be
2865+
called instead of :meth:`SSLContext.set_ciphers`, which only affects
2866+
ciphers in older TLS versions. The :meth:`SSLContext.get_ciphers` method
2867+
returns information about ciphers for both TLS 1.3 and earlier versions
2868+
and the method :meth:`SSLSocket.cipher` returns information about the
2869+
negotiated cipher for both TLS 1.3 and earlier versions once a connection
2870+
is established.
28522871
- Session tickets are no longer sent as part of the initial handshake and
28532872
are handled differently. :attr:`SSLSocket.session` and :class:`SSLSession`
28542873
are not compatible with TLS 1.3.

Doc/library/stdtypes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,14 @@ expression support in the :mod:`re` module).
19111911
Return the lowest index in the string where substring *sub* is found within
19121912
the slice ``s[start:end]``. Optional arguments *start* and *end* are
19131913
interpreted as in slice notation. Return ``-1`` if *sub* is not found.
1914+
For example::
1915+
1916+
>>> 'spam, spam, spam'.find('sp')
1917+
0
1918+
>>> 'spam, spam, spam'.find('sp', 5)
1919+
6
1920+
1921+
See also :meth:`rfind` and :meth:`index`.
19141922

19151923
.. note::
19161924

Doc/library/warnings.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ The following warnings category classes are currently defined:
8080
| | unless triggered by code in ``__main__``). |
8181
+----------------------------------+-----------------------------------------------+
8282
| :exc:`SyntaxWarning` | Base category for warnings about dubious |
83-
| | syntactic features. |
83+
| | syntactic features (typically emitted when |
84+
| | compiling Python source code, and hence |
85+
| | may not be suppressed by runtime filters) |
8486
+----------------------------------+-----------------------------------------------+
8587
| :exc:`RuntimeWarning` | Base category for warnings about dubious |
8688
| | runtime features. |

0 commit comments

Comments
 (0)