summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r--meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch6
-rw-r--r--meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch1452
-rw-r--r--meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch3
-rw-r--r--meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch15
-rw-r--r--meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch18
-rw-r--r--meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch18
-rw-r--r--meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch9
-rw-r--r--meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch26
-rw-r--r--meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch120
-rw-r--r--meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch10
-rw-r--r--meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch27
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_active_children-skip-problematic-test.patch27
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch7
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_deadlock-skip-problematic-test.patch27
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch7
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch44
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch11
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch7
-rw-r--r--meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch33
-rw-r--r--meta/recipes-devtools/python/python3/cgi_py.patch32
-rw-r--r--meta/recipes-devtools/python/python3/create_manifest3.py2
-rw-r--r--meta/recipes-devtools/python/python3/crosspythonpath.patch34
-rw-r--r--meta/recipes-devtools/python/python3/deterministic_imports.patch40
-rw-r--r--meta/recipes-devtools/python/python3/makerace.patch6
-rw-r--r--meta/recipes-devtools/python/python3/python3-manifest.json137
-rw-r--r--meta/recipes-devtools/python/python3/valid-dists.patch160
26 files changed, 1815 insertions, 463 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch
index 0d807db39f..81a613c151 100644
--- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch
+++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch
@@ -1,4 +1,4 @@
1From 365399f17d35719d828ddd49182dcb401fb7791c Mon Sep 17 00:00:00 2001 1From 6b111a328c1c57b1580d63894b2b5d337316f6d4 Mon Sep 17 00:00:00 2001
2From: Paulo Neves <ptsneves@gmail.com> 2From: Paulo Neves <ptsneves@gmail.com>
3Date: Tue, 7 Jun 2022 16:16:41 +0200 3Date: Tue, 7 Jun 2022 16:16:41 +0200
4Subject: [PATCH] Avoid shebang overflow on python-config.py 4Subject: [PATCH] Avoid shebang overflow on python-config.py
@@ -16,10 +16,10 @@ Upstream-Status: Denied [distribution]
16 1 file changed, 2 insertions(+) 16 1 file changed, 2 insertions(+)
17 17
18diff --git a/Makefile.pre.in b/Makefile.pre.in 18diff --git a/Makefile.pre.in b/Makefile.pre.in
19index 77bf09a..6353c57 100644 19index 9ec3a71..f7d5382 100644
20--- a/Makefile.pre.in 20--- a/Makefile.pre.in
21+++ b/Makefile.pre.in 21+++ b/Makefile.pre.in
22@@ -2339,6 +2339,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh 22@@ -2578,6 +2578,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
23 @ # Substitution happens here, as the completely-expanded BINDIR 23 @ # Substitution happens here, as the completely-expanded BINDIR
24 @ # is not available in configure 24 @ # is not available in configure
25 sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py 25 sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py
diff --git a/meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch b/meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch
new file mode 100644
index 0000000000..075737e7d1
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch
@@ -0,0 +1,1452 @@
1From db5c5763f3e3172f1dd011355b41469770dafc0f Mon Sep 17 00:00:00 2001
2From: Petr Viktorin <encukou@gmail.com>
3Date: Thu, 28 Nov 2024 13:29:27 +0100
4Subject: [PATCH] gh-127330: Update for OpenSSL 3.4 & document+improve the
5 update process (GH-127331)
6
7- Add `git describe` output to headers generated by `make_ssl_data.py`
8
9 This info is more important than the date when the file was generated.
10 It does mean that the tool now requires a Git checkout of OpenSSL,
11 not for example a release tarball.
12
13- Regenerate the older file to add the info.
14 To the other older file, add a note about manual edits.
15
16- Add notes on how to add a new OpenSSL version
17
18- Add 3.4 error messages and multissl tests
19
20Upstream-Status: Submitted [https://github.com/python/cpython/commit/db5c5763f3e3172f1dd011355b41469770dafc0f]
21Signed-off-by: Peter Marko <peter.marko@siemens.com>
22---
23 Modules/_ssl.c | 2 +-
24 Modules/_ssl_data_111.h | 4 +-
25 Modules/_ssl_data_300.h | 5 +-
26 Modules/{_ssl_data_31.h => _ssl_data_34.h} | 674 ++++++++++++++++++++-
27 Tools/c-analyzer/cpython/_parser.py | 4 +-
28 Tools/ssl/make_ssl_data.py | 34 +-
29 Tools/ssl/multissltests.py | 1 +
30 7 files changed, 714 insertions(+), 10 deletions(-)
31 rename Modules/{_ssl_data_31.h => _ssl_data_34.h} (92%)
32
33diff --git a/Modules/_ssl.c b/Modules/_ssl.c
34index b6b5ebf094c..e5b8bf21002 100644
35--- a/Modules/_ssl.c
36+++ b/Modules/_ssl.c
37@@ -121,7 +121,7 @@ static void _PySSLFixErrno(void) {
38
39 /* Include generated data (error codes) */
40 #if (OPENSSL_VERSION_NUMBER >= 0x30100000L)
41-#include "_ssl_data_31.h"
42+#include "_ssl_data_34.h"
43 #elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
44 #include "_ssl_data_300.h"
45 #elif (OPENSSL_VERSION_NUMBER >= 0x10101000L)
46diff --git a/Modules/_ssl_data_111.h b/Modules/_ssl_data_111.h
47index 093c786e6a2..061fac2bd58 100644
48--- a/Modules/_ssl_data_111.h
49+++ b/Modules/_ssl_data_111.h
50@@ -1,4 +1,6 @@
51-/* File generated by Tools/ssl/make_ssl_data.py *//* Generated on 2023-06-01T02:58:04.081473 */
52+/* File generated by Tools/ssl/make_ssl_data.py */
53+/* Generated on 2024-11-27T12:48:46.194048+00:00 */
54+/* Generated from Git commit OpenSSL_1_1_1w-0-ge04bd3433f */
55 static struct py_ssl_library_code library_codes[] = {
56 #ifdef ERR_LIB_ASN1
57 {"ASN1", ERR_LIB_ASN1},
58diff --git a/Modules/_ssl_data_300.h b/Modules/_ssl_data_300.h
59index dc66731f6b6..b687ce43c77 100644
60--- a/Modules/_ssl_data_300.h
61+++ b/Modules/_ssl_data_300.h
62@@ -1,4 +1,7 @@
63-/* File generated by Tools/ssl/make_ssl_data.py *//* Generated on 2023-06-01T03:03:52.163218 */
64+/* File generated by Tools/ssl/make_ssl_data.py */
65+/* Generated on 2023-06-01T03:03:52.163218 */
66+/* Manually edited to add definitions from 1.1.1 (GH-105174) */
67+
68 static struct py_ssl_library_code library_codes[] = {
69 #ifdef ERR_LIB_ASN1
70 {"ASN1", ERR_LIB_ASN1},
71diff --git a/Modules/_ssl_data_31.h b/Modules/_ssl_data_34.h
72similarity index 92%
73rename from Modules/_ssl_data_31.h
74rename to Modules/_ssl_data_34.h
75index c589c501f4e..d4af3e1c1fa 100644
76--- a/Modules/_ssl_data_31.h
77+++ b/Modules/_ssl_data_34.h
78@@ -1,4 +1,6 @@
79-/* File generated by Tools/ssl/make_ssl_data.py *//* Generated on 2023-06-01T03:04:00.275280 */
80+/* File generated by Tools/ssl/make_ssl_data.py */
81+/* Generated on 2024-11-27T12:35:52.276767+00:00 */
82+/* Generated from Git commit openssl-3.4.0-0-g98acb6b028 */
83 static struct py_ssl_library_code library_codes[] = {
84 #ifdef ERR_LIB_ASN1
85 {"ASN1", ERR_LIB_ASN1},
86@@ -300,6 +302,11 @@ static struct py_ssl_error_code error_codes[] = {
87 #else
88 {"FIRST_NUM_TOO_LARGE", 13, 122},
89 #endif
90+ #ifdef ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT
91+ {"GENERALIZEDTIME_IS_TOO_SHORT", ERR_LIB_ASN1, ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT},
92+ #else
93+ {"GENERALIZEDTIME_IS_TOO_SHORT", 13, 232},
94+ #endif
95 #ifdef ASN1_R_HEADER_TOO_LONG
96 {"HEADER_TOO_LONG", ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG},
97 #else
98@@ -730,6 +737,11 @@ static struct py_ssl_error_code error_codes[] = {
99 #else
100 {"UNSUPPORTED_TYPE", 13, 196},
101 #endif
102+ #ifdef ASN1_R_UTCTIME_IS_TOO_SHORT
103+ {"UTCTIME_IS_TOO_SHORT", ERR_LIB_ASN1, ASN1_R_UTCTIME_IS_TOO_SHORT},
104+ #else
105+ {"UTCTIME_IS_TOO_SHORT", 13, 233},
106+ #endif
107 #ifdef ASN1_R_WRONG_INTEGER_TYPE
108 {"WRONG_INTEGER_TYPE", ERR_LIB_ASN1, ASN1_R_WRONG_INTEGER_TYPE},
109 #else
110@@ -845,6 +857,11 @@ static struct py_ssl_error_code error_codes[] = {
111 #else
112 {"LISTEN_V6_ONLY", 32, 136},
113 #endif
114+ #ifdef BIO_R_LOCAL_ADDR_NOT_AVAILABLE
115+ {"LOCAL_ADDR_NOT_AVAILABLE", ERR_LIB_BIO, BIO_R_LOCAL_ADDR_NOT_AVAILABLE},
116+ #else
117+ {"LOCAL_ADDR_NOT_AVAILABLE", 32, 111},
118+ #endif
119 #ifdef BIO_R_LOOKUP_RETURNED_NOTHING
120 {"LOOKUP_RETURNED_NOTHING", ERR_LIB_BIO, BIO_R_LOOKUP_RETURNED_NOTHING},
121 #else
122@@ -860,6 +877,11 @@ static struct py_ssl_error_code error_codes[] = {
123 #else
124 {"NBIO_CONNECT_ERROR", 32, 110},
125 #endif
126+ #ifdef BIO_R_NON_FATAL
127+ {"NON_FATAL", ERR_LIB_BIO, BIO_R_NON_FATAL},
128+ #else
129+ {"NON_FATAL", 32, 112},
130+ #endif
131 #ifdef BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED
132 {"NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED", ERR_LIB_BIO, BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED},
133 #else
134@@ -880,6 +902,26 @@ static struct py_ssl_error_code error_codes[] = {
135 #else
136 {"NO_SUCH_FILE", 32, 128},
137 #endif
138+ #ifdef BIO_R_PEER_ADDR_NOT_AVAILABLE
139+ {"PEER_ADDR_NOT_AVAILABLE", ERR_LIB_BIO, BIO_R_PEER_ADDR_NOT_AVAILABLE},
140+ #else
141+ {"PEER_ADDR_NOT_AVAILABLE", 32, 114},
142+ #endif
143+ #ifdef BIO_R_PORT_MISMATCH
144+ {"PORT_MISMATCH", ERR_LIB_BIO, BIO_R_PORT_MISMATCH},
145+ #else
146+ {"PORT_MISMATCH", 32, 150},
147+ #endif
148+ #ifdef BIO_R_TFO_DISABLED
149+ {"TFO_DISABLED", ERR_LIB_BIO, BIO_R_TFO_DISABLED},
150+ #else
151+ {"TFO_DISABLED", 32, 106},
152+ #endif
153+ #ifdef BIO_R_TFO_NO_KERNEL_SUPPORT
154+ {"TFO_NO_KERNEL_SUPPORT", ERR_LIB_BIO, BIO_R_TFO_NO_KERNEL_SUPPORT},
155+ #else
156+ {"TFO_NO_KERNEL_SUPPORT", 32, 108},
157+ #endif
158 #ifdef BIO_R_TRANSFER_ERROR
159 {"TRANSFER_ERROR", ERR_LIB_BIO, BIO_R_TRANSFER_ERROR},
160 #else
161@@ -920,6 +962,11 @@ static struct py_ssl_error_code error_codes[] = {
162 #else
163 {"UNABLE_TO_REUSEADDR", 32, 139},
164 #endif
165+ #ifdef BIO_R_UNABLE_TO_TFO
166+ {"UNABLE_TO_TFO", ERR_LIB_BIO, BIO_R_UNABLE_TO_TFO},
167+ #else
168+ {"UNABLE_TO_TFO", 32, 109},
169+ #endif
170 #ifdef BIO_R_UNAVAILABLE_IP_FAMILY
171 {"UNAVAILABLE_IP_FAMILY", ERR_LIB_BIO, BIO_R_UNAVAILABLE_IP_FAMILY},
172 #else
173@@ -1230,6 +1277,11 @@ static struct py_ssl_error_code error_codes[] = {
174 #else
175 {"ERROR_VALIDATING_SIGNATURE", 58, 171},
176 #endif
177+ #ifdef CMP_R_EXPECTED_POLLREQ
178+ {"EXPECTED_POLLREQ", ERR_LIB_CMP, CMP_R_EXPECTED_POLLREQ},
179+ #else
180+ {"EXPECTED_POLLREQ", 58, 104},
181+ #endif
182 #ifdef CMP_R_FAILED_BUILDING_OWN_CHAIN
183 {"FAILED_BUILDING_OWN_CHAIN", ERR_LIB_CMP, CMP_R_FAILED_BUILDING_OWN_CHAIN},
184 #else
185@@ -1250,16 +1302,51 @@ static struct py_ssl_error_code error_codes[] = {
186 #else
187 {"FAIL_INFO_OUT_OF_RANGE", 58, 129},
188 #endif
189+ #ifdef CMP_R_GENERATE_CERTREQTEMPLATE
190+ {"GENERATE_CERTREQTEMPLATE", ERR_LIB_CMP, CMP_R_GENERATE_CERTREQTEMPLATE},
191+ #else
192+ {"GENERATE_CERTREQTEMPLATE", 58, 197},
193+ #endif
194+ #ifdef CMP_R_GENERATE_CRLSTATUS
195+ {"GENERATE_CRLSTATUS", ERR_LIB_CMP, CMP_R_GENERATE_CRLSTATUS},
196+ #else
197+ {"GENERATE_CRLSTATUS", 58, 198},
198+ #endif
199+ #ifdef CMP_R_GETTING_GENP
200+ {"GETTING_GENP", ERR_LIB_CMP, CMP_R_GETTING_GENP},
201+ #else
202+ {"GETTING_GENP", 58, 192},
203+ #endif
204+ #ifdef CMP_R_GET_ITAV
205+ {"GET_ITAV", ERR_LIB_CMP, CMP_R_GET_ITAV},
206+ #else
207+ {"GET_ITAV", 58, 199},
208+ #endif
209 #ifdef CMP_R_INVALID_ARGS
210 {"INVALID_ARGS", ERR_LIB_CMP, CMP_R_INVALID_ARGS},
211 #else
212 {"INVALID_ARGS", 58, 100},
213 #endif
214+ #ifdef CMP_R_INVALID_GENP
215+ {"INVALID_GENP", ERR_LIB_CMP, CMP_R_INVALID_GENP},
216+ #else
217+ {"INVALID_GENP", 58, 193},
218+ #endif
219+ #ifdef CMP_R_INVALID_KEYSPEC
220+ {"INVALID_KEYSPEC", ERR_LIB_CMP, CMP_R_INVALID_KEYSPEC},
221+ #else
222+ {"INVALID_KEYSPEC", 58, 202},
223+ #endif
224 #ifdef CMP_R_INVALID_OPTION
225 {"INVALID_OPTION", ERR_LIB_CMP, CMP_R_INVALID_OPTION},
226 #else
227 {"INVALID_OPTION", 58, 174},
228 #endif
229+ #ifdef CMP_R_INVALID_ROOTCAKEYUPDATE
230+ {"INVALID_ROOTCAKEYUPDATE", ERR_LIB_CMP, CMP_R_INVALID_ROOTCAKEYUPDATE},
231+ #else
232+ {"INVALID_ROOTCAKEYUPDATE", 58, 195},
233+ #endif
234 #ifdef CMP_R_MISSING_CERTID
235 {"MISSING_CERTID", ERR_LIB_CMP, CMP_R_MISSING_CERTID},
236 #else
237@@ -1425,6 +1512,21 @@ static struct py_ssl_error_code error_codes[] = {
238 #else
239 {"TRANSFER_ERROR", 58, 159},
240 #endif
241+ #ifdef CMP_R_UNCLEAN_CTX
242+ {"UNCLEAN_CTX", ERR_LIB_CMP, CMP_R_UNCLEAN_CTX},
243+ #else
244+ {"UNCLEAN_CTX", 58, 191},
245+ #endif
246+ #ifdef CMP_R_UNEXPECTED_CERTPROFILE
247+ {"UNEXPECTED_CERTPROFILE", ERR_LIB_CMP, CMP_R_UNEXPECTED_CERTPROFILE},
248+ #else
249+ {"UNEXPECTED_CERTPROFILE", 58, 196},
250+ #endif
251+ #ifdef CMP_R_UNEXPECTED_CRLSTATUSLIST
252+ {"UNEXPECTED_CRLSTATUSLIST", ERR_LIB_CMP, CMP_R_UNEXPECTED_CRLSTATUSLIST},
253+ #else
254+ {"UNEXPECTED_CRLSTATUSLIST", 58, 201},
255+ #endif
256 #ifdef CMP_R_UNEXPECTED_PKIBODY
257 {"UNEXPECTED_PKIBODY", ERR_LIB_CMP, CMP_R_UNEXPECTED_PKIBODY},
258 #else
259@@ -1435,11 +1537,21 @@ static struct py_ssl_error_code error_codes[] = {
260 #else
261 {"UNEXPECTED_PKISTATUS", 58, 185},
262 #endif
263+ #ifdef CMP_R_UNEXPECTED_POLLREQ
264+ {"UNEXPECTED_POLLREQ", ERR_LIB_CMP, CMP_R_UNEXPECTED_POLLREQ},
265+ #else
266+ {"UNEXPECTED_POLLREQ", 58, 105},
267+ #endif
268 #ifdef CMP_R_UNEXPECTED_PVNO
269 {"UNEXPECTED_PVNO", ERR_LIB_CMP, CMP_R_UNEXPECTED_PVNO},
270 #else
271 {"UNEXPECTED_PVNO", 58, 153},
272 #endif
273+ #ifdef CMP_R_UNEXPECTED_SENDER
274+ {"UNEXPECTED_SENDER", ERR_LIB_CMP, CMP_R_UNEXPECTED_SENDER},
275+ #else
276+ {"UNEXPECTED_SENDER", 58, 106},
277+ #endif
278 #ifdef CMP_R_UNKNOWN_ALGORITHM_ID
279 {"UNKNOWN_ALGORITHM_ID", ERR_LIB_CMP, CMP_R_UNKNOWN_ALGORITHM_ID},
280 #else
281@@ -1450,6 +1562,11 @@ static struct py_ssl_error_code error_codes[] = {
282 #else
283 {"UNKNOWN_CERT_TYPE", 58, 135},
284 #endif
285+ #ifdef CMP_R_UNKNOWN_CRL_ISSUER
286+ {"UNKNOWN_CRL_ISSUER", ERR_LIB_CMP, CMP_R_UNKNOWN_CRL_ISSUER},
287+ #else
288+ {"UNKNOWN_CRL_ISSUER", 58, 200},
289+ #endif
290 #ifdef CMP_R_UNKNOWN_PKISTATUS
291 {"UNKNOWN_PKISTATUS", ERR_LIB_CMP, CMP_R_UNKNOWN_PKISTATUS},
292 #else
293@@ -1465,6 +1582,11 @@ static struct py_ssl_error_code error_codes[] = {
294 #else
295 {"UNSUPPORTED_KEY_TYPE", 58, 137},
296 #endif
297+ #ifdef CMP_R_UNSUPPORTED_PKIBODY
298+ {"UNSUPPORTED_PKIBODY", ERR_LIB_CMP, CMP_R_UNSUPPORTED_PKIBODY},
299+ #else
300+ {"UNSUPPORTED_PKIBODY", 58, 101},
301+ #endif
302 #ifdef CMP_R_UNSUPPORTED_PROTECTION_ALG_DHBASEDMAC
303 {"UNSUPPORTED_PROTECTION_ALG_DHBASEDMAC", ERR_LIB_CMP, CMP_R_UNSUPPORTED_PROTECTION_ALG_DHBASEDMAC},
304 #else
305@@ -1825,6 +1947,11 @@ static struct py_ssl_error_code error_codes[] = {
306 #else
307 {"NO_SIGNERS", 46, 135},
308 #endif
309+ #ifdef CMS_R_OPERATION_UNSUPPORTED
310+ {"OPERATION_UNSUPPORTED", ERR_LIB_CMS, CMS_R_OPERATION_UNSUPPORTED},
311+ #else
312+ {"OPERATION_UNSUPPORTED", 46, 182},
313+ #endif
314 #ifdef CMS_R_PEER_KEY_ERROR
315 {"PEER_KEY_ERROR", ERR_LIB_CMS, CMS_R_PEER_KEY_ERROR},
316 #else
317@@ -1960,6 +2087,11 @@ static struct py_ssl_error_code error_codes[] = {
318 #else
319 {"UNSUPPORTED_RECIPIENT_TYPE", 46, 154},
320 #endif
321+ #ifdef CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM
322+ {"UNSUPPORTED_SIGNATURE_ALGORITHM", ERR_LIB_CMS, CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM},
323+ #else
324+ {"UNSUPPORTED_SIGNATURE_ALGORITHM", 46, 195},
325+ #endif
326 #ifdef CMS_R_UNSUPPORTED_TYPE
327 {"UNSUPPORTED_TYPE", ERR_LIB_CMS, CMS_R_UNSUPPORTED_TYPE},
328 #else
329@@ -1985,6 +2117,31 @@ static struct py_ssl_error_code error_codes[] = {
330 #else
331 {"WRAP_ERROR", 46, 159},
332 #endif
333+ #ifdef COMP_R_BROTLI_DECODE_ERROR
334+ {"BROTLI_DECODE_ERROR", ERR_LIB_COMP, COMP_R_BROTLI_DECODE_ERROR},
335+ #else
336+ {"BROTLI_DECODE_ERROR", 41, 102},
337+ #endif
338+ #ifdef COMP_R_BROTLI_DEFLATE_ERROR
339+ {"BROTLI_DEFLATE_ERROR", ERR_LIB_COMP, COMP_R_BROTLI_DEFLATE_ERROR},
340+ #else
341+ {"BROTLI_DEFLATE_ERROR", 41, 103},
342+ #endif
343+ #ifdef COMP_R_BROTLI_ENCODE_ERROR
344+ {"BROTLI_ENCODE_ERROR", ERR_LIB_COMP, COMP_R_BROTLI_ENCODE_ERROR},
345+ #else
346+ {"BROTLI_ENCODE_ERROR", 41, 106},
347+ #endif
348+ #ifdef COMP_R_BROTLI_INFLATE_ERROR
349+ {"BROTLI_INFLATE_ERROR", ERR_LIB_COMP, COMP_R_BROTLI_INFLATE_ERROR},
350+ #else
351+ {"BROTLI_INFLATE_ERROR", 41, 104},
352+ #endif
353+ #ifdef COMP_R_BROTLI_NOT_SUPPORTED
354+ {"BROTLI_NOT_SUPPORTED", ERR_LIB_COMP, COMP_R_BROTLI_NOT_SUPPORTED},
355+ #else
356+ {"BROTLI_NOT_SUPPORTED", 41, 105},
357+ #endif
358 #ifdef COMP_R_ZLIB_DEFLATE_ERROR
359 {"ZLIB_DEFLATE_ERROR", ERR_LIB_COMP, COMP_R_ZLIB_DEFLATE_ERROR},
360 #else
361@@ -2000,6 +2157,26 @@ static struct py_ssl_error_code error_codes[] = {
362 #else
363 {"ZLIB_NOT_SUPPORTED", 41, 101},
364 #endif
365+ #ifdef COMP_R_ZSTD_COMPRESS_ERROR
366+ {"ZSTD_COMPRESS_ERROR", ERR_LIB_COMP, COMP_R_ZSTD_COMPRESS_ERROR},
367+ #else
368+ {"ZSTD_COMPRESS_ERROR", 41, 107},
369+ #endif
370+ #ifdef COMP_R_ZSTD_DECODE_ERROR
371+ {"ZSTD_DECODE_ERROR", ERR_LIB_COMP, COMP_R_ZSTD_DECODE_ERROR},
372+ #else
373+ {"ZSTD_DECODE_ERROR", 41, 108},
374+ #endif
375+ #ifdef COMP_R_ZSTD_DECOMPRESS_ERROR
376+ {"ZSTD_DECOMPRESS_ERROR", ERR_LIB_COMP, COMP_R_ZSTD_DECOMPRESS_ERROR},
377+ #else
378+ {"ZSTD_DECOMPRESS_ERROR", 41, 109},
379+ #endif
380+ #ifdef COMP_R_ZSTD_NOT_SUPPORTED
381+ {"ZSTD_NOT_SUPPORTED", ERR_LIB_COMP, COMP_R_ZSTD_NOT_SUPPORTED},
382+ #else
383+ {"ZSTD_NOT_SUPPORTED", 41, 110},
384+ #endif
385 #ifdef CONF_R_ERROR_LOADING_DSO
386 {"ERROR_LOADING_DSO", ERR_LIB_CONF, CONF_R_ERROR_LOADING_DSO},
387 #else
388@@ -2085,6 +2262,11 @@ static struct py_ssl_error_code error_codes[] = {
389 #else
390 {"RECURSIVE_DIRECTORY_INCLUDE", 14, 111},
391 #endif
392+ #ifdef CONF_R_RECURSIVE_SECTION_REFERENCE
393+ {"RECURSIVE_SECTION_REFERENCE", ERR_LIB_CONF, CONF_R_RECURSIVE_SECTION_REFERENCE},
394+ #else
395+ {"RECURSIVE_SECTION_REFERENCE", 14, 126},
396+ #endif
397 #ifdef CONF_R_RELATIVE_PATH
398 {"RELATIVE_PATH", ERR_LIB_CONF, CONF_R_RELATIVE_PATH},
399 #else
400@@ -2370,6 +2552,11 @@ static struct py_ssl_error_code error_codes[] = {
401 #else
402 {"TOO_MANY_BYTES", 15, 113},
403 #endif
404+ #ifdef CRYPTO_R_TOO_MANY_NAMES
405+ {"TOO_MANY_NAMES", ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_NAMES},
406+ #else
407+ {"TOO_MANY_NAMES", 15, 132},
408+ #endif
409 #ifdef CRYPTO_R_TOO_MANY_RECORDS
410 {"TOO_MANY_RECORDS", ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS},
411 #else
412@@ -2560,6 +2747,11 @@ static struct py_ssl_error_code error_codes[] = {
413 #else
414 {"INVALID_SECRET", 5, 128},
415 #endif
416+ #ifdef DH_R_INVALID_SIZE
417+ {"INVALID_SIZE", ERR_LIB_DH, DH_R_INVALID_SIZE},
418+ #else
419+ {"INVALID_SIZE", 5, 129},
420+ #endif
421 #ifdef DH_R_KDF_PARAMETER_ERROR
422 {"KDF_PARAMETER_ERROR", ERR_LIB_DH, DH_R_KDF_PARAMETER_ERROR},
423 #else
424@@ -2610,6 +2802,11 @@ static struct py_ssl_error_code error_codes[] = {
425 #else
426 {"PEER_KEY_ERROR", 5, 111},
427 #endif
428+ #ifdef DH_R_Q_TOO_LARGE
429+ {"Q_TOO_LARGE", ERR_LIB_DH, DH_R_Q_TOO_LARGE},
430+ #else
431+ {"Q_TOO_LARGE", 5, 130},
432+ #endif
433 #ifdef DH_R_SHARED_INFO_ERROR
434 {"SHARED_INFO_ERROR", ERR_LIB_DH, DH_R_SHARED_INFO_ERROR},
435 #else
436@@ -3545,6 +3742,11 @@ static struct py_ssl_error_code error_codes[] = {
437 #else
438 {"GENERATE_ERROR", 6, 214},
439 #endif
440+ #ifdef EVP_R_GETTING_ALGORITHMIDENTIFIER_NOT_SUPPORTED
441+ {"GETTING_ALGORITHMIDENTIFIER_NOT_SUPPORTED", ERR_LIB_EVP, EVP_R_GETTING_ALGORITHMIDENTIFIER_NOT_SUPPORTED},
442+ #else
443+ {"GETTING_ALGORITHMIDENTIFIER_NOT_SUPPORTED", 6, 229},
444+ #endif
445 #ifdef EVP_R_GET_RAW_KEY_FAILED
446 {"GET_RAW_KEY_FAILED", ERR_LIB_EVP, EVP_R_GET_RAW_KEY_FAILED},
447 #else
448@@ -3745,6 +3947,11 @@ static struct py_ssl_error_code error_codes[] = {
449 #else
450 {"OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE", 6, 150},
451 #endif
452+ #ifdef EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_SIGNATURE_TYPE
453+ {"OPERATION_NOT_SUPPORTED_FOR_THIS_SIGNATURE_TYPE", ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_SIGNATURE_TYPE},
454+ #else
455+ {"OPERATION_NOT_SUPPORTED_FOR_THIS_SIGNATURE_TYPE", 6, 226},
456+ #endif
457 #ifdef EVP_R_OUTPUT_WOULD_OVERFLOW
458 {"OUTPUT_WOULD_OVERFLOW", ERR_LIB_EVP, EVP_R_OUTPUT_WOULD_OVERFLOW},
459 #else
460@@ -3795,6 +4002,11 @@ static struct py_ssl_error_code error_codes[] = {
461 #else
462 {"SET_DEFAULT_PROPERTY_FAILURE", 6, 209},
463 #endif
464+ #ifdef EVP_R_SIGNATURE_TYPE_AND_KEY_TYPE_INCOMPATIBLE
465+ {"SIGNATURE_TYPE_AND_KEY_TYPE_INCOMPATIBLE", ERR_LIB_EVP, EVP_R_SIGNATURE_TYPE_AND_KEY_TYPE_INCOMPATIBLE},
466+ #else
467+ {"SIGNATURE_TYPE_AND_KEY_TYPE_INCOMPATIBLE", 6, 228},
468+ #endif
469 #ifdef EVP_R_TOO_MANY_RECORDS
470 {"TOO_MANY_RECORDS", ERR_LIB_EVP, EVP_R_TOO_MANY_RECORDS},
471 #else
472@@ -3825,6 +4037,11 @@ static struct py_ssl_error_code error_codes[] = {
473 #else
474 {"UNABLE_TO_SET_CALLBACKS", 6, 217},
475 #endif
476+ #ifdef EVP_R_UNKNOWN_BITS
477+ {"UNKNOWN_BITS", ERR_LIB_EVP, EVP_R_UNKNOWN_BITS},
478+ #else
479+ {"UNKNOWN_BITS", 6, 166},
480+ #endif
481 #ifdef EVP_R_UNKNOWN_CIPHER
482 {"UNKNOWN_CIPHER", ERR_LIB_EVP, EVP_R_UNKNOWN_CIPHER},
483 #else
484@@ -3840,6 +4057,11 @@ static struct py_ssl_error_code error_codes[] = {
485 #else
486 {"UNKNOWN_KEY_TYPE", 6, 207},
487 #endif
488+ #ifdef EVP_R_UNKNOWN_MAX_SIZE
489+ {"UNKNOWN_MAX_SIZE", ERR_LIB_EVP, EVP_R_UNKNOWN_MAX_SIZE},
490+ #else
491+ {"UNKNOWN_MAX_SIZE", 6, 167},
492+ #endif
493 #ifdef EVP_R_UNKNOWN_OPTION
494 {"UNKNOWN_OPTION", ERR_LIB_EVP, EVP_R_UNKNOWN_OPTION},
495 #else
496@@ -3850,6 +4072,11 @@ static struct py_ssl_error_code error_codes[] = {
497 #else
498 {"UNKNOWN_PBE_ALGORITHM", 6, 121},
499 #endif
500+ #ifdef EVP_R_UNKNOWN_SECURITY_BITS
501+ {"UNKNOWN_SECURITY_BITS", ERR_LIB_EVP, EVP_R_UNKNOWN_SECURITY_BITS},
502+ #else
503+ {"UNKNOWN_SECURITY_BITS", 6, 168},
504+ #endif
505 #ifdef EVP_R_UNSUPPORTED_ALGORITHM
506 {"UNSUPPORTED_ALGORITHM", ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM},
507 #else
508@@ -4040,6 +4267,11 @@ static struct py_ssl_error_code error_codes[] = {
509 #else
510 {"RESPONSE_PARSE_ERROR", 61, 104},
511 #endif
512+ #ifdef HTTP_R_RESPONSE_TOO_MANY_HDRLINES
513+ {"RESPONSE_TOO_MANY_HDRLINES", ERR_LIB_HTTP, HTTP_R_RESPONSE_TOO_MANY_HDRLINES},
514+ #else
515+ {"RESPONSE_TOO_MANY_HDRLINES", 61, 130},
516+ #endif
517 #ifdef HTTP_R_RETRY_TIMEOUT
518 {"RETRY_TIMEOUT", ERR_LIB_HTTP, HTTP_R_RETRY_TIMEOUT},
519 #else
520@@ -4530,6 +4762,11 @@ static struct py_ssl_error_code error_codes[] = {
521 #else
522 {"UNSUPPORTED_PUBLIC_KEY_TYPE", 9, 110},
523 #endif
524+ #ifdef PKCS12_R_CALLBACK_FAILED
525+ {"CALLBACK_FAILED", ERR_LIB_PKCS12, PKCS12_R_CALLBACK_FAILED},
526+ #else
527+ {"CALLBACK_FAILED", 35, 115},
528+ #endif
529 #ifdef PKCS12_R_CANT_PACK_STRUCTURE
530 {"CANT_PACK_STRUCTURE", ERR_LIB_PKCS12, PKCS12_R_CANT_PACK_STRUCTURE},
531 #else
532@@ -4920,6 +5157,11 @@ static struct py_ssl_error_code error_codes[] = {
533 #else
534 {"CIPHER_OPERATION_FAILED", 57, 102},
535 #endif
536+ #ifdef PROV_R_COFACTOR_REQUIRED
537+ {"COFACTOR_REQUIRED", ERR_LIB_PROV, PROV_R_COFACTOR_REQUIRED},
538+ #else
539+ {"COFACTOR_REQUIRED", 57, 236},
540+ #endif
541 #ifdef PROV_R_DERIVATION_FUNCTION_INIT_FAILED
542 {"DERIVATION_FUNCTION_INIT_FAILED", ERR_LIB_PROV, PROV_R_DERIVATION_FUNCTION_INIT_FAILED},
543 #else
544@@ -4935,6 +5177,11 @@ static struct py_ssl_error_code error_codes[] = {
545 #else
546 {"EMS_NOT_ENABLED", 57, 233},
547 #endif
548+ #ifdef PROV_R_ENTROPY_SOURCE_FAILED_CONTINUOUS_TESTS
549+ {"ENTROPY_SOURCE_FAILED_CONTINUOUS_TESTS", ERR_LIB_PROV, PROV_R_ENTROPY_SOURCE_FAILED_CONTINUOUS_TESTS},
550+ #else
551+ {"ENTROPY_SOURCE_FAILED_CONTINUOUS_TESTS", 57, 244},
552+ #endif
553 #ifdef PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK
554 {"ENTROPY_SOURCE_STRENGTH_TOO_WEAK", ERR_LIB_PROV, PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK},
555 #else
556@@ -4990,6 +5237,11 @@ static struct py_ssl_error_code error_codes[] = {
557 #else
558 {"FAILED_TO_SIGN", 57, 175},
559 #endif
560+ #ifdef PROV_R_FINAL_CALL_OUT_OF_ORDER
561+ {"FINAL_CALL_OUT_OF_ORDER", ERR_LIB_PROV, PROV_R_FINAL_CALL_OUT_OF_ORDER},
562+ #else
563+ {"FINAL_CALL_OUT_OF_ORDER", 57, 237},
564+ #endif
565 #ifdef PROV_R_FIPS_MODULE_CONDITIONAL_ERROR
566 {"FIPS_MODULE_CONDITIONAL_ERROR", ERR_LIB_PROV, PROV_R_FIPS_MODULE_CONDITIONAL_ERROR},
567 #else
568@@ -5020,6 +5272,11 @@ static struct py_ssl_error_code error_codes[] = {
569 #else
570 {"INDICATOR_INTEGRITY_FAILURE", 57, 210},
571 #endif
572+ #ifdef PROV_R_INIT_CALL_OUT_OF_ORDER
573+ {"INIT_CALL_OUT_OF_ORDER", ERR_LIB_PROV, PROV_R_INIT_CALL_OUT_OF_ORDER},
574+ #else
575+ {"INIT_CALL_OUT_OF_ORDER", 57, 238},
576+ #endif
577 #ifdef PROV_R_INSUFFICIENT_DRBG_STRENGTH
578 {"INSUFFICIENT_DRBG_STRENGTH", ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH},
579 #else
580@@ -5030,6 +5287,11 @@ static struct py_ssl_error_code error_codes[] = {
581 #else
582 {"INVALID_AAD", 57, 108},
583 #endif
584+ #ifdef PROV_R_INVALID_AEAD
585+ {"INVALID_AEAD", ERR_LIB_PROV, PROV_R_INVALID_AEAD},
586+ #else
587+ {"INVALID_AEAD", 57, 231},
588+ #endif
589 #ifdef PROV_R_INVALID_CONFIG_DATA
590 {"INVALID_CONFIG_DATA", ERR_LIB_PROV, PROV_R_INVALID_CONFIG_DATA},
591 #else
592@@ -5070,6 +5332,11 @@ static struct py_ssl_error_code error_codes[] = {
593 #else
594 {"INVALID_DIGEST_SIZE", 57, 218},
595 #endif
596+ #ifdef PROV_R_INVALID_EDDSA_INSTANCE_FOR_ATTEMPTED_OPERATION
597+ {"INVALID_EDDSA_INSTANCE_FOR_ATTEMPTED_OPERATION", ERR_LIB_PROV, PROV_R_INVALID_EDDSA_INSTANCE_FOR_ATTEMPTED_OPERATION},
598+ #else
599+ {"INVALID_EDDSA_INSTANCE_FOR_ATTEMPTED_OPERATION", 57, 243},
600+ #endif
601 #ifdef PROV_R_INVALID_INPUT_LENGTH
602 {"INVALID_INPUT_LENGTH", ERR_LIB_PROV, PROV_R_INVALID_INPUT_LENGTH},
603 #else
604@@ -5085,6 +5352,11 @@ static struct py_ssl_error_code error_codes[] = {
605 #else
606 {"INVALID_IV_LENGTH", 57, 109},
607 #endif
608+ #ifdef PROV_R_INVALID_KDF
609+ {"INVALID_KDF", ERR_LIB_PROV, PROV_R_INVALID_KDF},
610+ #else
611+ {"INVALID_KDF", 57, 232},
612+ #endif
613 #ifdef PROV_R_INVALID_KEY
614 {"INVALID_KEY", ERR_LIB_PROV, PROV_R_INVALID_KEY},
615 #else
616@@ -5100,6 +5372,11 @@ static struct py_ssl_error_code error_codes[] = {
617 #else
618 {"INVALID_MAC", 57, 151},
619 #endif
620+ #ifdef PROV_R_INVALID_MEMORY_SIZE
621+ {"INVALID_MEMORY_SIZE", ERR_LIB_PROV, PROV_R_INVALID_MEMORY_SIZE},
622+ #else
623+ {"INVALID_MEMORY_SIZE", 57, 235},
624+ #endif
625 #ifdef PROV_R_INVALID_MGF1_MD
626 {"INVALID_MGF1_MD", ERR_LIB_PROV, PROV_R_INVALID_MGF1_MD},
627 #else
628@@ -5120,6 +5397,11 @@ static struct py_ssl_error_code error_codes[] = {
629 #else
630 {"INVALID_PADDING_MODE", 57, 168},
631 #endif
632+ #ifdef PROV_R_INVALID_PREHASHED_DIGEST_LENGTH
633+ {"INVALID_PREHASHED_DIGEST_LENGTH", ERR_LIB_PROV, PROV_R_INVALID_PREHASHED_DIGEST_LENGTH},
634+ #else
635+ {"INVALID_PREHASHED_DIGEST_LENGTH", 57, 241},
636+ #endif
637 #ifdef PROV_R_INVALID_PUBINFO
638 {"INVALID_PUBINFO", ERR_LIB_PROV, PROV_R_INVALID_PUBINFO},
639 #else
640@@ -5155,6 +5437,11 @@ static struct py_ssl_error_code error_codes[] = {
641 #else
642 {"INVALID_TAG_LENGTH", 57, 118},
643 #endif
644+ #ifdef PROV_R_INVALID_THREAD_POOL_SIZE
645+ {"INVALID_THREAD_POOL_SIZE", ERR_LIB_PROV, PROV_R_INVALID_THREAD_POOL_SIZE},
646+ #else
647+ {"INVALID_THREAD_POOL_SIZE", 57, 234},
648+ #endif
649 #ifdef PROV_R_INVALID_UKM_LENGTH
650 {"INVALID_UKM_LENGTH", ERR_LIB_PROV, PROV_R_INVALID_UKM_LENGTH},
651 #else
652@@ -5300,6 +5587,11 @@ static struct py_ssl_error_code error_codes[] = {
653 #else
654 {"NOT_XOF_OR_INVALID_LENGTH", 57, 113},
655 #endif
656+ #ifdef PROV_R_NO_INSTANCE_ALLOWED
657+ {"NO_INSTANCE_ALLOWED", ERR_LIB_PROV, PROV_R_NO_INSTANCE_ALLOWED},
658+ #else
659+ {"NO_INSTANCE_ALLOWED", 57, 242},
660+ #endif
661 #ifdef PROV_R_NO_KEY_SET
662 {"NO_KEY_SET", ERR_LIB_PROV, PROV_R_NO_KEY_SET},
663 #else
664@@ -5310,6 +5602,11 @@ static struct py_ssl_error_code error_codes[] = {
665 #else
666 {"NO_PARAMETERS_SET", 57, 177},
667 #endif
668+ #ifdef PROV_R_ONESHOT_CALL_OUT_OF_ORDER
669+ {"ONESHOT_CALL_OUT_OF_ORDER", ERR_LIB_PROV, PROV_R_ONESHOT_CALL_OUT_OF_ORDER},
670+ #else
671+ {"ONESHOT_CALL_OUT_OF_ORDER", 57, 239},
672+ #endif
673 #ifdef PROV_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE
674 {"OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE", ERR_LIB_PROV, PROV_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE},
675 #else
676@@ -5460,6 +5757,11 @@ static struct py_ssl_error_code error_codes[] = {
677 #else
678 {"UNSUPPORTED_NUMBER_OF_ROUNDS", 57, 152},
679 #endif
680+ #ifdef PROV_R_UPDATE_CALL_OUT_OF_ORDER
681+ {"UPDATE_CALL_OUT_OF_ORDER", ERR_LIB_PROV, PROV_R_UPDATE_CALL_OUT_OF_ORDER},
682+ #else
683+ {"UPDATE_CALL_OUT_OF_ORDER", 57, 240},
684+ #endif
685 #ifdef PROV_R_URI_AUTHORITY_UNSUPPORTED
686 {"URI_AUTHORITY_UNSUPPORTED", ERR_LIB_PROV, PROV_R_URI_AUTHORITY_UNSUPPORTED},
687 #else
688@@ -5595,6 +5897,11 @@ static struct py_ssl_error_code error_codes[] = {
689 #else
690 {"INTERNAL_ERROR", 36, 113},
691 #endif
692+ #ifdef RAND_R_INVALID_PROPERTY_QUERY
693+ {"INVALID_PROPERTY_QUERY", ERR_LIB_RAND, RAND_R_INVALID_PROPERTY_QUERY},
694+ #else
695+ {"INVALID_PROPERTY_QUERY", 36, 137},
696+ #endif
697 #ifdef RAND_R_IN_ERROR_STATE
698 {"IN_ERROR_STATE", ERR_LIB_RAND, RAND_R_IN_ERROR_STATE},
699 #else
700@@ -6210,6 +6517,11 @@ static struct py_ssl_error_code error_codes[] = {
701 #else
702 {"AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE", 20, 158},
703 #endif
704+ #ifdef SSL_R_BAD_CERTIFICATE
705+ {"BAD_CERTIFICATE", ERR_LIB_SSL, SSL_R_BAD_CERTIFICATE},
706+ #else
707+ {"BAD_CERTIFICATE", 20, 348},
708+ #endif
709 #ifdef SSL_R_BAD_CHANGE_CIPHER_SPEC
710 {"BAD_CHANGE_CIPHER_SPEC", ERR_LIB_SSL, SSL_R_BAD_CHANGE_CIPHER_SPEC},
711 #else
712@@ -6220,6 +6532,11 @@ static struct py_ssl_error_code error_codes[] = {
713 #else
714 {"BAD_CIPHER", 20, 186},
715 #endif
716+ #ifdef SSL_R_BAD_COMPRESSION_ALGORITHM
717+ {"BAD_COMPRESSION_ALGORITHM", ERR_LIB_SSL, SSL_R_BAD_COMPRESSION_ALGORITHM},
718+ #else
719+ {"BAD_COMPRESSION_ALGORITHM", 20, 326},
720+ #endif
721 #ifdef SSL_R_BAD_DATA
722 {"BAD_DATA", ERR_LIB_SSL, SSL_R_BAD_DATA},
723 #else
724@@ -6495,6 +6812,11 @@ static struct py_ssl_error_code error_codes[] = {
725 #else
726 {"CONNECTION_TYPE_NOT_SET", 20, 144},
727 #endif
728+ #ifdef SSL_R_CONN_USE_ONLY
729+ {"CONN_USE_ONLY", ERR_LIB_SSL, SSL_R_CONN_USE_ONLY},
730+ #else
731+ {"CONN_USE_ONLY", 20, 356},
732+ #endif
733 #ifdef SSL_R_CONTEXT_NOT_DANE_ENABLED
734 {"CONTEXT_NOT_DANE_ENABLED", ERR_LIB_SSL, SSL_R_CONTEXT_NOT_DANE_ENABLED},
735 #else
736@@ -6635,6 +6957,11 @@ static struct py_ssl_error_code error_codes[] = {
737 #else
738 {"EE_KEY_TOO_SMALL", 20, 399},
739 #endif
740+ #ifdef SSL_R_EMPTY_RAW_PUBLIC_KEY
741+ {"EMPTY_RAW_PUBLIC_KEY", ERR_LIB_SSL, SSL_R_EMPTY_RAW_PUBLIC_KEY},
742+ #else
743+ {"EMPTY_RAW_PUBLIC_KEY", 20, 349},
744+ #endif
745 #ifdef SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST
746 {"EMPTY_SRTP_PROTECTION_PROFILE_LIST", ERR_LIB_SSL, SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST},
747 #else
748@@ -6650,6 +6977,11 @@ static struct py_ssl_error_code error_codes[] = {
749 #else
750 {"ERROR_IN_RECEIVED_CIPHER_LIST", 20, 151},
751 #endif
752+ #ifdef SSL_R_ERROR_IN_SYSTEM_DEFAULT_CONFIG
753+ {"ERROR_IN_SYSTEM_DEFAULT_CONFIG", ERR_LIB_SSL, SSL_R_ERROR_IN_SYSTEM_DEFAULT_CONFIG},
754+ #else
755+ {"ERROR_IN_SYSTEM_DEFAULT_CONFIG", 20, 419},
756+ #endif
757 #ifdef SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN
758 {"ERROR_SETTING_TLSA_BASE_DOMAIN", ERR_LIB_SSL, SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN},
759 #else
760@@ -6680,11 +7012,26 @@ static struct py_ssl_error_code error_codes[] = {
761 #else
762 {"EXT_LENGTH_MISMATCH", 20, 163},
763 #endif
764+ #ifdef SSL_R_FAILED_TO_GET_PARAMETER
765+ {"FAILED_TO_GET_PARAMETER", ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER},
766+ #else
767+ {"FAILED_TO_GET_PARAMETER", 20, 316},
768+ #endif
769 #ifdef SSL_R_FAILED_TO_INIT_ASYNC
770 {"FAILED_TO_INIT_ASYNC", ERR_LIB_SSL, SSL_R_FAILED_TO_INIT_ASYNC},
771 #else
772 {"FAILED_TO_INIT_ASYNC", 20, 405},
773 #endif
774+ #ifdef SSL_R_FEATURE_NEGOTIATION_NOT_COMPLETE
775+ {"FEATURE_NEGOTIATION_NOT_COMPLETE", ERR_LIB_SSL, SSL_R_FEATURE_NEGOTIATION_NOT_COMPLETE},
776+ #else
777+ {"FEATURE_NEGOTIATION_NOT_COMPLETE", 20, 417},
778+ #endif
779+ #ifdef SSL_R_FEATURE_NOT_RENEGOTIABLE
780+ {"FEATURE_NOT_RENEGOTIABLE", ERR_LIB_SSL, SSL_R_FEATURE_NOT_RENEGOTIABLE},
781+ #else
782+ {"FEATURE_NOT_RENEGOTIABLE", 20, 413},
783+ #endif
784 #ifdef SSL_R_FRAGMENTED_CLIENT_HELLO
785 {"FRAGMENTED_CLIENT_HELLO", ERR_LIB_SSL, SSL_R_FRAGMENTED_CLIENT_HELLO},
786 #else
787@@ -6805,6 +7152,16 @@ static struct py_ssl_error_code error_codes[] = {
788 #else
789 {"INVALID_NULL_CMD_NAME", 20, 385},
790 #endif
791+ #ifdef SSL_R_INVALID_RAW_PUBLIC_KEY
792+ {"INVALID_RAW_PUBLIC_KEY", ERR_LIB_SSL, SSL_R_INVALID_RAW_PUBLIC_KEY},
793+ #else
794+ {"INVALID_RAW_PUBLIC_KEY", 20, 350},
795+ #endif
796+ #ifdef SSL_R_INVALID_RECORD
797+ {"INVALID_RECORD", ERR_LIB_SSL, SSL_R_INVALID_RECORD},
798+ #else
799+ {"INVALID_RECORD", 20, 317},
800+ #endif
801 #ifdef SSL_R_INVALID_SEQUENCE_NUMBER
802 {"INVALID_SEQUENCE_NUMBER", ERR_LIB_SSL, SSL_R_INVALID_SEQUENCE_NUMBER},
803 #else
804@@ -6865,6 +7222,11 @@ static struct py_ssl_error_code error_codes[] = {
805 #else
806 {"LIBRARY_HAS_NO_CIPHERS", 20, 161},
807 #endif
808+ #ifdef SSL_R_MAXIMUM_ENCRYPTED_PKTS_REACHED
809+ {"MAXIMUM_ENCRYPTED_PKTS_REACHED", ERR_LIB_SSL, SSL_R_MAXIMUM_ENCRYPTED_PKTS_REACHED},
810+ #else
811+ {"MAXIMUM_ENCRYPTED_PKTS_REACHED", 20, 395},
812+ #endif
813 #ifdef SSL_R_MISSING_DSA_SIGNING_CERT
814 {"MISSING_DSA_SIGNING_CERT", ERR_LIB_SSL, SSL_R_MISSING_DSA_SIGNING_CERT},
815 #else
816@@ -6925,6 +7287,11 @@ static struct py_ssl_error_code error_codes[] = {
817 #else
818 {"MISSING_SUPPORTED_GROUPS_EXTENSION", 20, 209},
819 #endif
820+ #ifdef SSL_R_MISSING_SUPPORTED_VERSIONS_EXTENSION
821+ {"MISSING_SUPPORTED_VERSIONS_EXTENSION", ERR_LIB_SSL, SSL_R_MISSING_SUPPORTED_VERSIONS_EXTENSION},
822+ #else
823+ {"MISSING_SUPPORTED_VERSIONS_EXTENSION", 20, 420},
824+ #endif
825 #ifdef SSL_R_MISSING_TMP_DH_KEY
826 {"MISSING_TMP_DH_KEY", ERR_LIB_SSL, SSL_R_MISSING_TMP_DH_KEY},
827 #else
828@@ -7065,6 +7432,11 @@ static struct py_ssl_error_code error_codes[] = {
829 #else
830 {"NO_SRTP_PROFILES", 20, 359},
831 #endif
832+ #ifdef SSL_R_NO_STREAM
833+ {"NO_STREAM", ERR_LIB_SSL, SSL_R_NO_STREAM},
834+ #else
835+ {"NO_STREAM", 20, 355},
836+ #endif
837 #ifdef SSL_R_NO_SUITABLE_DIGEST_ALGORITHM
838 {"NO_SUITABLE_DIGEST_ALGORITHM", ERR_LIB_SSL, SSL_R_NO_SUITABLE_DIGEST_ALGORITHM},
839 #else
840@@ -7080,6 +7452,11 @@ static struct py_ssl_error_code error_codes[] = {
841 #else
842 {"NO_SUITABLE_KEY_SHARE", 20, 101},
843 #endif
844+ #ifdef SSL_R_NO_SUITABLE_RECORD_LAYER
845+ {"NO_SUITABLE_RECORD_LAYER", ERR_LIB_SSL, SSL_R_NO_SUITABLE_RECORD_LAYER},
846+ #else
847+ {"NO_SUITABLE_RECORD_LAYER", 20, 322},
848+ #endif
849 #ifdef SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM
850 {"NO_SUITABLE_SIGNATURE_ALGORITHM", ERR_LIB_SSL, SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM},
851 #else
852@@ -7160,6 +7537,11 @@ static struct py_ssl_error_code error_codes[] = {
853 #else
854 {"PIPELINE_FAILURE", 20, 406},
855 #endif
856+ #ifdef SSL_R_POLL_REQUEST_NOT_SUPPORTED
857+ {"POLL_REQUEST_NOT_SUPPORTED", ERR_LIB_SSL, SSL_R_POLL_REQUEST_NOT_SUPPORTED},
858+ #else
859+ {"POLL_REQUEST_NOT_SUPPORTED", 20, 418},
860+ #endif
861 #ifdef SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR
862 {"POST_HANDSHAKE_AUTH_ENCODING_ERR", ERR_LIB_SSL, SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR},
863 #else
864@@ -7190,6 +7572,21 @@ static struct py_ssl_error_code error_codes[] = {
865 #else
866 {"PSK_NO_SERVER_CB", 20, 225},
867 #endif
868+ #ifdef SSL_R_QUIC_HANDSHAKE_LAYER_ERROR
869+ {"QUIC_HANDSHAKE_LAYER_ERROR", ERR_LIB_SSL, SSL_R_QUIC_HANDSHAKE_LAYER_ERROR},
870+ #else
871+ {"QUIC_HANDSHAKE_LAYER_ERROR", 20, 393},
872+ #endif
873+ #ifdef SSL_R_QUIC_NETWORK_ERROR
874+ {"QUIC_NETWORK_ERROR", ERR_LIB_SSL, SSL_R_QUIC_NETWORK_ERROR},
875+ #else
876+ {"QUIC_NETWORK_ERROR", 20, 387},
877+ #endif
878+ #ifdef SSL_R_QUIC_PROTOCOL_ERROR
879+ {"QUIC_PROTOCOL_ERROR", ERR_LIB_SSL, SSL_R_QUIC_PROTOCOL_ERROR},
880+ #else
881+ {"QUIC_PROTOCOL_ERROR", 20, 382},
882+ #endif
883 #ifdef SSL_R_READ_BIO_NOT_SET
884 {"READ_BIO_NOT_SET", ERR_LIB_SSL, SSL_R_READ_BIO_NOT_SET},
885 #else
886@@ -7200,6 +7597,16 @@ static struct py_ssl_error_code error_codes[] = {
887 #else
888 {"READ_TIMEOUT_EXPIRED", 20, 312},
889 #endif
890+ #ifdef SSL_R_RECORDS_NOT_RELEASED
891+ {"RECORDS_NOT_RELEASED", ERR_LIB_SSL, SSL_R_RECORDS_NOT_RELEASED},
892+ #else
893+ {"RECORDS_NOT_RELEASED", 20, 321},
894+ #endif
895+ #ifdef SSL_R_RECORD_LAYER_FAILURE
896+ {"RECORD_LAYER_FAILURE", ERR_LIB_SSL, SSL_R_RECORD_LAYER_FAILURE},
897+ #else
898+ {"RECORD_LAYER_FAILURE", 20, 313},
899+ #endif
900 #ifdef SSL_R_RECORD_LENGTH_MISMATCH
901 {"RECORD_LENGTH_MISMATCH", ERR_LIB_SSL, SSL_R_RECORD_LENGTH_MISMATCH},
902 #else
903@@ -7210,6 +7617,11 @@ static struct py_ssl_error_code error_codes[] = {
904 #else
905 {"RECORD_TOO_SMALL", 20, 298},
906 #endif
907+ #ifdef SSL_R_REMOTE_PEER_ADDRESS_NOT_SET
908+ {"REMOTE_PEER_ADDRESS_NOT_SET", ERR_LIB_SSL, SSL_R_REMOTE_PEER_ADDRESS_NOT_SET},
909+ #else
910+ {"REMOTE_PEER_ADDRESS_NOT_SET", 20, 346},
911+ #endif
912 #ifdef SSL_R_RENEGOTIATE_EXT_TOO_LONG
913 {"RENEGOTIATE_EXT_TOO_LONG", ERR_LIB_SSL, SSL_R_RENEGOTIATE_EXT_TOO_LONG},
914 #else
915@@ -7255,6 +7667,11 @@ static struct py_ssl_error_code error_codes[] = {
916 #else
917 {"SCT_VERIFICATION_FAILED", 20, 208},
918 #endif
919+ #ifdef SSL_R_SEQUENCE_CTR_WRAPPED
920+ {"SEQUENCE_CTR_WRAPPED", ERR_LIB_SSL, SSL_R_SEQUENCE_CTR_WRAPPED},
921+ #else
922+ {"SEQUENCE_CTR_WRAPPED", 20, 327},
923+ #endif
924 #ifdef SSL_R_SERVERHELLO_TLSEXT
925 {"SERVERHELLO_TLSEXT", ERR_LIB_SSL, SSL_R_SERVERHELLO_TLSEXT},
926 #else
927@@ -7325,6 +7742,16 @@ static struct py_ssl_error_code error_codes[] = {
928 #else
929 {"SSLV3_ALERT_BAD_CERTIFICATE", 20, 1042},
930 #endif
931+ #ifdef SSL_R_SSLV3_ALERT_BAD_CERTIFICATE
932+ {"SSLV3_ALERT_BAD_CERTIFICATE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_BAD_CERTIFICATE},
933+ #else
934+ {"SSLV3_ALERT_BAD_CERTIFICATE", 20, 1042},
935+ #endif
936+ #ifdef SSL_R_SSLV3_ALERT_BAD_RECORD_MAC
937+ {"SSLV3_ALERT_BAD_RECORD_MAC", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_BAD_RECORD_MAC},
938+ #else
939+ {"SSLV3_ALERT_BAD_RECORD_MAC", 20, 1020},
940+ #endif
941 #ifdef SSL_R_SSLV3_ALERT_BAD_RECORD_MAC
942 {"SSLV3_ALERT_BAD_RECORD_MAC", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_BAD_RECORD_MAC},
943 #else
944@@ -7335,11 +7762,26 @@ static struct py_ssl_error_code error_codes[] = {
945 #else
946 {"SSLV3_ALERT_CERTIFICATE_EXPIRED", 20, 1045},
947 #endif
948+ #ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
949+ {"SSLV3_ALERT_CERTIFICATE_EXPIRED", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED},
950+ #else
951+ {"SSLV3_ALERT_CERTIFICATE_EXPIRED", 20, 1045},
952+ #endif
953 #ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED
954 {"SSLV3_ALERT_CERTIFICATE_REVOKED", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED},
955 #else
956 {"SSLV3_ALERT_CERTIFICATE_REVOKED", 20, 1044},
957 #endif
958+ #ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED
959+ {"SSLV3_ALERT_CERTIFICATE_REVOKED", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED},
960+ #else
961+ {"SSLV3_ALERT_CERTIFICATE_REVOKED", 20, 1044},
962+ #endif
963+ #ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN
964+ {"SSLV3_ALERT_CERTIFICATE_UNKNOWN", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN},
965+ #else
966+ {"SSLV3_ALERT_CERTIFICATE_UNKNOWN", 20, 1046},
967+ #endif
968 #ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN
969 {"SSLV3_ALERT_CERTIFICATE_UNKNOWN", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN},
970 #else
971@@ -7350,6 +7792,16 @@ static struct py_ssl_error_code error_codes[] = {
972 #else
973 {"SSLV3_ALERT_DECOMPRESSION_FAILURE", 20, 1030},
974 #endif
975+ #ifdef SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE
976+ {"SSLV3_ALERT_DECOMPRESSION_FAILURE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE},
977+ #else
978+ {"SSLV3_ALERT_DECOMPRESSION_FAILURE", 20, 1030},
979+ #endif
980+ #ifdef SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE
981+ {"SSLV3_ALERT_HANDSHAKE_FAILURE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE},
982+ #else
983+ {"SSLV3_ALERT_HANDSHAKE_FAILURE", 20, 1040},
984+ #endif
985 #ifdef SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE
986 {"SSLV3_ALERT_HANDSHAKE_FAILURE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE},
987 #else
988@@ -7360,11 +7812,26 @@ static struct py_ssl_error_code error_codes[] = {
989 #else
990 {"SSLV3_ALERT_ILLEGAL_PARAMETER", 20, 1047},
991 #endif
992+ #ifdef SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER
993+ {"SSLV3_ALERT_ILLEGAL_PARAMETER", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER},
994+ #else
995+ {"SSLV3_ALERT_ILLEGAL_PARAMETER", 20, 1047},
996+ #endif
997 #ifdef SSL_R_SSLV3_ALERT_NO_CERTIFICATE
998 {"SSLV3_ALERT_NO_CERTIFICATE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_NO_CERTIFICATE},
999 #else
1000 {"SSLV3_ALERT_NO_CERTIFICATE", 20, 1041},
1001 #endif
1002+ #ifdef SSL_R_SSLV3_ALERT_NO_CERTIFICATE
1003+ {"SSLV3_ALERT_NO_CERTIFICATE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_NO_CERTIFICATE},
1004+ #else
1005+ {"SSLV3_ALERT_NO_CERTIFICATE", 20, 1041},
1006+ #endif
1007+ #ifdef SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE
1008+ {"SSLV3_ALERT_UNEXPECTED_MESSAGE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE},
1009+ #else
1010+ {"SSLV3_ALERT_UNEXPECTED_MESSAGE", 20, 1010},
1011+ #endif
1012 #ifdef SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE
1013 {"SSLV3_ALERT_UNEXPECTED_MESSAGE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE},
1014 #else
1015@@ -7375,6 +7842,11 @@ static struct py_ssl_error_code error_codes[] = {
1016 #else
1017 {"SSLV3_ALERT_UNSUPPORTED_CERTIFICATE", 20, 1043},
1018 #endif
1019+ #ifdef SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE
1020+ {"SSLV3_ALERT_UNSUPPORTED_CERTIFICATE", ERR_LIB_SSL, SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE},
1021+ #else
1022+ {"SSLV3_ALERT_UNSUPPORTED_CERTIFICATE", 20, 1043},
1023+ #endif
1024 #ifdef SSL_R_SSL_COMMAND_SECTION_EMPTY
1025 {"SSL_COMMAND_SECTION_EMPTY", ERR_LIB_SSL, SSL_R_SSL_COMMAND_SECTION_EMPTY},
1026 #else
1027@@ -7450,6 +7922,36 @@ static struct py_ssl_error_code error_codes[] = {
1028 #else
1029 {"STILL_IN_INIT", 20, 121},
1030 #endif
1031+ #ifdef SSL_R_STREAM_COUNT_LIMITED
1032+ {"STREAM_COUNT_LIMITED", ERR_LIB_SSL, SSL_R_STREAM_COUNT_LIMITED},
1033+ #else
1034+ {"STREAM_COUNT_LIMITED", 20, 411},
1035+ #endif
1036+ #ifdef SSL_R_STREAM_FINISHED
1037+ {"STREAM_FINISHED", ERR_LIB_SSL, SSL_R_STREAM_FINISHED},
1038+ #else
1039+ {"STREAM_FINISHED", 20, 365},
1040+ #endif
1041+ #ifdef SSL_R_STREAM_RECV_ONLY
1042+ {"STREAM_RECV_ONLY", ERR_LIB_SSL, SSL_R_STREAM_RECV_ONLY},
1043+ #else
1044+ {"STREAM_RECV_ONLY", 20, 366},
1045+ #endif
1046+ #ifdef SSL_R_STREAM_RESET
1047+ {"STREAM_RESET", ERR_LIB_SSL, SSL_R_STREAM_RESET},
1048+ #else
1049+ {"STREAM_RESET", 20, 375},
1050+ #endif
1051+ #ifdef SSL_R_STREAM_SEND_ONLY
1052+ {"STREAM_SEND_ONLY", ERR_LIB_SSL, SSL_R_STREAM_SEND_ONLY},
1053+ #else
1054+ {"STREAM_SEND_ONLY", 20, 379},
1055+ #endif
1056+ #ifdef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
1057+ {"TLSV13_ALERT_CERTIFICATE_REQUIRED", ERR_LIB_SSL, SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED},
1058+ #else
1059+ {"TLSV13_ALERT_CERTIFICATE_REQUIRED", 20, 1116},
1060+ #endif
1061 #ifdef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
1062 {"TLSV13_ALERT_CERTIFICATE_REQUIRED", ERR_LIB_SSL, SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED},
1063 #else
1064@@ -7460,6 +7962,16 @@ static struct py_ssl_error_code error_codes[] = {
1065 #else
1066 {"TLSV13_ALERT_MISSING_EXTENSION", 20, 1109},
1067 #endif
1068+ #ifdef SSL_R_TLSV13_ALERT_MISSING_EXTENSION
1069+ {"TLSV13_ALERT_MISSING_EXTENSION", ERR_LIB_SSL, SSL_R_TLSV13_ALERT_MISSING_EXTENSION},
1070+ #else
1071+ {"TLSV13_ALERT_MISSING_EXTENSION", 20, 1109},
1072+ #endif
1073+ #ifdef SSL_R_TLSV1_ALERT_ACCESS_DENIED
1074+ {"TLSV1_ALERT_ACCESS_DENIED", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_ACCESS_DENIED},
1075+ #else
1076+ {"TLSV1_ALERT_ACCESS_DENIED", 20, 1049},
1077+ #endif
1078 #ifdef SSL_R_TLSV1_ALERT_ACCESS_DENIED
1079 {"TLSV1_ALERT_ACCESS_DENIED", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_ACCESS_DENIED},
1080 #else
1081@@ -7470,6 +7982,16 @@ static struct py_ssl_error_code error_codes[] = {
1082 #else
1083 {"TLSV1_ALERT_DECODE_ERROR", 20, 1050},
1084 #endif
1085+ #ifdef SSL_R_TLSV1_ALERT_DECODE_ERROR
1086+ {"TLSV1_ALERT_DECODE_ERROR", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_DECODE_ERROR},
1087+ #else
1088+ {"TLSV1_ALERT_DECODE_ERROR", 20, 1050},
1089+ #endif
1090+ #ifdef SSL_R_TLSV1_ALERT_DECRYPTION_FAILED
1091+ {"TLSV1_ALERT_DECRYPTION_FAILED", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_DECRYPTION_FAILED},
1092+ #else
1093+ {"TLSV1_ALERT_DECRYPTION_FAILED", 20, 1021},
1094+ #endif
1095 #ifdef SSL_R_TLSV1_ALERT_DECRYPTION_FAILED
1096 {"TLSV1_ALERT_DECRYPTION_FAILED", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_DECRYPTION_FAILED},
1097 #else
1098@@ -7480,6 +8002,16 @@ static struct py_ssl_error_code error_codes[] = {
1099 #else
1100 {"TLSV1_ALERT_DECRYPT_ERROR", 20, 1051},
1101 #endif
1102+ #ifdef SSL_R_TLSV1_ALERT_DECRYPT_ERROR
1103+ {"TLSV1_ALERT_DECRYPT_ERROR", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_DECRYPT_ERROR},
1104+ #else
1105+ {"TLSV1_ALERT_DECRYPT_ERROR", 20, 1051},
1106+ #endif
1107+ #ifdef SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION
1108+ {"TLSV1_ALERT_EXPORT_RESTRICTION", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION},
1109+ #else
1110+ {"TLSV1_ALERT_EXPORT_RESTRICTION", 20, 1060},
1111+ #endif
1112 #ifdef SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION
1113 {"TLSV1_ALERT_EXPORT_RESTRICTION", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION},
1114 #else
1115@@ -7490,6 +8022,16 @@ static struct py_ssl_error_code error_codes[] = {
1116 #else
1117 {"TLSV1_ALERT_INAPPROPRIATE_FALLBACK", 20, 1086},
1118 #endif
1119+ #ifdef SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK
1120+ {"TLSV1_ALERT_INAPPROPRIATE_FALLBACK", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK},
1121+ #else
1122+ {"TLSV1_ALERT_INAPPROPRIATE_FALLBACK", 20, 1086},
1123+ #endif
1124+ #ifdef SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY
1125+ {"TLSV1_ALERT_INSUFFICIENT_SECURITY", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY},
1126+ #else
1127+ {"TLSV1_ALERT_INSUFFICIENT_SECURITY", 20, 1071},
1128+ #endif
1129 #ifdef SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY
1130 {"TLSV1_ALERT_INSUFFICIENT_SECURITY", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY},
1131 #else
1132@@ -7500,6 +8042,26 @@ static struct py_ssl_error_code error_codes[] = {
1133 #else
1134 {"TLSV1_ALERT_INTERNAL_ERROR", 20, 1080},
1135 #endif
1136+ #ifdef SSL_R_TLSV1_ALERT_INTERNAL_ERROR
1137+ {"TLSV1_ALERT_INTERNAL_ERROR", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_INTERNAL_ERROR},
1138+ #else
1139+ {"TLSV1_ALERT_INTERNAL_ERROR", 20, 1080},
1140+ #endif
1141+ #ifdef SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL
1142+ {"TLSV1_ALERT_NO_APPLICATION_PROTOCOL", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL},
1143+ #else
1144+ {"TLSV1_ALERT_NO_APPLICATION_PROTOCOL", 20, 1120},
1145+ #endif
1146+ #ifdef SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL
1147+ {"TLSV1_ALERT_NO_APPLICATION_PROTOCOL", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL},
1148+ #else
1149+ {"TLSV1_ALERT_NO_APPLICATION_PROTOCOL", 20, 1120},
1150+ #endif
1151+ #ifdef SSL_R_TLSV1_ALERT_NO_RENEGOTIATION
1152+ {"TLSV1_ALERT_NO_RENEGOTIATION", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_NO_RENEGOTIATION},
1153+ #else
1154+ {"TLSV1_ALERT_NO_RENEGOTIATION", 20, 1100},
1155+ #endif
1156 #ifdef SSL_R_TLSV1_ALERT_NO_RENEGOTIATION
1157 {"TLSV1_ALERT_NO_RENEGOTIATION", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_NO_RENEGOTIATION},
1158 #else
1159@@ -7510,21 +8072,56 @@ static struct py_ssl_error_code error_codes[] = {
1160 #else
1161 {"TLSV1_ALERT_PROTOCOL_VERSION", 20, 1070},
1162 #endif
1163+ #ifdef SSL_R_TLSV1_ALERT_PROTOCOL_VERSION
1164+ {"TLSV1_ALERT_PROTOCOL_VERSION", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_PROTOCOL_VERSION},
1165+ #else
1166+ {"TLSV1_ALERT_PROTOCOL_VERSION", 20, 1070},
1167+ #endif
1168 #ifdef SSL_R_TLSV1_ALERT_RECORD_OVERFLOW
1169 {"TLSV1_ALERT_RECORD_OVERFLOW", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_RECORD_OVERFLOW},
1170 #else
1171 {"TLSV1_ALERT_RECORD_OVERFLOW", 20, 1022},
1172 #endif
1173+ #ifdef SSL_R_TLSV1_ALERT_RECORD_OVERFLOW
1174+ {"TLSV1_ALERT_RECORD_OVERFLOW", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_RECORD_OVERFLOW},
1175+ #else
1176+ {"TLSV1_ALERT_RECORD_OVERFLOW", 20, 1022},
1177+ #endif
1178+ #ifdef SSL_R_TLSV1_ALERT_UNKNOWN_CA
1179+ {"TLSV1_ALERT_UNKNOWN_CA", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_UNKNOWN_CA},
1180+ #else
1181+ {"TLSV1_ALERT_UNKNOWN_CA", 20, 1048},
1182+ #endif
1183 #ifdef SSL_R_TLSV1_ALERT_UNKNOWN_CA
1184 {"TLSV1_ALERT_UNKNOWN_CA", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_UNKNOWN_CA},
1185 #else
1186 {"TLSV1_ALERT_UNKNOWN_CA", 20, 1048},
1187 #endif
1188+ #ifdef SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY
1189+ {"TLSV1_ALERT_UNKNOWN_PSK_IDENTITY", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY},
1190+ #else
1191+ {"TLSV1_ALERT_UNKNOWN_PSK_IDENTITY", 20, 1115},
1192+ #endif
1193+ #ifdef SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY
1194+ {"TLSV1_ALERT_UNKNOWN_PSK_IDENTITY", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY},
1195+ #else
1196+ {"TLSV1_ALERT_UNKNOWN_PSK_IDENTITY", 20, 1115},
1197+ #endif
1198 #ifdef SSL_R_TLSV1_ALERT_USER_CANCELLED
1199 {"TLSV1_ALERT_USER_CANCELLED", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_USER_CANCELLED},
1200 #else
1201 {"TLSV1_ALERT_USER_CANCELLED", 20, 1090},
1202 #endif
1203+ #ifdef SSL_R_TLSV1_ALERT_USER_CANCELLED
1204+ {"TLSV1_ALERT_USER_CANCELLED", ERR_LIB_SSL, SSL_R_TLSV1_ALERT_USER_CANCELLED},
1205+ #else
1206+ {"TLSV1_ALERT_USER_CANCELLED", 20, 1090},
1207+ #endif
1208+ #ifdef SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE
1209+ {"TLSV1_BAD_CERTIFICATE_HASH_VALUE", ERR_LIB_SSL, SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE},
1210+ #else
1211+ {"TLSV1_BAD_CERTIFICATE_HASH_VALUE", 20, 1114},
1212+ #endif
1213 #ifdef SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE
1214 {"TLSV1_BAD_CERTIFICATE_HASH_VALUE", ERR_LIB_SSL, SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE},
1215 #else
1216@@ -7535,6 +8132,16 @@ static struct py_ssl_error_code error_codes[] = {
1217 #else
1218 {"TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE", 20, 1113},
1219 #endif
1220+ #ifdef SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE
1221+ {"TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE", ERR_LIB_SSL, SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE},
1222+ #else
1223+ {"TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE", 20, 1113},
1224+ #endif
1225+ #ifdef SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE
1226+ {"TLSV1_CERTIFICATE_UNOBTAINABLE", ERR_LIB_SSL, SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE},
1227+ #else
1228+ {"TLSV1_CERTIFICATE_UNOBTAINABLE", 20, 1111},
1229+ #endif
1230 #ifdef SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE
1231 {"TLSV1_CERTIFICATE_UNOBTAINABLE", ERR_LIB_SSL, SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE},
1232 #else
1233@@ -7545,6 +8152,16 @@ static struct py_ssl_error_code error_codes[] = {
1234 #else
1235 {"TLSV1_UNRECOGNIZED_NAME", 20, 1112},
1236 #endif
1237+ #ifdef SSL_R_TLSV1_UNRECOGNIZED_NAME
1238+ {"TLSV1_UNRECOGNIZED_NAME", ERR_LIB_SSL, SSL_R_TLSV1_UNRECOGNIZED_NAME},
1239+ #else
1240+ {"TLSV1_UNRECOGNIZED_NAME", 20, 1112},
1241+ #endif
1242+ #ifdef SSL_R_TLSV1_UNSUPPORTED_EXTENSION
1243+ {"TLSV1_UNSUPPORTED_EXTENSION", ERR_LIB_SSL, SSL_R_TLSV1_UNSUPPORTED_EXTENSION},
1244+ #else
1245+ {"TLSV1_UNSUPPORTED_EXTENSION", 20, 1110},
1246+ #endif
1247 #ifdef SSL_R_TLSV1_UNSUPPORTED_EXTENSION
1248 {"TLSV1_UNSUPPORTED_EXTENSION", ERR_LIB_SSL, SSL_R_TLSV1_UNSUPPORTED_EXTENSION},
1249 #else
1250@@ -7665,6 +8282,11 @@ static struct py_ssl_error_code error_codes[] = {
1251 #else
1252 {"UNKNOWN_KEY_EXCHANGE_TYPE", 20, 250},
1253 #endif
1254+ #ifdef SSL_R_UNKNOWN_MANDATORY_PARAMETER
1255+ {"UNKNOWN_MANDATORY_PARAMETER", ERR_LIB_SSL, SSL_R_UNKNOWN_MANDATORY_PARAMETER},
1256+ #else
1257+ {"UNKNOWN_MANDATORY_PARAMETER", 20, 323},
1258+ #endif
1259 #ifdef SSL_R_UNKNOWN_PKEY_TYPE
1260 {"UNKNOWN_PKEY_TYPE", ERR_LIB_SSL, SSL_R_UNKNOWN_PKEY_TYPE},
1261 #else
1262@@ -7700,6 +8322,21 @@ static struct py_ssl_error_code error_codes[] = {
1263 #else
1264 {"UNSUPPORTED_COMPRESSION_ALGORITHM", 20, 257},
1265 #endif
1266+ #ifdef SSL_R_UNSUPPORTED_CONFIG_VALUE
1267+ {"UNSUPPORTED_CONFIG_VALUE", ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE},
1268+ #else
1269+ {"UNSUPPORTED_CONFIG_VALUE", 20, 414},
1270+ #endif
1271+ #ifdef SSL_R_UNSUPPORTED_CONFIG_VALUE_CLASS
1272+ {"UNSUPPORTED_CONFIG_VALUE_CLASS", ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE_CLASS},
1273+ #else
1274+ {"UNSUPPORTED_CONFIG_VALUE_CLASS", 20, 415},
1275+ #endif
1276+ #ifdef SSL_R_UNSUPPORTED_CONFIG_VALUE_OP
1277+ {"UNSUPPORTED_CONFIG_VALUE_OP", ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE_OP},
1278+ #else
1279+ {"UNSUPPORTED_CONFIG_VALUE_OP", 20, 416},
1280+ #endif
1281 #ifdef SSL_R_UNSUPPORTED_ELLIPTIC_CURVE
1282 {"UNSUPPORTED_ELLIPTIC_CURVE", ERR_LIB_SSL, SSL_R_UNSUPPORTED_ELLIPTIC_CURVE},
1283 #else
1284@@ -7720,6 +8357,11 @@ static struct py_ssl_error_code error_codes[] = {
1285 #else
1286 {"UNSUPPORTED_STATUS_TYPE", 20, 329},
1287 #endif
1288+ #ifdef SSL_R_UNSUPPORTED_WRITE_FLAG
1289+ {"UNSUPPORTED_WRITE_FLAG", ERR_LIB_SSL, SSL_R_UNSUPPORTED_WRITE_FLAG},
1290+ #else
1291+ {"UNSUPPORTED_WRITE_FLAG", 20, 412},
1292+ #endif
1293 #ifdef SSL_R_USE_SRTP_NOT_NEGOTIATED
1294 {"USE_SRTP_NOT_NEGOTIATED", ERR_LIB_SSL, SSL_R_USE_SRTP_NOT_NEGOTIATED},
1295 #else
1296@@ -7750,6 +8392,11 @@ static struct py_ssl_error_code error_codes[] = {
1297 #else
1298 {"WRONG_CURVE", 20, 378},
1299 #endif
1300+ #ifdef SSL_R_WRONG_RPK_TYPE
1301+ {"WRONG_RPK_TYPE", ERR_LIB_SSL, SSL_R_WRONG_RPK_TYPE},
1302+ #else
1303+ {"WRONG_RPK_TYPE", 20, 351},
1304+ #endif
1305 #ifdef SSL_R_WRONG_SIGNATURE_LENGTH
1306 {"WRONG_SIGNATURE_LENGTH", ERR_LIB_SSL, SSL_R_WRONG_SIGNATURE_LENGTH},
1307 #else
1308@@ -8055,6 +8702,16 @@ static struct py_ssl_error_code error_codes[] = {
1309 #else
1310 {"BAD_OBJECT", 34, 119},
1311 #endif
1312+ #ifdef X509V3_R_BAD_OPTION
1313+ {"BAD_OPTION", ERR_LIB_X509V3, X509V3_R_BAD_OPTION},
1314+ #else
1315+ {"BAD_OPTION", 34, 170},
1316+ #endif
1317+ #ifdef X509V3_R_BAD_VALUE
1318+ {"BAD_VALUE", ERR_LIB_X509V3, X509V3_R_BAD_VALUE},
1319+ #else
1320+ {"BAD_VALUE", 34, 171},
1321+ #endif
1322 #ifdef X509V3_R_BN_DEC2BN_ERROR
1323 {"BN_DEC2BN_ERROR", ERR_LIB_X509V3, X509V3_R_BN_DEC2BN_ERROR},
1324 #else
1325@@ -8370,6 +9027,11 @@ static struct py_ssl_error_code error_codes[] = {
1326 #else
1327 {"UNKNOWN_OPTION", 34, 120},
1328 #endif
1329+ #ifdef X509V3_R_UNKNOWN_VALUE
1330+ {"UNKNOWN_VALUE", ERR_LIB_X509V3, X509V3_R_UNKNOWN_VALUE},
1331+ #else
1332+ {"UNKNOWN_VALUE", 34, 172},
1333+ #endif
1334 #ifdef X509V3_R_UNSUPPORTED_OPTION
1335 {"UNSUPPORTED_OPTION", ERR_LIB_X509V3, X509V3_R_UNSUPPORTED_OPTION},
1336 #else
1337@@ -8430,6 +9092,11 @@ static struct py_ssl_error_code error_codes[] = {
1338 #else
1339 {"CRL_VERIFY_FAILURE", 11, 131},
1340 #endif
1341+ #ifdef X509_R_DUPLICATE_ATTRIBUTE
1342+ {"DUPLICATE_ATTRIBUTE", ERR_LIB_X509, X509_R_DUPLICATE_ATTRIBUTE},
1343+ #else
1344+ {"DUPLICATE_ATTRIBUTE", 11, 140},
1345+ #endif
1346 #ifdef X509_R_ERROR_GETTING_MD_BY_NID
1347 {"ERROR_GETTING_MD_BY_NID", ERR_LIB_X509, X509_R_ERROR_GETTING_MD_BY_NID},
1348 #else
1349@@ -8590,6 +9257,11 @@ static struct py_ssl_error_code error_codes[] = {
1350 #else
1351 {"UNSUPPORTED_ALGORITHM", 11, 111},
1352 #endif
1353+ #ifdef X509_R_UNSUPPORTED_VERSION
1354+ {"UNSUPPORTED_VERSION", ERR_LIB_X509, X509_R_UNSUPPORTED_VERSION},
1355+ #else
1356+ {"UNSUPPORTED_VERSION", 11, 145},
1357+ #endif
1358 #ifdef X509_R_WRONG_LOOKUP_TYPE
1359 {"WRONG_LOOKUP_TYPE", ERR_LIB_X509, X509_R_WRONG_LOOKUP_TYPE},
1360 #else
1361diff --git a/Tools/c-analyzer/cpython/_parser.py b/Tools/c-analyzer/cpython/_parser.py
1362index 21be53e7884..a08b32fa45d 100644
1363--- a/Tools/c-analyzer/cpython/_parser.py
1364+++ b/Tools/c-analyzer/cpython/_parser.py
1365@@ -70,9 +70,7 @@ Python/thread_pthread.h
1366 Python/thread_pthread_stubs.h
1367
1368 # only huge constants (safe but parsing is slow)
1369-Modules/_ssl_data_31.h
1370-Modules/_ssl_data_300.h
1371-Modules/_ssl_data_111.h
1372+Modules/_ssl_data_*.h
1373 Modules/cjkcodecs/mappings_*.h
1374 Modules/unicodedata_db.h
1375 Modules/unicodename_db.h
1376diff --git a/Tools/ssl/make_ssl_data.py b/Tools/ssl/make_ssl_data.py
1377index 9860871..0cd05c7 100755
1378--- a/Tools/ssl/make_ssl_data.py
1379+++ b/Tools/ssl/make_ssl_data.py
1380@@ -5,9 +5,28 @@ This script should be called *manually* when we want to upgrade SSLError
1381 `library` and `reason` mnemonics to a more recent OpenSSL version.
1382
1383 It takes two arguments:
1384-- the path to the OpenSSL source tree (e.g. git checkout)
1385+- the path to the OpenSSL git checkout
1386 - the path to the header file to be generated Modules/_ssl_data_{version}.h
1387 - error codes are version specific
1388+
1389+The OpenSSL git checkout should be at a specific tag, using commands like:
1390+ git tag --list 'openssl-*'
1391+ git switch --detach openssl-3.4.0
1392+
1393+
1394+After generating the definitions, compare the result with newest pre-existing file.
1395+You can use a command like:
1396+
1397+ git diff --no-index Modules/_ssl_data_31.h Modules/_ssl_data_34.h
1398+
1399+- If the new version *only* adds new definitions, remove the pre-existing file
1400+ and adjust the #include in _ssl.c to point to the new version.
1401+- If the new version removes or renumbers some definitions, keep both files and
1402+ add a new #include in _ssl.c.
1403+
1404+A newly supported OpenSSL version should also be added to:
1405+- Tools/ssl/multissltests.py
1406+- .github/workflows/build.yml
1407 """
1408
1409 import argparse
1410@@ -16,6 +35,7 @@ import operator
1411 import os
1412 import re
1413 import sys
1414+import subprocess
1415
1416
1417 parser = argparse.ArgumentParser(
1418@@ -118,9 +138,17 @@ def main():
1419 # sort by libname, numeric error code
1420 args.reasons = sorted(reasons, key=operator.itemgetter(0, 3))
1421
1422+ git_describe = subprocess.run(
1423+ ['git', 'describe', '--long', '--dirty'],
1424+ cwd=args.srcdir,
1425+ capture_output=True,
1426+ encoding='utf-8',
1427+ check=True,
1428+ )
1429 lines = [
1430- "/* File generated by Tools/ssl/make_ssl_data.py */"
1431- f"/* Generated on {datetime.datetime.utcnow().isoformat()} */"
1432+ "/* File generated by Tools/ssl/make_ssl_data.py */",
1433+ f"/* Generated on {datetime.datetime.now(datetime.UTC).isoformat()} */",
1434+ f"/* Generated from Git commit {git_describe.stdout.strip()} */",
1435 ]
1436 lines.extend(gen_library_codes(args))
1437 lines.append("")
1438diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py
1439index eae0e0c..fb06f63 100755
1440--- a/Tools/ssl/multissltests.py
1441+++ b/Tools/ssl/multissltests.py
1442@@ -51,6 +51,7 @@ OPENSSL_RECENT_VERSIONS = [
1443 "3.1.7",
1444 "3.2.3",
1445 "3.3.2",
1446+ "3.4.0",
1447 ]
1448
1449 LIBRESSL_OLD_VERSIONS = [
1450--
14512.30.2
1452
diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch
index 026150f0e2..84ad2abb0b 100644
--- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch
+++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch
@@ -1,4 +1,4 @@
1From f8a664cf1fc73e381d57d6927207286059744837 Mon Sep 17 00:00:00 2001 1From 129ee75863081d9e3418acca3df1e47667f671ad Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de> 2From: Alexander Kanavin <alex@linutronix.de>
3Date: Thu, 16 Sep 2021 16:35:37 +0200 3Date: Thu, 16 Sep 2021 16:35:37 +0200
4Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O 4Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O
@@ -24,7 +24,6 @@ So let's treat both channels the same.
24 24
25Upstream-Status: Submitted [https://github.com/python/cpython/pull/28388] 25Upstream-Status: Submitted [https://github.com/python/cpython/pull/28388]
26Signed-off-by: Alexander Kanavin <alex@linutronix.de> 26Signed-off-by: Alexander Kanavin <alex@linutronix.de>
27
28--- 27---
29 Lib/pty.py | 5 ++++- 28 Lib/pty.py | 5 ++++-
30 1 file changed, 4 insertions(+), 1 deletion(-) 29 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
index 680254fab9..ca72ebc899 100644
--- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
+++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
@@ -1,4 +1,4 @@
1From 71c194077bb907bfe423d3f3275f33a6c8ca0e74 Mon Sep 17 00:00:00 2001 1From 3f4f3e917950e286d5729ea949ca342995eb3c3e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de> 2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 17 Nov 2023 14:26:32 +0100 3Date: Fri, 17 Nov 2023 14:26:32 +0100
4Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration 4Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration
@@ -9,16 +9,15 @@ native python.
9 9
10Upstream-Status: Inappropriate [oe-core cross builds] 10Upstream-Status: Inappropriate [oe-core cross builds]
11Signed-off-by: Alexander Kanavin <alex@linutronix.de> 11Signed-off-by: Alexander Kanavin <alex@linutronix.de>
12
13--- 12---
14 Lib/sysconfig.py | 5 +++++ 13 Lib/sysconfig/__init__.py | 5 +++++
15 1 file changed, 5 insertions(+) 14 1 file changed, 5 insertions(+)
16 15
17diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py 16diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
18index 79c0510..91ebcb6 100644 17index f8e1c7d..0882526 100644
19--- a/Lib/sysconfig.py 18--- a/Lib/sysconfig/__init__.py
20+++ b/Lib/sysconfig.py 19+++ b/Lib/sysconfig/__init__.py
21@@ -668,6 +668,11 @@ def _init_config_vars(): 20@@ -494,6 +494,11 @@ def _init_config_vars():
22 _CONFIG_VARS['VPATH'] = sys._vpath 21 _CONFIG_VARS['VPATH'] = sys._vpath
23 if os.name == 'posix': 22 if os.name == 'posix':
24 _init_posix(_CONFIG_VARS) 23 _init_posix(_CONFIG_VARS)
diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
index ee33128fa1..39b62f6f26 100644
--- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
+++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
@@ -1,25 +1,33 @@
1From 38278339832a57dbf5fa3ef21accaa03e2c814d7 Mon Sep 17 00:00:00 2001 1From e7a8a7385f561f214054cf95f0a22bfa064eee0b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 30 Jan 2019 12:41:04 +0100 3Date: Wed, 30 Jan 2019 12:41:04 +0100
4Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data 4Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9Update to remove test_types from the test list, since that fails under
10qemu now.
11
12Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
8--- 13---
9 Makefile.pre.in | 3 +-- 14 Makefile.pre.in | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-) 15 1 file changed, 1 insertion(+), 2 deletions(-)
11 16
12diff --git a/Makefile.pre.in b/Makefile.pre.in 17diff --git a/Makefile.pre.in b/Makefile.pre.in
13index dd5e69f..381feb0 100644 18index 3bd4495f95b..8e8fc60bc76 100644
14--- a/Makefile.pre.in 19--- a/Makefile.pre.in
15+++ b/Makefile.pre.in 20+++ b/Makefile.pre.in
16@@ -658,8 +658,7 @@ profile-run-stamp: 21@@ -751,8 +751,7 @@ profile-run-stamp:
17 # enabled. 22 # enabled.
18 $(MAKE) profile-gen-stamp 23 $(MAKE) profile-gen-stamp
19 # Next, run the profile task to generate the profile information. 24 # Next, run the profile task to generate the profile information.
20- @ # FIXME: can't run for a cross build 25- @ # FIXME: can't run for a cross build
21- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true 26- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK)
22+ ./pgo-wrapper ./python -m test.regrtest --pgo test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_support || true 27+ ./pgo-wrapper ./python -m test.regrtest --pgo test_grammar test_opcodes test_dict
23 $(LLVM_PROF_MERGER) 28 $(LLVM_PROF_MERGER)
24 # Remove profile generation binary since we are done with it. 29 # Remove profile generation binary since we are done with it.
25 $(MAKE) clean-retain-profile 30 $(MAKE) clean-retain-profile
31--
322.39.5
33
diff --git a/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch b/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
index 197daa71a5..c8537db1fd 100644
--- a/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
+++ b/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
@@ -1,4 +1,4 @@
1From 3471e3478e0760c42e04f8046cee2367ab5706d2 Mon Sep 17 00:00:00 2001 1From 8828a52ebace98199569404f01174398bcc64a00 Mon Sep 17 00:00:00 2001
2From: Yi Fan Yu <yifan.yu@windriver.com> 2From: Yi Fan Yu <yifan.yu@windriver.com>
3Date: Thu, 1 Apr 2021 13:08:37 -0700 3Date: Thu, 1 Apr 2021 13:08:37 -0700
4Subject: [PATCH] Skip failing tests due to load variability on YP AB 4Subject: [PATCH] Skip failing tests due to load variability on YP AB
@@ -23,10 +23,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
23 2 files changed, 5 insertions(+) 23 2 files changed, 5 insertions(+)
24 24
25diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py 25diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
26index e42c7ab..dff5227 100644 26index 5dae370..23eb971 100644
27--- a/Lib/test/_test_multiprocessing.py 27--- a/Lib/test/_test_multiprocessing.py
28+++ b/Lib/test/_test_multiprocessing.py 28+++ b/Lib/test/_test_multiprocessing.py
29@@ -682,6 +682,7 @@ class _TestProcess(BaseTestCase): 29@@ -688,6 +688,7 @@ class _TestProcess(BaseTestCase):
30 close_queue(q) 30 close_queue(q)
31 31
32 @support.requires_resource('walltime') 32 @support.requires_resource('walltime')
@@ -34,7 +34,7 @@ index e42c7ab..dff5227 100644
34 def test_many_processes(self): 34 def test_many_processes(self):
35 if self.TYPE == 'threads': 35 if self.TYPE == 'threads':
36 self.skipTest('test not appropriate for {}'.format(self.TYPE)) 36 self.skipTest('test not appropriate for {}'.format(self.TYPE))
37@@ -2066,6 +2067,7 @@ class _TestBarrier(BaseTestCase): 37@@ -2211,6 +2212,7 @@ class _TestBarrier(BaseTestCase):
38 except threading.BrokenBarrierError: 38 except threading.BrokenBarrierError:
39 results.append(True) 39 results.append(True)
40 40
@@ -42,7 +42,7 @@ index e42c7ab..dff5227 100644
42 def test_timeout(self): 42 def test_timeout(self):
43 """ 43 """
44 Test wait(timeout) 44 Test wait(timeout)
45@@ -5024,6 +5026,7 @@ class TestWait(unittest.TestCase): 45@@ -5299,6 +5301,7 @@ class TestWait(unittest.TestCase):
46 time.sleep(period) 46 time.sleep(period)
47 47
48 @support.requires_resource('walltime') 48 @support.requires_resource('walltime')
@@ -51,10 +51,10 @@ index e42c7ab..dff5227 100644
51 from multiprocessing.connection import wait 51 from multiprocessing.connection import wait
52 52
53diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py 53diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
54index 02cc3f4..51a4548 100644 54index 293799f..1dbb623 100644
55--- a/Lib/test/test_time.py 55--- a/Lib/test/test_time.py
56+++ b/Lib/test/test_time.py 56+++ b/Lib/test/test_time.py
57@@ -492,6 +492,7 @@ class TimeTestCase(unittest.TestCase): 57@@ -548,6 +548,7 @@ class TimeTestCase(unittest.TestCase):
58 @unittest.skipIf( 58 @unittest.skipIf(
59 support.is_wasi, "process_time not available on WASI" 59 support.is_wasi, "process_time not available on WASI"
60 ) 60 )
@@ -62,11 +62,11 @@ index 02cc3f4..51a4548 100644
62 def test_process_time(self): 62 def test_process_time(self):
63 # process_time() should not include time spend during a sleep 63 # process_time() should not include time spend during a sleep
64 start = time.process_time() 64 start = time.process_time()
65@@ -505,6 +506,7 @@ class TimeTestCase(unittest.TestCase): 65@@ -561,6 +562,7 @@ class TimeTestCase(unittest.TestCase):
66 self.assertTrue(info.monotonic) 66 self.assertTrue(info.monotonic)
67 self.assertFalse(info.adjustable) 67 self.assertFalse(info.adjustable)
68 68
69+ @unittest.skip('timing related test, dependent on load') 69+ @unittest.skip('timing related test, dependent on load')
70 def test_thread_time(self): 70 def test_thread_time(self):
71 if not hasattr(time, 'thread_time'): 71 if not hasattr(time, 'thread_time'):
72 if sys.platform.startswith(('linux', 'win')): 72 if sys.platform.startswith(('linux', 'android', 'win')):
diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
index b6c6ac5a28..ab433d1836 100644
--- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
+++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
@@ -1,4 +1,4 @@
1From 37d058e841ba3bd89b5746cc5381afb014b11581 Mon Sep 17 00:00:00 2001 1From 5bf5aa6eae1fa3eed66893e51a1858ab481426b4 Mon Sep 17 00:00:00 2001
2From: Wentao Zhang <wentao.zhang@windriver.com> 2From: Wentao Zhang <wentao.zhang@windriver.com>
3Date: Mon, 20 Mar 2023 13:39:52 +0800 3Date: Mon, 20 Mar 2023 13:39:52 +0800
4Subject: [PATCH] Update test_sysconfig for posix_user purelib 4Subject: [PATCH] Update test_sysconfig for posix_user purelib
@@ -17,16 +17,15 @@ Update test_sysconfig.test_user_similar() for the posix_user scheme:
17 17
18Upstream-Status: Inappropriate [oe-core specific] 18Upstream-Status: Inappropriate [oe-core specific]
19Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> 19Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
20
21--- 20---
22 Lib/test/test_sysconfig.py | 2 +- 21 Lib/test/test_sysconfig.py | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-) 22 1 file changed, 1 insertion(+), 1 deletion(-)
24 23
25diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py 24diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
26index b6dbf3d..5672590 100644 25index 1ade492..4e94889 100644
27--- a/Lib/test/test_sysconfig.py 26--- a/Lib/test/test_sysconfig.py
28+++ b/Lib/test/test_sysconfig.py 27+++ b/Lib/test/test_sysconfig.py
29@@ -372,7 +372,7 @@ class TestSysConfig(unittest.TestCase): 28@@ -423,7 +423,7 @@ class TestSysConfig(unittest.TestCase):
30 expected = os.path.normpath(global_path.replace(base, user, 1)) 29 expected = os.path.normpath(global_path.replace(base, user, 1))
31 # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, 30 # bpo-44860: platlib of posix_user doesn't use sys.platlibdir,
32 # whereas posix_prefix does. 31 # whereas posix_prefix does.
@@ -34,4 +33,4 @@ index b6dbf3d..5672590 100644
34+ if name == 'platlib' or name == 'purelib': 33+ if name == 'platlib' or name == 'purelib':
35 # Replace "/lib64/python3.11/site-packages" suffix 34 # Replace "/lib64/python3.11/site-packages" suffix
36 # with "/lib/python3.11/site-packages". 35 # with "/lib/python3.11/site-packages".
37 py_version_short = sysconfig.get_python_version() 36 py_version_abi = sysconfig._get_python_version_abi()
diff --git a/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch b/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch
deleted file mode 100644
index 8406ef30a2..0000000000
--- a/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 439aa02f42d6e6715c172076261757fcb89a936a Mon Sep 17 00:00:00 2001
2From: "Miss Islington (bot)"
3 <31488909+miss-islington@users.noreply.github.com>
4Date: Tue, 23 Jan 2024 23:02:02 +0100
5Subject: [PATCH] gh-114492: Initialize struct termios before calling
6 tcgetattr() (GH-114495) (GH-114502)
7
8On Alpine Linux it could leave some field non-initialized.
9(cherry picked from commit d22c066b802592932f9eb18434782299e80ca42e)
10
11Upstream-Status: Backport [https://github.com/python/cpython/commit/386c72d9928c51aa2c855ce592bd8022da3b407f]
12Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 .../next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst | 2 ++
16 1 file changed, 2 insertions(+)
17 create mode 100644 Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst
18
19diff --git a/Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst b/Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst
20new file mode 100644
21index 0000000..8df8299
22--- /dev/null
23+++ b/Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst
24@@ -0,0 +1,2 @@
25+Make the result of :func:`termios.tcgetattr` reproducible on Alpine Linux.
26+Previously it could leave a random garbage in some fields.
diff --git a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
deleted file mode 100644
index bbeabe4389..0000000000
--- a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
+++ /dev/null
@@ -1,120 +0,0 @@
1From ababc7b1db8c406910766e11cdd04cbef7a706c9 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 22 Oct 2018 15:19:51 +0800
4Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
5
6When working path contains "clang"/"gcc"/"icc", it might be part of $CC
7because of the "--sysroot" parameter. That could cause judgement error
8about clang/gcc/icc compilers. e.g.
9When "icc" is containded in working path, below errors are reported when
10compiling python3:
11x86_64-wrs-linux-gcc: error: strict: No such file or directory
12x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
13
14Here use cc_basename to replace CC for checking compiler to avoid such
15kind of issue.
16
17Upstream-Status: Submitted [https://github.com/python/cpython/pull/96399]
18
19Signed-off-by: Li Zhou <li.zhou@windriver.com>
20
21patch originally from Li Zhou, I just rework it to new version
22
23Signed-off-by: Changqing Li <changqing.li@windriver.com>
24---
25 configure.ac | 19 ++++++++++---------
26 1 file changed, 10 insertions(+), 9 deletions(-)
27
28diff --git a/configure.ac b/configure.ac
29index 384718d..5a1d58b 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -137,6 +137,7 @@ AC_CONFIG_HEADERS([pyconfig.h])
33 AC_CANONICAL_HOST
34 AC_SUBST([build])
35 AC_SUBST([host])
36+LT_INIT
37
38 AS_VAR_IF([cross_compiling], [maybe],
39 [AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])]
40@@ -896,7 +897,7 @@ AC_SUBST([CXX])
41 preset_cxx="$CXX"
42 if test -z "$CXX"
43 then
44- case "$CC" in
45+ case "$cc_basename" in
46 gcc) AC_PATH_TOOL([CXX], [g++], [g++], [notfound]) ;;
47 cc) AC_PATH_TOOL([CXX], [c++], [c++], [notfound]) ;;
48 clang|*/clang) AC_PATH_TOOL([CXX], [clang++], [clang++], [notfound]) ;;
49@@ -1328,7 +1329,7 @@ rmdir CaseSensitiveTestDir
50
51 case $ac_sys_system in
52 hp*|HP*)
53- case $CC in
54+ case $cc_basename in
55 cc|*/cc) CC="$CC -Ae";;
56 esac;;
57 esac
58@@ -1854,7 +1855,7 @@ esac
59 ],
60 [AC_MSG_RESULT([no])])
61 if test "$Py_LTO" = 'true' ; then
62- case $CC in
63+ case $cc_basename in
64 *clang*)
65 LDFLAGS_NOLTO="-fno-lto"
66 dnl Clang linker requires -flto in order to link objects with LTO information.
67@@ -1983,7 +1984,7 @@ then
68 fi
69 fi
70 LLVM_PROF_ERR=no
71-case $CC in
72+case $cc_basename in
73 *clang*)
74 # Any changes made here should be reflected in the GCC+Darwin case below
75 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
76@@ -2147,7 +2148,7 @@ AC_MSG_RESULT([$BOLT_APPLY_FLAGS])
77 # compiler and platform. BASECFLAGS tweaks need to be made even if the
78 # user set OPT.
79
80-case $CC in
81+case $cc_basename in
82 *clang*)
83 cc_is_clang=1
84 ;;
85@@ -2419,7 +2420,7 @@ yes)
86
87 # ICC doesn't recognize the option, but only emits a warning
88 ## XXX does it emit an unused result warning and can it be disabled?
89- AS_CASE([$CC],
90+ AS_CASE([$cc_basename],
91 [*icc*], [ac_cv_disable_unused_result_warning=no]
92 [PY_CHECK_CC_WARNING([disable], [unused-result])])
93 AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes],
94@@ -2665,7 +2666,7 @@ yes)
95 ;;
96 esac
97
98-case "$CC" in
99+case "$cc_basename" in
100 *mpicc*)
101 CFLAGS_NODIST="$CFLAGS_NODIST"
102 ;;
103@@ -3482,7 +3483,7 @@ then
104 then
105 LINKFORSHARED="-Wl,--export-dynamic"
106 fi;;
107- SunOS/5*) case $CC in
108+ SunOS/5*) case $cc_basename in
109 *gcc*)
110 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
111 then
112@@ -6803,7 +6804,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then
113 # Some versions of gcc miscompile inline asm:
114 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
115 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
116- case $CC in
117+ case $cc_basename in
118 *gcc*)
119 AC_MSG_CHECKING([for gcc ipa-pure-const bug])
120 saved_cflags="$CFLAGS"
diff --git a/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
index 2d7bca6a77..ea103bc834 100644
--- a/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
+++ b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
@@ -1,4 +1,4 @@
1From 217cea231462e7703e8c9ea39c0a6833f799a420 Mon Sep 17 00:00:00 2001 1From c5bdd39f8ebc4e6c58a47d7e424eac028eddb4ff Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <tgamblin@baylibre.com> 2From: Trevor Gamblin <tgamblin@baylibre.com>
3Date: Fri, 15 Sep 2023 08:48:33 -0400 3Date: Fri, 15 Sep 2023 08:48:33 -0400
4Subject: [PATCH] skip no_stdout_fileno test due to load variability 4Subject: [PATCH] skip no_stdout_fileno test due to load variability
@@ -16,12 +16,12 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
16 1 file changed, 1 insertion(+) 16 1 file changed, 1 insertion(+)
17 17
18diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py 18diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
19index 4d03c46..b329b7a 100644 19index c5394de..ed17fb6 100644
20--- a/Lib/test/test_builtin.py 20--- a/Lib/test/test_builtin.py
21+++ b/Lib/test/test_builtin.py 21+++ b/Lib/test/test_builtin.py
22@@ -2326,6 +2326,7 @@ class PtyTests(unittest.TestCase): 22@@ -2435,6 +2435,7 @@ class PtyTests(unittest.TestCase):
23 # Check stdin/stdout error handler is used when invoking PyOS_Readline() 23 "byte 0xe9 in position 4: ordinal not in "
24 self.check_input_tty("prompté", b"quux\xe9", "ascii") 24 "range(128)")
25 25
26+ @unittest.skip("Test may fail under heavy load") 26+ @unittest.skip("Test may fail under heavy load")
27 def test_input_no_stdout_fileno(self): 27 def test_input_no_stdout_fileno(self):
diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
index fc52fdac26..b9c68a98d7 100644
--- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
+++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
@@ -1,4 +1,4 @@
1From a5d429a0e1a4809c1ded7be7e45dcabeb82c53d8 Mon Sep 17 00:00:00 2001 1From bbcb17dc1ed283f41c8cd94d39f70898f0c45583 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de> 2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sun, 12 Sep 2021 21:44:36 +0200 3Date: Sun, 12 Sep 2021 21:44:36 +0200
4Subject: [PATCH] sysconfig.py: use platlibdir also for purelib 4Subject: [PATCH] sysconfig.py: use platlibdir also for purelib
@@ -8,21 +8,20 @@ is not correct.
8 8
9Upstream-Status: Inappropriate [oe-core specific] 9Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex@linutronix.de> 10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11
12--- 11---
13 Lib/sysconfig.py | 2 +- 12 Lib/sysconfig/__init__.py | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
15 14
16diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py 15diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
17index 122d441..79c0510 100644 16index 80aef34..f8e1c7d 100644
18--- a/Lib/sysconfig.py 17--- a/Lib/sysconfig/__init__.py
19+++ b/Lib/sysconfig.py 18+++ b/Lib/sysconfig/__init__.py
20@@ -28,7 +28,7 @@ _INSTALL_SCHEMES = { 19@@ -29,7 +29,7 @@ _INSTALL_SCHEMES = {
21 'posix_prefix': { 20 'posix_prefix': {
22 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', 21 'stdlib': '{installed_base}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
23 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', 22 'platstdlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
24- 'purelib': '{base}/lib/python{py_version_short}/site-packages', 23- 'purelib': '{base}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
25+ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', 24+ 'purelib': '{base}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
26 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', 25 'platlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
27 'include': 26 'include':
28 '{installed_base}/include/python{py_version_short}{abiflags}', 27 '{installed_base}/include/{implementation_lower}{py_version_short}{abiflags}',
diff --git a/meta/recipes-devtools/python/python3/0001-test_active_children-skip-problematic-test.patch b/meta/recipes-devtools/python/python3/0001-test_active_children-skip-problematic-test.patch
new file mode 100644
index 0000000000..5f60c60b5b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-test_active_children-skip-problematic-test.patch
@@ -0,0 +1,27 @@
1From 540765b148d942a2339affa6c0d11445e9d0f26c Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <tgamblin@baylibre.com>
3Date: Thu, 13 Jun 2024 10:54:31 -0400
4Subject: [PATCH] test_active_children: skip problematic test
5
6This test is failing in some tests on the Autobuilder. Since it's of a
7similar nature to other failing/hanging tests, disable it for now.
8
9Upstream-Status: Inappropriate [OE-Specific]
10
11Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
12---
13 Lib/test/_test_multiprocessing.py | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
17index 23eb971..b1295b2 100644
18--- a/Lib/test/_test_multiprocessing.py
19+++ b/Lib/test/_test_multiprocessing.py
20@@ -585,6 +585,7 @@ class _TestProcess(BaseTestCase):
21 self.assertTrue(type(cpus) is int)
22 self.assertTrue(cpus >= 1)
23
24+ @unittest.skip("skipping problematic test")
25 def test_active_children(self):
26 self.assertEqual(type(self.active_children()), list)
27
diff --git a/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch b/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
index b4fe946cba..68e277d662 100644
--- a/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
+++ b/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
@@ -1,4 +1,4 @@
1From b64c131a576a4b4f821514e711ab91b1394fb4ff Mon Sep 17 00:00:00 2001 1From 0e9d0c58e77ef540d9601ce84a1aa79d9ce6ee9b Mon Sep 17 00:00:00 2001
2From: Tim Orling <timothy.t.orling@intel.com> 2From: Tim Orling <timothy.t.orling@intel.com>
3Date: Fri, 18 Jun 2021 11:56:50 -0700 3Date: Fri, 18 Jun 2021 11:56:50 -0700
4Subject: [PATCH] test_ctypes.test_find: skip without tools-sdk 4Subject: [PATCH] test_ctypes.test_find: skip without tools-sdk
@@ -10,16 +10,15 @@ easiest way to dynamically check for that is looking for
10Upstream-Status: Inappropriate [oe-specific] 10Upstream-Status: Inappropriate [oe-specific]
11 11
12Signed-off-by: Tim Orling <timothy.t.orling@intel.com> 12Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
13
14--- 13---
15 Lib/test/test_ctypes/test_find.py | 2 ++ 14 Lib/test/test_ctypes/test_find.py | 2 ++
16 1 file changed, 2 insertions(+) 15 1 file changed, 2 insertions(+)
17 16
18diff --git a/Lib/test/test_ctypes/test_find.py b/Lib/test/test_ctypes/test_find.py 17diff --git a/Lib/test/test_ctypes/test_find.py b/Lib/test/test_ctypes/test_find.py
19index 1ff9d01..59def26 100644 18index 85b2861..b033203 100644
20--- a/Lib/test/test_ctypes/test_find.py 19--- a/Lib/test/test_ctypes/test_find.py
21+++ b/Lib/test/test_ctypes/test_find.py 20+++ b/Lib/test/test_ctypes/test_find.py
22@@ -113,10 +113,12 @@ class FindLibraryLinux(unittest.TestCase): 21@@ -116,10 +116,12 @@ class FindLibraryLinux(unittest.TestCase):
23 # LD_LIBRARY_PATH) 22 # LD_LIBRARY_PATH)
24 self.assertEqual(find_library(libname), 'lib%s.so' % libname) 23 self.assertEqual(find_library(libname), 'lib%s.so' % libname)
25 24
diff --git a/meta/recipes-devtools/python/python3/0001-test_deadlock-skip-problematic-test.patch b/meta/recipes-devtools/python/python3/0001-test_deadlock-skip-problematic-test.patch
new file mode 100644
index 0000000000..3336e2913a
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-test_deadlock-skip-problematic-test.patch
@@ -0,0 +1,27 @@
1From 5a44f74549b32395109342e9299510c32db71068 Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <tgamblin@baylibre.com>
3Date: Wed, 12 Jun 2024 10:29:03 -0400
4Subject: [PATCH] test_deadlock: skip problematic test
5
6This test hangs frequently when run on the Autobuilder. Disable it in
7testing until the cause can be determined.
8
9Upstream-Status: Inappropriate [OE-Specific]
10
11Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
12---
13 Lib/test/test_concurrent_futures/test_deadlock.py | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/Lib/test/test_concurrent_futures/test_deadlock.py b/Lib/test/test_concurrent_futures/test_deadlock.py
17index 3c30c45..008d6c0 100644
18--- a/Lib/test/test_concurrent_futures/test_deadlock.py
19+++ b/Lib/test/test_concurrent_futures/test_deadlock.py
20@@ -90,6 +90,7 @@ class ErrorAtUnpickle(object):
21 return _raise_error_ignore_stderr, (UnpicklingError, )
22
23
24+@unittest.skip("skipping problematic test")
25 class ExecutorDeadlockTest:
26 TIMEOUT = support.LONG_TIMEOUT
27
diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
index 410a9fc7f1..2cca004b57 100644
--- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
+++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
@@ -1,4 +1,4 @@
1From ef5728f0af14da5c9f80b0f038fe5bf6d44cb0e9 Mon Sep 17 00:00:00 2001 1From c1f3cf625c0f011060ddaa2a4096f6aa13dd1ee6 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com> 2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Mon, 5 Aug 2019 15:57:39 +0800 3Date: Mon, 5 Aug 2019 15:57:39 +0800
4Subject: [PATCH] test_locale.py: correct the test output format 4Subject: [PATCH] test_locale.py: correct the test output format
@@ -26,16 +26,15 @@ Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132]
26Rebased for 3.9.4, still not accepted upstream Signed-off-by: Alejandro Hernandez <alejandro@enedino.org> 26Rebased for 3.9.4, still not accepted upstream Signed-off-by: Alejandro Hernandez <alejandro@enedino.org>
27 27
28Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 28Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
29
30--- 29---
31 Lib/test/test_locale.py | 2 +- 30 Lib/test/test_locale.py | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-) 31 1 file changed, 1 insertion(+), 1 deletion(-)
33 32
34diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py 33diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
35index b0d7998..cb12153 100644 34index da4bd79..fd9e67d 100644
36--- a/Lib/test/test_locale.py 35--- a/Lib/test/test_locale.py
37+++ b/Lib/test/test_locale.py 36+++ b/Lib/test/test_locale.py
38@@ -557,7 +557,7 @@ class TestMiscellaneous(unittest.TestCase): 37@@ -572,7 +572,7 @@ class TestMiscellaneous(unittest.TestCase):
39 self.skipTest('test needs Turkish locale') 38 self.skipTest('test needs Turkish locale')
40 loc = locale.getlocale(locale.LC_CTYPE) 39 loc = locale.getlocale(locale.LC_CTYPE)
41 if verbose: 40 if verbose:
diff --git a/meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch b/meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch
new file mode 100644
index 0000000000..862a7f5ea7
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch
@@ -0,0 +1,44 @@
1From 1a0a145261ba4f97aaff3c0c656ac2e0ad9695a8 Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <tgamblin@baylibre.com>
3Date: Tue, 13 Aug 2024 11:07:05 -0400
4Subject: [PATCH] test_readline: skip limited history test
5
6This test was added recently and is failing on the ptest image when
7using the default PACKAGECONFIG settings (i.e. with editline instead of
8readline).. Disable it until the proper fix is determined.
9
10A bug has been opened upstream: https://github.com/python/cpython/issues/123018
11
12Upstream-Status: Inappropriate [OE-specific]
13
14Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
15---
16 Lib/test/test_readline.py | 2 ++
17 1 file changed, 2 insertions(+)
18
19--- a/Lib/test/test_readline.py
20+++ b/Lib/test/test_readline.py
21@@ -70,6 +70,7 @@ class TestHistoryManipulation (unittest.
22
23 @unittest.skipUnless(hasattr(readline, "append_history_file"),
24 "append_history not available")
25+ @unittest.skip("Skipping problematic test")
26 def test_write_read_append(self):
27 hfile = tempfile.NamedTemporaryFile(delete=False)
28 hfile.close()
29@@ -141,6 +142,7 @@ class TestHistoryManipulation (unittest.
30 self.assertEqual(readline.get_history_item(1), "entrée 1")
31 self.assertEqual(readline.get_history_item(2), "entrée 22")
32
33+ @unittest.skip("Skipping problematic test")
34 def test_write_read_limited_history(self):
35 previous_length = readline.get_history_length()
36 self.addCleanup(readline.set_history_length, previous_length)
37@@ -382,6 +384,7 @@ readline.write_history_file(history_file
38 self.assertIn(b"done", output)
39
40
41+ @unittest.skip("Skipping problematic test")
42 def test_write_read_limited_history(self):
43 previous_length = readline.get_history_length()
44 self.addCleanup(readline.set_history_length, previous_length)
diff --git a/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
index 1d4cda18b1..4e284de613 100644
--- a/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
+++ b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
@@ -1,4 +1,4 @@
1From 9d4cdbde100798ba9fa1cf3f82dbaf18fd10a543 Mon Sep 17 00:00:00 2001 1From b678363156b5d40e09c1d138840180e3ddc7d20b Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <tgamblin@baylibre.com> 2From: Trevor Gamblin <tgamblin@baylibre.com>
3Date: Wed, 8 May 2024 11:58:09 -0400 3Date: Wed, 8 May 2024 11:58:09 -0400
4Subject: [PATCH] test_shutdown: skip problematic test 4Subject: [PATCH] test_shutdown: skip problematic test
@@ -14,7 +14,7 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
14 1 file changed, 3 insertions(+) 14 1 file changed, 3 insertions(+)
15 15
16diff --git a/Lib/test/test_concurrent_futures/test_shutdown.py b/Lib/test/test_concurrent_futures/test_shutdown.py 16diff --git a/Lib/test/test_concurrent_futures/test_shutdown.py b/Lib/test/test_concurrent_futures/test_shutdown.py
17index 7a4065afd4..6b878a48bf 100644 17index 7a4065a..6b878a4 100644
18--- a/Lib/test/test_concurrent_futures/test_shutdown.py 18--- a/Lib/test/test_concurrent_futures/test_shutdown.py
19+++ b/Lib/test/test_concurrent_futures/test_shutdown.py 19+++ b/Lib/test/test_concurrent_futures/test_shutdown.py
20@@ -20,6 +20,7 @@ def sleep_and_print(t, msg): 20@@ -20,6 +20,7 @@ def sleep_and_print(t, msg):
@@ -25,7 +25,7 @@ index 7a4065afd4..6b878a48bf 100644
25 class ExecutorShutdownTest: 25 class ExecutorShutdownTest:
26 def test_run_after_shutdown(self): 26 def test_run_after_shutdown(self):
27 self.executor.shutdown() 27 self.executor.shutdown()
28@@ -156,6 +157,7 @@ def timeout(_signum, _frame): 28@@ -156,6 +157,7 @@ class ExecutorShutdownTest:
29 signal.signal(signal.SIGALRM, old_handler) 29 signal.signal(signal.SIGALRM, old_handler)
30 30
31 31
@@ -33,7 +33,7 @@ index 7a4065afd4..6b878a48bf 100644
33 class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase): 33 class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase):
34 def test_threads_terminate(self): 34 def test_threads_terminate(self):
35 def acquire_lock(lock): 35 def acquire_lock(lock):
36@@ -252,6 +254,7 @@ def test_cancel_futures_wait_false(self): 36@@ -252,6 +254,7 @@ class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase
37 self.assertIn(out.strip(), [b"apple", b""]) 37 self.assertIn(out.strip(), [b"apple", b""])
38 38
39 39
@@ -41,6 +41,3 @@ index 7a4065afd4..6b878a48bf 100644
41 class ProcessPoolShutdownTest(ExecutorShutdownTest): 41 class ProcessPoolShutdownTest(ExecutorShutdownTest):
42 def test_processes_terminate(self): 42 def test_processes_terminate(self):
43 def acquire_lock(lock): 43 def acquire_lock(lock):
44--
452.45.0
46
diff --git a/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
index 0d0eb08459..b4f873fd72 100644
--- a/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
+++ b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
@@ -1,4 +1,4 @@
1From dc69a1afdb3ba619705ff71e14f19ed3142e422f Mon Sep 17 00:00:00 2001 1From 9f252a691cd335341938489da32d6e2d4620d8ca Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <tgamblin@baylibre.com> 2From: Trevor Gamblin <tgamblin@baylibre.com>
3Date: Fri, 6 Oct 2023 10:59:44 -0400 3Date: Fri, 6 Oct 2023 10:59:44 -0400
4Subject: [PATCH] test_storlines: skip due to load variability 4Subject: [PATCH] test_storlines: skip due to load variability
@@ -11,16 +11,15 @@ Upstream-Status: Inappropriate [OE-Specific]
11[YOCTO #14933] 11[YOCTO #14933]
12 12
13Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 13Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
14
15--- 14---
16 Lib/test/test_ftplib.py | 1 + 15 Lib/test/test_ftplib.py | 1 +
17 1 file changed, 1 insertion(+) 16 1 file changed, 1 insertion(+)
18 17
19diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py 18diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
20index 2f191ea..dc29346 100644 19index bed0e6d..36602be 100644
21--- a/Lib/test/test_ftplib.py 20--- a/Lib/test/test_ftplib.py
22+++ b/Lib/test/test_ftplib.py 21+++ b/Lib/test/test_ftplib.py
23@@ -626,6 +626,7 @@ class TestFTPClass(TestCase): 22@@ -627,6 +627,7 @@ class TestFTPClass(TestCase):
24 self.client.storbinary('stor', f, rest=r) 23 self.client.storbinary('stor', f, rest=r)
25 self.assertEqual(self.server.handler_instance.rest, str(r)) 24 self.assertEqual(self.server.handler_instance.rest, str(r))
26 25
diff --git a/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch b/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
deleted file mode 100644
index 0661249bfd..0000000000
--- a/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From d0205c60d08f51d84bd8ddc07a57e8c71710fdad Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 17 Nov 2023 14:16:40 +0100
4Subject: [PATCH] configure.ac: do not add a curses include path from the host
5
6This leads to host contamination, and particularly can cause
7curses modules to fail at runtime if the host curses is configured
8differently to native curses (observed on current OpenSuse Tumbleweed
9as dnf failures).
10
11Upstream-Status: Inappropriate [oe-core specific]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 configure.ac | 6 ------
15 1 file changed, 6 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index c49cd4f..affdedf 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -6508,12 +6508,6 @@ AS_VAR_IF([have_panel], [no], [
22 AC_MSG_RESULT([$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)])
23 ])
24
25-# first curses header check
26-ac_save_cppflags="$CPPFLAGS"
27-if test "$cross_compiling" = no; then
28- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
29-fi
30-
31 # On Solaris, term.h requires curses.h
32 AC_CHECK_HEADERS([term.h], [], [], [
33 #ifdef HAVE_CURSES_H
diff --git a/meta/recipes-devtools/python/python3/cgi_py.patch b/meta/recipes-devtools/python/python3/cgi_py.patch
deleted file mode 100644
index 8262c88e73..0000000000
--- a/meta/recipes-devtools/python/python3/cgi_py.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From a56778372fe8dc7c42f5ffd911d89498c22dd064 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@windriver.com>
3Date: Wed, 21 Sep 2011 20:55:33 -0500
4Subject: [PATCH] Lib/cgi.py: Update the script as mentioned in the comment
5
6Upstream-Status: Inappropriate [distribution]
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10---
11 Lib/cgi.py | 11 +----------
12 1 file changed, 1 insertion(+), 10 deletions(-)
13
14diff --git a/Lib/cgi.py b/Lib/cgi.py
15index 8787567..ebe8652 100755
16--- a/Lib/cgi.py
17+++ b/Lib/cgi.py
18@@ -1,13 +1,4 @@
19-#! /usr/local/bin/python
20-
21-# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
22-# intentionally NOT "/usr/bin/env python". On many systems
23-# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
24-# scripts, and /usr/local/bin is the default directory where Python is
25-# installed, so /usr/bin/env would be unable to find python. Granted,
26-# binary installations by Linux vendors often install Python in
27-# /usr/bin. So let those vendors patch cgi.py to match their choice
28-# of installation.
29+#! /usr/bin/env python
30
31 """Support module for CGI (Common Gateway Interface) scripts.
32
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
index 045240ea0b..288d5ede3a 100644
--- a/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -1,7 +1,7 @@
1# This script is used as a bitbake task to create a new python manifest 1# This script is used as a bitbake task to create a new python manifest
2# $ bitbake python -c create_manifest 2# $ bitbake python -c create_manifest
3# 3#
4# Our goal is to keep python-core as small as posible and add other python 4# Our goal is to keep python-core as small as possible and add other python
5# packages only when the user needs them, hence why we split upstream python 5# packages only when the user needs them, hence why we split upstream python
6# into several packages. 6# into several packages.
7# 7#
diff --git a/meta/recipes-devtools/python/python3/crosspythonpath.patch b/meta/recipes-devtools/python/python3/crosspythonpath.patch
deleted file mode 100644
index 2c4aef0511..0000000000
--- a/meta/recipes-devtools/python/python3/crosspythonpath.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 5b66463c10fec1440e977d5a21a0167862d6d79c Mon Sep 17 00:00:00 2001
2From: Ricardo Ribalda <ricardo@ribalda.com>
3Date: Tue, 18 Nov 2014 03:35:33 -0500
4Subject: [PATCH] configure.ac: add CROSSPYTHONPATH into PYTHONPATH for
5 PYTHON_FOR_BUILD
6
7When building x86->x86 the system will try to execute .so and related items
8from the default PYTHONPATH. This will fail if the target CPU contains
9instructions that the host CPU does not have, add CROSSPYTHONPATH
10into PYTHONPATH so we can prepend the list to find correct libs.
11
12Upstream-Status: Inappropriate [OE-Core integration specific]
13
14Credits-to: Mark Hatle <mark.hatle@windriver.com>
15Credits-to: Jackie Huang <jackie.huang@windriver.com>
16Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
17
18---
19 configure.ac | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/configure.ac b/configure.ac
23index cb9e198..d81c19a 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -165,7 +165,7 @@ AC_ARG_WITH([build-python],
27 dnl Build Python interpreter is used for regeneration and freezing.
28 ac_cv_prog_PYTHON_FOR_REGEN=$with_build_python
29 PYTHON_FOR_FREEZE="$with_build_python"
30- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$with_build_python
31+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$with_build_python
32 AC_MSG_RESULT([$with_build_python])
33 ], [
34 AS_VAR_IF([cross_compiling], [yes],
diff --git a/meta/recipes-devtools/python/python3/deterministic_imports.patch b/meta/recipes-devtools/python/python3/deterministic_imports.patch
deleted file mode 100644
index 104df94964..0000000000
--- a/meta/recipes-devtools/python/python3/deterministic_imports.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 039d5e652796b55f1132afa568c7432b6ed89afd Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Fri, 27 May 2022 17:05:44 +0100
4Subject: [PATCH] python3: Ensure stale empty python module directories don't
5
6There are two issues here. Firstly, the modules are accessed in on disk order. This
7means behaviour seen on one system might not reproduce on another and is a real headache.
8
9Secondly, empty directories left behind by previous modules might be looked at. This
10has caused a long string of different issues for us.
11
12As a result, patch this to a behaviour which works for us.
13
14Upstream-Status: Pending [need to talk to upstream to see if they'll take one or both fixes]
15Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
16
17---
18 Lib/importlib/metadata/__init__.py | 9 ++++++++-
19 1 file changed, 8 insertions(+), 1 deletion(-)
20
21diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py
22index 82e0ce1..969cac4 100644
23--- a/Lib/importlib/metadata/__init__.py
24+++ b/Lib/importlib/metadata/__init__.py
25@@ -710,7 +710,14 @@ class Lookup:
26 self.infos = FreezableDefaultDict(list)
27 self.eggs = FreezableDefaultDict(list)
28
29- for child in path.children():
30+ for child in sorted(path.children()):
31+ childpath = pathlib.Path(path.root, child)
32+ try:
33+ if childpath.is_dir() and not any(childpath.iterdir()):
34+ # Empty directories aren't interesting
35+ continue
36+ except PermissionError:
37+ continue
38 low = child.lower()
39 if low.endswith((".dist-info", ".egg-info")):
40 # rpartition is faster than splitext and suitable for this purpose.
diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch
index c1b20703e6..b115a6fa65 100644
--- a/meta/recipes-devtools/python/python3/makerace.patch
+++ b/meta/recipes-devtools/python/python3/makerace.patch
@@ -1,4 +1,4 @@
1From 9f827c29adbe656af3c8fc963fdd8f47aec0c442 Mon Sep 17 00:00:00 2001 1From 2b458b4e1bcd57e3f135d3f0e715f64b98b27906 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org> 2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 13 Jul 2021 23:19:29 +0100 3Date: Tue, 13 Jul 2021 23:19:29 +0100
4Subject: [PATCH] python3: Fix make race 4Subject: [PATCH] python3: Fix make race
@@ -17,10 +17,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17 1 file changed, 1 insertion(+), 1 deletion(-) 17 1 file changed, 1 insertion(+), 1 deletion(-)
18 18
19diff --git a/Makefile.pre.in b/Makefile.pre.in 19diff --git a/Makefile.pre.in b/Makefile.pre.in
20index 381feb0..77bf09a 100644 20index be1b9ea..9ec3a71 100644
21--- a/Makefile.pre.in 21--- a/Makefile.pre.in
22+++ b/Makefile.pre.in 22+++ b/Makefile.pre.in
23@@ -2250,7 +2250,7 @@ COMPILEALL_OPTS=-j0 23@@ -2485,7 +2485,7 @@ COMPILEALL_OPTS=-j0
24 TEST_MODULES=@TEST_MODULES@ 24 TEST_MODULES=@TEST_MODULES@
25 25
26 .PHONY: libinstall 26 .PHONY: libinstall
diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json
index 46092d4004..441830833b 100644
--- a/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -1,7 +1,7 @@
1# DO NOT (entirely) modify this file manually, please read. 1# DO NOT (entirely) modify this file manually, please read.
2# 2#
3# IMPORTANT NOTE: 3# IMPORTANT NOTE:
4# Please keep in mind that the create_manifest task relies on the fact the the 4# Please keep in mind that the create_manifest task relies on the fact that the
5# target and native Python packages are the same, and it also needs to be executed 5# target and native Python packages are the same, and it also needs to be executed
6# with a fully working native package (with all the PACKAGECONFIGs enabled and all 6# with a fully working native package (with all the PACKAGECONFIGs enabled and all
7# and all the modules should be working, check log.do_compile), otherwise the script 7# and all the modules should be working, check log.do_compile), otherwise the script
@@ -103,17 +103,6 @@
103 ], 103 ],
104 "cached": [] 104 "cached": []
105 }, 105 },
106 "2to3": {
107 "summary": "Python automated Python 2 to 3 code translator",
108 "rdepends": [
109 "core"
110 ],
111 "files": [
112 "${bindir}/2to3*",
113 "${libdir}/python${PYTHON_MAJMIN}/lib2to3"
114 ],
115 "cached": []
116 },
117 "asyncio": { 106 "asyncio": {
118 "summary": "Python Asynchronous I/O", 107 "summary": "Python Asynchronous I/O",
119 "rdepends": [ 108 "rdepends": [
@@ -138,49 +127,21 @@
138 "core" 127 "core"
139 ], 128 ],
140 "files": [ 129 "files": [
141 "${libdir}/python${PYTHON_MAJMIN}/chunk.py",
142 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/audioop.*.so",
143 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/ossaudiodev.*.so",
144 "${libdir}/python${PYTHON_MAJMIN}/sndhdr.py",
145 "${libdir}/python${PYTHON_MAJMIN}/sunau.py",
146 "${libdir}/python${PYTHON_MAJMIN}/wave.py" 130 "${libdir}/python${PYTHON_MAJMIN}/wave.py"
147 ], 131 ],
148 "cached": [ 132 "cached": [
149 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/chunk.*.pyc",
150 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sndhdr.*.pyc",
151 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sunau.*.pyc",
152 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc" 133 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc"
153 ] 134 ]
154 }, 135 },
155 "cgitb": {
156 "summary": "Special exception handler for Python scripts",
157 "rdepends": [
158 "core",
159 "crypt",
160 "html",
161 "io",
162 "math",
163 "pydoc"
164 ],
165 "files": [
166 "${libdir}/python${PYTHON_MAJMIN}/cgitb.py"
167 ],
168 "cached": [
169 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cgitb.*.pyc"
170 ]
171 },
172 "codecs": { 136 "codecs": {
173 "summary": "Python codec", 137 "summary": "Python codec",
174 "rdepends": [ 138 "rdepends": [
175 "core" 139 "core"
176 ], 140 ],
177 "files": [ 141 "files": [
178 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multibytecodec.*.so", 142 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multibytecodec.*.so"
179 "${libdir}/python${PYTHON_MAJMIN}/xdrlib.py"
180 ], 143 ],
181 "cached": [ 144 "cached": []
182 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/xdrlib.*.pyc"
183 ]
184 }, 145 },
185 "compile": { 146 "compile": {
186 "summary": "Python bytecode compilation support", 147 "summary": "Python bytecode compilation support",
@@ -216,7 +177,7 @@
216 }, 177 },
217 "core": { 178 "core": {
218 "summary": "Python interpreter and core modules", 179 "summary": "Python interpreter and core modules",
219 "rdepends": [], 180 "rdepends": ["compression"],
220 "files": [ 181 "files": [
221 "${bindir}/python${PYTHON_MAJMIN}", 182 "${bindir}/python${PYTHON_MAJMIN}",
222 "${bindir}/python${PYTHON_MAJMIN}.real", 183 "${bindir}/python${PYTHON_MAJMIN}.real",
@@ -229,8 +190,12 @@
229 "${libdir}/python${PYTHON_MAJMIN}/_abcoll.py", 190 "${libdir}/python${PYTHON_MAJMIN}/_abcoll.py",
230 "${libdir}/python${PYTHON_MAJMIN}/_bootlocale.py", 191 "${libdir}/python${PYTHON_MAJMIN}/_bootlocale.py",
231 "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py", 192 "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py",
193 "${libdir}/python${PYTHON_MAJMIN}/_colorize.py",
232 "${libdir}/python${PYTHON_MAJMIN}/_compression.py", 194 "${libdir}/python${PYTHON_MAJMIN}/_compression.py",
233 "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py", 195 "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py",
196 "${libdir}/python${PYTHON_MAJMIN}/_opcode_metadata.py",
197 "${libdir}/python${PYTHON_MAJMIN}/_pyrepl",
198 "${libdir}/python${PYTHON_MAJMIN}/_pyrepl/pager.py",
234 "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py", 199 "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py",
235 "${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py", 200 "${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py",
236 "${libdir}/python${PYTHON_MAJMIN}/_weakrefset.py", 201 "${libdir}/python${PYTHON_MAJMIN}/_weakrefset.py",
@@ -261,6 +226,7 @@
261 "${libdir}/python${PYTHON_MAJMIN}/genericpath.py", 226 "${libdir}/python${PYTHON_MAJMIN}/genericpath.py",
262 "${libdir}/python${PYTHON_MAJMIN}/getopt.py", 227 "${libdir}/python${PYTHON_MAJMIN}/getopt.py",
263 "${libdir}/python${PYTHON_MAJMIN}/gettext.py", 228 "${libdir}/python${PYTHON_MAJMIN}/gettext.py",
229 "${libdir}/python${PYTHON_MAJMIN}/glob.py",
264 "${libdir}/python${PYTHON_MAJMIN}/heapq.py", 230 "${libdir}/python${PYTHON_MAJMIN}/heapq.py",
265 "${libdir}/python${PYTHON_MAJMIN}/imp.py", 231 "${libdir}/python${PYTHON_MAJMIN}/imp.py",
266 "${libdir}/python${PYTHON_MAJMIN}/importlib", 232 "${libdir}/python${PYTHON_MAJMIN}/importlib",
@@ -289,6 +255,7 @@
289 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so", 255 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so",
290 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so", 256 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so",
291 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so", 257 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so",
258 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so",
292 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.*.so", 259 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.*.so",
293 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/math.*.so", 260 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/math.*.so",
294 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/parser.*.so", 261 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/parser.*.so",
@@ -307,7 +274,10 @@
307 "${libdir}/python${PYTHON_MAJMIN}/operator.py", 274 "${libdir}/python${PYTHON_MAJMIN}/operator.py",
308 "${libdir}/python${PYTHON_MAJMIN}/optparse.py", 275 "${libdir}/python${PYTHON_MAJMIN}/optparse.py",
309 "${libdir}/python${PYTHON_MAJMIN}/os.py", 276 "${libdir}/python${PYTHON_MAJMIN}/os.py",
277 "${libdir}/python${PYTHON_MAJMIN}/pathlib",
310 "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", 278 "${libdir}/python${PYTHON_MAJMIN}/pathlib.py",
279 "${libdir}/python${PYTHON_MAJMIN}/pathlib/_abc.py",
280 "${libdir}/python${PYTHON_MAJMIN}/pathlib/_local.py",
311 "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", 281 "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
312 "${libdir}/python${PYTHON_MAJMIN}/platform.py", 282 "${libdir}/python${PYTHON_MAJMIN}/platform.py",
313 "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", 283 "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
@@ -332,6 +302,7 @@
332 "${libdir}/python${PYTHON_MAJMIN}/struct.py", 302 "${libdir}/python${PYTHON_MAJMIN}/struct.py",
333 "${libdir}/python${PYTHON_MAJMIN}/subprocess.py", 303 "${libdir}/python${PYTHON_MAJMIN}/subprocess.py",
334 "${libdir}/python${PYTHON_MAJMIN}/symbol.py", 304 "${libdir}/python${PYTHON_MAJMIN}/symbol.py",
305 "${libdir}/python${PYTHON_MAJMIN}/sysconfig",
335 "${libdir}/python${PYTHON_MAJMIN}/sysconfig.py", 306 "${libdir}/python${PYTHON_MAJMIN}/sysconfig.py",
336 "${libdir}/python${PYTHON_MAJMIN}/textwrap.py", 307 "${libdir}/python${PYTHON_MAJMIN}/textwrap.py",
337 "${libdir}/python${PYTHON_MAJMIN}/threading.py", 308 "${libdir}/python${PYTHON_MAJMIN}/threading.py",
@@ -351,8 +322,10 @@
351 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/__future__.*.pyc", 322 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/__future__.*.pyc",
352 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_bootlocale.*.pyc", 323 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_bootlocale.*.pyc",
353 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_collections_abc.*.pyc", 324 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_collections_abc.*.pyc",
325 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_colorize.*.pyc",
354 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc", 326 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc",
355 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc", 327 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc",
328 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_opcode_metadata.*.pyc",
356 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc", 329 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc",
357 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.*.pyc", 330 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.*.pyc",
358 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc", 331 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc",
@@ -377,6 +350,7 @@
377 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/genericpath.*.pyc", 350 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/genericpath.*.pyc",
378 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getopt.*.pyc", 351 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getopt.*.pyc",
379 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gettext.*.pyc", 352 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gettext.*.pyc",
353 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/glob.*.pyc",
380 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/heapq.*.pyc", 354 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/heapq.*.pyc",
381 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imp.*.pyc", 355 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imp.*.pyc",
382 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/inspect.*.pyc", 356 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/inspect.*.pyc",
@@ -421,6 +395,8 @@
421 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/typing.*.pyc", 395 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/typing.*.pyc",
422 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/warnings.*.pyc", 396 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/warnings.*.pyc",
423 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/weakref.*.pyc", 397 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/weakref.*.pyc",
398 "${libdir}/python${PYTHON_MAJMIN}/_pyrepl/__pycache__",
399 "${libdir}/python${PYTHON_MAJMIN}/_pyrepl/__pycache__/pager.*.pyc",
424 "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__", 400 "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__",
425 "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__/abc.*.pyc", 401 "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__/abc.*.pyc",
426 "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__", 402 "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__",
@@ -432,11 +408,15 @@
432 "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/abc.*.pyc", 408 "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/abc.*.pyc",
433 "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/machinery.*.pyc", 409 "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/machinery.*.pyc",
434 "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc", 410 "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc",
411 "${libdir}/python${PYTHON_MAJMIN}/pathlib/__pycache__",
412 "${libdir}/python${PYTHON_MAJMIN}/pathlib/__pycache__/_abc.*.pyc",
413 "${libdir}/python${PYTHON_MAJMIN}/pathlib/__pycache__/_local.*.pyc",
435 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__", 414 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__",
436 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_casefix.*.pyc", 415 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_casefix.*.pyc",
437 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_compiler.*.pyc", 416 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_compiler.*.pyc",
438 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_constants.*.pyc", 417 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_constants.*.pyc",
439 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_parser.*.pyc", 418 "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_parser.*.pyc",
419 "${libdir}/python${PYTHON_MAJMIN}/sysconfig/__pycache__",
440 "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__", 420 "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
441 "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__/parse.*.pyc" 421 "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__/parse.*.pyc"
442 ] 422 ]
@@ -444,15 +424,11 @@
444 "crypt": { 424 "crypt": {
445 "summary": "Python basic cryptographic and hashing support", 425 "summary": "Python basic cryptographic and hashing support",
446 "rdepends": [ 426 "rdepends": [
447 "core", 427 "core"
448 "math",
449 "stringold"
450 ], 428 ],
451 "files": [ 429 "files": [
452 "${libdir}/python${PYTHON_MAJMIN}/crypt.py",
453 "${libdir}/python${PYTHON_MAJMIN}/hashlib.py", 430 "${libdir}/python${PYTHON_MAJMIN}/hashlib.py",
454 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so", 431 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so",
455 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_crypt.*.so",
456 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", 432 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so",
457 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", 433 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so",
458 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", 434 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so",
@@ -460,7 +436,6 @@
460 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so" 436 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so"
461 ], 437 ],
462 "cached": [ 438 "cached": [
463 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/crypt.*.pyc",
464 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc" 439 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc"
465 ] 440 ]
466 }, 441 },
@@ -468,7 +443,6 @@
468 "summary": "Python C types support", 443 "summary": "Python C types support",
469 "rdepends": [ 444 "rdepends": [
470 "core", 445 "core",
471 "crypt",
472 "io", 446 "io",
473 "math" 447 "math"
474 ], 448 ],
@@ -590,7 +564,6 @@
590 "summary": "Python email support", 564 "summary": "Python email support",
591 "rdepends": [ 565 "rdepends": [
592 "core", 566 "core",
593 "crypt",
594 "datetime", 567 "datetime",
595 "io", 568 "io",
596 "math", 569 "math",
@@ -663,36 +636,30 @@
663 "core" 636 "core"
664 ], 637 ],
665 "files": [ 638 "files": [
666 "${libdir}/python${PYTHON_MAJMIN}/colorsys.py", 639 "${libdir}/python${PYTHON_MAJMIN}/colorsys.py"
667 "${libdir}/python${PYTHON_MAJMIN}/imghdr.py"
668 ], 640 ],
669 "cached": [ 641 "cached": [
670 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc", 642 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc"
671 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imghdr.*.pyc"
672 ] 643 ]
673 }, 644 },
674 "io": { 645 "io": {
675 "summary": "Python low-level I/O", 646 "summary": "Python low-level I/O",
676 "rdepends": [ 647 "rdepends": [
677 "core", 648 "core",
678 "crypt",
679 "math", 649 "math",
680 "netclient", 650 "netclient"
681 "shell"
682 ], 651 ],
683 "files": [ 652 "files": [
684 "${libdir}/python${PYTHON_MAJMIN}/_pyio.py", 653 "${libdir}/python${PYTHON_MAJMIN}/_pyio.py",
685 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_socket.*.so", 654 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_socket.*.so",
686 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_ssl.*.so", 655 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_ssl.*.so",
687 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/termios.*.so", 656 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/termios.*.so",
688 "${libdir}/python${PYTHON_MAJMIN}/pipes.py",
689 "${libdir}/python${PYTHON_MAJMIN}/socket.py", 657 "${libdir}/python${PYTHON_MAJMIN}/socket.py",
690 "${libdir}/python${PYTHON_MAJMIN}/ssl.py", 658 "${libdir}/python${PYTHON_MAJMIN}/ssl.py",
691 "${libdir}/python${PYTHON_MAJMIN}/tempfile.py" 659 "${libdir}/python${PYTHON_MAJMIN}/tempfile.py"
692 ], 660 ],
693 "cached": [ 661 "cached": [
694 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc", 662 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc",
695 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pipes.*.pyc",
696 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc", 663 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc",
697 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc", 664 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc",
698 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc" 665 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc"
@@ -728,7 +695,6 @@
728 "summary": "Python mailbox format support", 695 "summary": "Python mailbox format support",
729 "rdepends": [ 696 "rdepends": [
730 "core", 697 "core",
731 "crypt",
732 "datetime", 698 "datetime",
733 "email", 699 "email",
734 "io", 700 "io",
@@ -747,8 +713,7 @@
747 "math": { 713 "math": {
748 "summary": "Python math support", 714 "summary": "Python math support",
749 "rdepends": [ 715 "rdepends": [
750 "core", 716 "core"
751 "crypt"
752 ], 717 ],
753 "files": [ 718 "files": [
754 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_random.*.so", 719 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_random.*.so",
@@ -765,12 +730,10 @@
765 "core" 730 "core"
766 ], 731 ],
767 "files": [ 732 "files": [
768 "${libdir}/python${PYTHON_MAJMIN}/quopri.py", 733 "${libdir}/python${PYTHON_MAJMIN}/quopri.py"
769 "${libdir}/python${PYTHON_MAJMIN}/uu.py"
770 ], 734 ],
771 "cached": [ 735 "cached": [
772 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc", 736 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc"
773 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uu.*.pyc"
774 ] 737 ]
775 }, 738 },
776 "mmap": { 739 "mmap": {
@@ -787,7 +750,6 @@
787 "cached": [], 750 "cached": [],
788 "files": [], 751 "files": [],
789 "rdepends": [ 752 "rdepends": [
790 "2to3",
791 "asyncio", 753 "asyncio",
792 "audio", 754 "audio",
793 "codecs", 755 "codecs",
@@ -884,11 +846,9 @@
884 "${libdir}/python${PYTHON_MAJMIN}/http/__pycache__", 846 "${libdir}/python${PYTHON_MAJMIN}/http/__pycache__",
885 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_uuid.*.so", 847 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_uuid.*.so",
886 "${libdir}/python${PYTHON_MAJMIN}/mimetypes.py", 848 "${libdir}/python${PYTHON_MAJMIN}/mimetypes.py",
887 "${libdir}/python${PYTHON_MAJMIN}/nntplib.py",
888 "${libdir}/python${PYTHON_MAJMIN}/poplib.py", 849 "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
889 "${libdir}/python${PYTHON_MAJMIN}/secrets.py", 850 "${libdir}/python${PYTHON_MAJMIN}/secrets.py",
890 "${libdir}/python${PYTHON_MAJMIN}/smtplib.py", 851 "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
891 "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
892 "${libdir}/python${PYTHON_MAJMIN}/urllib", 852 "${libdir}/python${PYTHON_MAJMIN}/urllib",
893 "${libdir}/python${PYTHON_MAJMIN}/uuid.py" 853 "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
894 ], 854 ],
@@ -897,11 +857,9 @@
897 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc", 857 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc",
898 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc", 858 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc",
899 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", 859 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc",
900 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/nntplib.*.pyc",
901 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", 860 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc",
902 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", 861 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc",
903 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", 862 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc",
904 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/telnetlib.*.pyc",
905 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" 863 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc"
906 ] 864 ]
907 }, 865 },
@@ -909,22 +867,12 @@
909 "summary": "Python Internet Protocol servers", 867 "summary": "Python Internet Protocol servers",
910 "rdepends": [ 868 "rdepends": [
911 "core", 869 "core",
912 "crypt", 870 "io"
913 "datetime",
914 "email",
915 "html",
916 "io",
917 "math",
918 "mime",
919 "netclient",
920 "stringold"
921 ], 871 ],
922 "files": [ 872 "files": [
923 "${libdir}/python${PYTHON_MAJMIN}/cgi.py",
924 "${libdir}/python${PYTHON_MAJMIN}/socketserver.py" 873 "${libdir}/python${PYTHON_MAJMIN}/socketserver.py"
925 ], 874 ],
926 "cached": [ 875 "cached": [
927 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cgi.*.pyc",
928 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc" 876 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc"
929 ] 877 ]
930 }, 878 },
@@ -1052,12 +1000,10 @@
1052 ], 1000 ],
1053 "files": [ 1001 "files": [
1054 "${libdir}/python${PYTHON_MAJMIN}/cmd.py", 1002 "${libdir}/python${PYTHON_MAJMIN}/cmd.py",
1055 "${libdir}/python${PYTHON_MAJMIN}/glob.py",
1056 "${libdir}/python${PYTHON_MAJMIN}/shlex.py" 1003 "${libdir}/python${PYTHON_MAJMIN}/shlex.py"
1057 ], 1004 ],
1058 "cached": [ 1005 "cached": [
1059 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc", 1006 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc",
1060 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/glob.*.pyc",
1061 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" 1007 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc"
1062 ] 1008 ]
1063 }, 1009 },
@@ -1077,7 +1023,6 @@
1077 "summary": "Basic statistics module", 1023 "summary": "Basic statistics module",
1078 "rdepends": [ 1024 "rdepends": [
1079 "core", 1025 "core",
1080 "crypt",
1081 "math", 1026 "math",
1082 "numbers" 1027 "numbers"
1083 ], 1028 ],
@@ -1090,7 +1035,7 @@
1090 ] 1035 ]
1091 }, 1036 },
1092 "stringold": { 1037 "stringold": {
1093 "summary": "Python string APIs [deprecated]", 1038 "summary": "Common string operations",
1094 "rdepends": [ 1039 "rdepends": [
1095 "core" 1040 "core"
1096 ], 1041 ],
@@ -1147,7 +1092,6 @@
1147 "core" 1092 "core"
1148 ], 1093 ],
1149 "files": [ 1094 "files": [
1150 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so",
1151 "${libdir}/python${PYTHON_MAJMIN}/tkinter" 1095 "${libdir}/python${PYTHON_MAJMIN}/tkinter"
1152 ], 1096 ],
1153 "cached": [] 1097 "cached": []
@@ -1162,18 +1106,6 @@
1162 ], 1106 ],
1163 "cached": [] 1107 "cached": []
1164 }, 1108 },
1165 "turtle": {
1166 "summary": "Turtle graphics is a popular way for introducing programming to kids.",
1167 "rdepends": [
1168 "tkinter"
1169 ],
1170 "files": [
1171 "${libdir}/python${PYTHON_MAJMIN}/turtle.py"
1172 ],
1173 "cached": [
1174 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/turtle.*.pyc"
1175 ]
1176 },
1177 "unittest": { 1109 "unittest": {
1178 "summary": "Python unit testing framework", 1110 "summary": "Python unit testing framework",
1179 "rdepends": [ 1111 "rdepends": [
@@ -1201,8 +1133,7 @@
1201 "io" 1133 "io"
1202 ], 1134 ],
1203 "files": [ 1135 "files": [
1204 "${libdir}/python${PYTHON_MAJMIN}/getpass.py", 1136 "${libdir}/python${PYTHON_MAJMIN}/getpass.py"
1205 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/nis.*.so"
1206 ], 1137 ],
1207 "cached": [ 1138 "cached": [
1208 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc" 1139 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc"
@@ -1238,12 +1169,10 @@
1238 "rdepends": [ 1169 "rdepends": [
1239 "compression", 1170 "compression",
1240 "core", 1171 "core",
1241 "crypt",
1242 "datetime", 1172 "datetime",
1243 "email", 1173 "email",
1244 "html", 1174 "html",
1245 "io", 1175 "io",
1246 "math",
1247 "mime", 1176 "mime",
1248 "netclient", 1177 "netclient",
1249 "netserver", 1178 "netserver",
diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes-devtools/python/python3/valid-dists.patch
new file mode 100644
index 0000000000..1b2c078c21
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/valid-dists.patch
@@ -0,0 +1,160 @@
1From a65c29adc027b3615154cab73aaedd58a6aa23da Mon Sep 17 00:00:00 2001
2From: "Jason R. Coombs" <jaraco@jaraco.com>
3Date: Tue, 23 Jul 2024 08:36:16 -0400
4Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by
5 name.
6
7Closes python/importlib_metadata#489
8
9Upstream-Status: Backport [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154cab73aaedd58a6aa23da]
10Signed-off-by: Ross Burton <ross.burton@arm.com>
11
12diff --git i/Lib/importlib/metadata/__init__.py w/Lib/importlib/metadata/__init__.py
13index 8ce62dd864f..085378caabc 100644
14--- i/Lib/importlib/metadata/__init__.py
15+++ w/Lib/importlib/metadata/__init__.py
16@@ -21,7 +21,7 @@
17 from . import _meta
18 from ._collections import FreezableDefaultDict, Pair
19 from ._functools import method_cache, pass_none
20-from ._itertools import always_iterable, unique_everseen
21+from ._itertools import always_iterable, bucket, unique_everseen
22 from ._meta import PackageMetadata, SimplePath
23
24 from contextlib import suppress
25@@ -404,7 +404,7 @@ def from_name(cls, name: str) -> Distribution:
26 if not name:
27 raise ValueError("A distribution name is required.")
28 try:
29- return next(iter(cls.discover(name=name)))
30+ return next(iter(cls._prefer_valid(cls.discover(name=name))))
31 except StopIteration:
32 raise PackageNotFoundError(name)
33
34@@ -428,6 +428,16 @@ def discover(
35 resolver(context) for resolver in cls._discover_resolvers()
36 )
37
38+ @staticmethod
39+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]:
40+ """
41+ Prefer (move to the front) distributions that have metadata.
42+
43+ Ref python/importlib_resources#489.
44+ """
45+ buckets = bucket(dists, lambda dist: bool(dist.metadata))
46+ return itertools.chain(buckets[True], buckets[False])
47+
48 @staticmethod
49 def at(path: str | os.PathLike[str]) -> Distribution:
50 """Return a Distribution for the indicated metadata path.
51diff --git i/Lib/importlib/metadata/_itertools.py w/Lib/importlib/metadata/_itertools.py
52index d4ca9b9140e..79d37198ce7 100644
53--- i/Lib/importlib/metadata/_itertools.py
54+++ w/Lib/importlib/metadata/_itertools.py
55@@ -1,3 +1,4 @@
56+from collections import defaultdict, deque
57 from itertools import filterfalse
58
59
60@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)):
61 return iter(obj)
62 except TypeError:
63 return iter((obj,))
64+
65+
66+# Copied from more_itertools 10.3
67+class bucket:
68+ """Wrap *iterable* and return an object that buckets the iterable into
69+ child iterables based on a *key* function.
70+
71+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
72+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character
73+ >>> sorted(list(s)) # Get the keys
74+ ['a', 'b', 'c']
75+ >>> a_iterable = s['a']
76+ >>> next(a_iterable)
77+ 'a1'
78+ >>> next(a_iterable)
79+ 'a2'
80+ >>> list(s['b'])
81+ ['b1', 'b2', 'b3']
82+
83+ The original iterable will be advanced and its items will be cached until
84+ they are used by the child iterables. This may require significant storage.
85+
86+ By default, attempting to select a bucket to which no items belong will
87+ exhaust the iterable and cache all values.
88+ If you specify a *validator* function, selected buckets will instead be
89+ checked against it.
90+
91+ >>> from itertools import count
92+ >>> it = count(1, 2) # Infinite sequence of odd numbers
93+ >>> key = lambda x: x % 10 # Bucket by last digit
94+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only
95+ >>> s = bucket(it, key=key, validator=validator)
96+ >>> 2 in s
97+ False
98+ >>> list(s[2])
99+ []
100+
101+ """
102+
103+ def __init__(self, iterable, key, validator=None):
104+ self._it = iter(iterable)
105+ self._key = key
106+ self._cache = defaultdict(deque)
107+ self._validator = validator or (lambda x: True)
108+
109+ def __contains__(self, value):
110+ if not self._validator(value):
111+ return False
112+
113+ try:
114+ item = next(self[value])
115+ except StopIteration:
116+ return False
117+ else:
118+ self._cache[value].appendleft(item)
119+
120+ return True
121+
122+ def _get_values(self, value):
123+ """
124+ Helper to yield items from the parent iterator that match *value*.
125+ Items that don't match are stored in the local cache as they
126+ are encountered.
127+ """
128+ while True:
129+ # If we've cached some items that match the target value, emit
130+ # the first one and evict it from the cache.
131+ if self._cache[value]:
132+ yield self._cache[value].popleft()
133+ # Otherwise we need to advance the parent iterator to search for
134+ # a matching item, caching the rest.
135+ else:
136+ while True:
137+ try:
138+ item = next(self._it)
139+ except StopIteration:
140+ return
141+ item_value = self._key(item)
142+ if item_value == value:
143+ yield item
144+ break
145+ elif self._validator(item_value):
146+ self._cache[item_value].append(item)
147+
148+ def __iter__(self):
149+ for item in self._it:
150+ item_value = self._key(item)
151+ if self._validator(item_value):
152+ self._cache[item_value].append(item)
153+
154+ yield from self._cache.keys()
155+
156+ def __getitem__(self, value):
157+ if not self._validator(value):
158+ return iter(())
159+
160+ return self._get_values(value)