forked from pool/python39
- 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.
- gh-80222: Fix bug in the folding of quoted strings
when flattening an email message using a modern email
policy. Previously when a quoted string was folded so
that it spanned more than one line, the surrounding
quotes and internal escapes would be omitted. This could
theoretically be used to spoof header lines using a
carefully constructed quoted string if the resulting
rendered email was transmitted or re-parsed.
- 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
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python39?expand=0&rev=233
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)
|