forked from pool/python311
- Security
- gh-135034: Fixes multiple issues that allowed tarfile
extraction filters (filter="data" and filter="tar") to be
bypassed using crafted symlinks and hard links.
Addresses CVE-2024-12718 (bsc#1244056), CVE-2025-4138
(bsc#1244059), CVE-2025-4330 (bsc#1244060), and
CVE-2025-4517 (bsc#1244032).
- gh-133767: Fix use-after-free in the “unicode-escape”
decoder with a non-“strict” error handler (CVE-2025-4516,
bsc#1243273).
- gh-128840: Short-circuit the processing of long IPv6
addresses early in ipaddress to prevent excessive memory
consumption and a minor denial-of-service.
- Library
- gh-128840: Fix parsing long IPv6 addresses with embedded
IPv4 address.
- gh-134062: ipaddress: fix collisions in __hash__() for
IPv4Network and IPv6Network objects.
- gh-123409: Fix ipaddress.IPv6Address.reverse_pointer output
according to RFC 3596, §2.5. Patch by Bénédikt Tran.
- bpo-43633: Improve the textual representation of
IPv4-mapped IPv6 addresses (RFC 4291 Sections 2.2, 2.5.5.2)
in ipaddress. Patch by Oleksandr Pavliuk.
- Remove upstreamed patches:
- gh-126572-test_ssl-no-stop-ThreadedEchoServer-OSError.patch
- CVE-2025-4516-DecodeError-handler.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python311?expand=0&rev=183
70 lines
1.8 KiB
Python
70 lines
1.8 KiB
Python
#!/usr/bin/python3
|
|
"""
|
|
Simple regexp-based skipped test checker.
|
|
It lists tests that are mentioned (presumably for exclusion)
|
|
in BASE, and in MAIN (presumably for inclusion)
|
|
and reports discrepancies.
|
|
|
|
This will have a number of
|
|
"""
|
|
|
|
MAIN = "python39.spec"
|
|
|
|
import glob
|
|
import re
|
|
from os.path import basename
|
|
|
|
alltests = set()
|
|
qemu_exclusions = set()
|
|
|
|
for item in glob.glob("Python-*/Lib/test/test_*"):
|
|
testname = basename(item)
|
|
if testname.endswith(".py"):
|
|
testname = testname[:-3]
|
|
alltests.add(testname)
|
|
|
|
testre = re.compile(r'[\s"](test_\w+)\b')
|
|
|
|
def find_tests_in_spec(specname):
|
|
global qemu_exclusions
|
|
|
|
found_tests = set()
|
|
with open(specname) as spec:
|
|
in_qemu = False
|
|
for line in spec:
|
|
line = line.strip()
|
|
if "#" in line:
|
|
line = line[:line.index("#")]
|
|
tests = set(testre.findall(line))
|
|
found_tests |= tests
|
|
if line == "%if 0%{?qemu_user_space_build} > 0":
|
|
in_qemu = True
|
|
if in_qemu:
|
|
if line == "%endif":
|
|
in_qemu = False
|
|
qemu_exclusions |= tests
|
|
return found_tests
|
|
|
|
excluded = find_tests_in_spec(MAIN)
|
|
|
|
#print("--- excluded tests:", " ".join(sorted(excluded)))
|
|
#print("--- included tests:", " ".join(sorted(included)))
|
|
|
|
mentioned = excluded
|
|
nonexistent = mentioned - alltests
|
|
missing = excluded - qemu_exclusions
|
|
|
|
print("--- the following tests are excluded for QEMU and not tested in python")
|
|
print("--- (that probably means we don't need to worry about them)")
|
|
for test in sorted(qemu_exclusions - excluded):
|
|
print(test)
|
|
|
|
print("--- the following tests might be excluded in python:")
|
|
for test in sorted(missing):
|
|
print(test)
|
|
|
|
if nonexistent:
|
|
print("--- the following tests don't exist:")
|
|
for test in sorted(nonexistent):
|
|
print(test)
|