forked from pool/python314
- Library
- gh-137426: Remove the code deprecation of
importlib.abc.ResourceLoader. It is documented as
deprecated, but left for backwards compatibility with other
classes in importlib.abc.
- gh-137282: Fix tab completion and dir() on
concurrent.futures.
- gh-137257: Bump the version of pip bundled in ensurepip to
version 25.2
- gh-137226: Fix behavior of
annotationlib.ForwardRef.evaluate() when the type_params
parameter is passed and the name of a type param is also
present in an enclosing scope.
- gh-130522: Fix unraisable TypeError raised during
interpreter shutdown in the threading module.
- gh-137059: Fix handling of file URLs with a
Windows drive letter in the URL authority by
urllib.request.url2pathname(). This fixes a regression in
earlier pre-releases of Python 3.14.
- gh-130577: tarfile now validates archives to ensure member
offsets are non-negative. (Contributed by Alexander Enrique
Urieles Nieto in gh-130577; CVE-2025-8194, bsc#1247249).
- gh-135228: When dataclasses replaces a class with a slotted
dataclass, the original class can now be garbage collected
again. Earlier changes in Python 3.14 caused this class to
always remain in existence together with the replacement
class synthesized by dataclasses.
- Documentation
- gh-136155: We are now checking for fatal errors in EPUB
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=91
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
---
|
|
Lib/test/test_ctypes/test_generated_structs.py | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
--- a/Lib/test/test_ctypes/test_generated_structs.py
|
|
+++ b/Lib/test/test_ctypes/test_generated_structs.py
|
|
@@ -12,6 +12,7 @@ Run this module to regenerate the files:
|
|
import unittest
|
|
from test.support import import_helper
|
|
import re
|
|
+import sys
|
|
from dataclasses import dataclass
|
|
from functools import cached_property
|
|
|
|
@@ -21,6 +22,11 @@ from ctypes import sizeof, alignment, po
|
|
_ctypes_test = import_helper.import_module("_ctypes_test")
|
|
|
|
|
|
+def is_32bit():
|
|
+ # or alternatively (slightly slower)
|
|
+ # (struct.calcsize("P") * 8) == 32
|
|
+ return not (sys.maxsize > 2**32)
|
|
+
|
|
# ctypes erases the difference between `c_int` and e.g.`c_int16`.
|
|
# To keep it, we'll use custom subclasses with the C name stashed in `_c_name`:
|
|
class c_bool(ctypes.c_bool):
|
|
@@ -415,6 +421,7 @@ class AnonBitfields(Structure):
|
|
|
|
|
|
class GeneratedTest(unittest.TestCase):
|
|
+ @unittest.skipIf(is_32bit(), 'fails on 32bit platform (gh#python/cpython#121938)')
|
|
def test_generated_data(self):
|
|
"""Check that a ctypes struct/union matches its C equivalent.
|
|
|