cef/chromium-142-python-3.9-ftbfs.patch
Than Ngo dde15b4d42 Update to 142.0.7444.59
- * Update to cef-142.0.6+ga56110d (Asahi Lina) (beta)
- * Refreshed ppc64le patches
- * Refreshed system-brotli patch
- * Refreshed clang++-unknown-argument patch
- * Refreshed split-threshold-for-reg-with-hint patch
- * Fixed some FTBFS caused by missing header files
- * Fixed FTBFS caused by old rust compiler
- * Fixed FTBFS caused by new glibc-2.42 in Rawhide
- * Fixed FTBFS caused by old python-3.9.x in EL8/9
- * Dropped obsoleted chromium-141-el9-ffmpeg-5.x-duration.patch for old ffmpeg on EL9
2025-10-30 21:57:11 +09:00

65 lines
2.5 KiB
Diff

Fix FTBFS caused by old python-3.9.x on el9
File "/builddir/build/BUILD/chromium-142.0.7444.52/tools/metrics/histograms/extract_histograms.py", line 81, in EnumDict
type: str | None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
File "/builddir/build/BUILD/chromium-142.0.7444.52/tools/metrics/histograms/extract_histograms.py", line 106, in <module>
) -> tuple[str | None, ExtractionErrors]:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
File "/builddir/build/BUILD/chromium-142.0.7444.52/tools/metrics/histograms/extract_histograms.py", line 643, in <module>
def _GetObsoleteReason(node: xml.dom.minidom.Element) -> str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
diff -up chromium-142.0.7444.52/tools/metrics/histograms/extract_histograms.py.me chromium-142.0.7444.52/tools/metrics/histograms/extract_histograms.py
--- chromium-142.0.7444.52/tools/metrics/histograms/extract_histograms.py.me 2025-10-28 20:14:35.609014587 +0100
+++ chromium-142.0.7444.52/tools/metrics/histograms/extract_histograms.py 2025-10-28 20:30:30.123641508 +0100
@@ -21,6 +21,7 @@ from typing import Any, TypedDict
import xml.dom.minidom
import histogram_configuration_model
+from typing import Optional, Union
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common'))
import xml_utils
@@ -78,7 +79,7 @@ class EnumDict(TypedDict, total=False):
"""A dict representing an enum."""
name: str
- type: str | None
+ type: Optional[str]
buckets: list[_BucketDict]
summary: str
@@ -102,7 +103,7 @@ def ExpandHistogramNameWithSuffixes(
suffix_name: str,
histogram_name: str,
histogram_suffixes_node: xml.dom.minidom.Element,
-) -> tuple[str | None, ExtractionErrors]:
+) -> tuple[Optional[str], ExtractionErrors]:
"""Creates a new histogram name based on a histogram suffix.
Args:
@@ -304,7 +305,7 @@ def _ExtractOwners(node: xml.dom.minidom
def _ExtractImprovementDirection(
histogram_node: xml.dom.minidom.Element,
-) -> tuple[str | None, ExtractionErrors]:
+) -> tuple[Union[str, None], ExtractionErrors]:
"""Extracts improvement direction from the given histogram element, if any.
Args:
@@ -639,7 +640,7 @@ def ExtractVariantsFromXmlTree(
return variants_dict, errors
-def _GetObsoleteReason(node: xml.dom.minidom.Element) -> str | None:
+def _GetObsoleteReason(node: xml.dom.minidom.Element) -> Optional[str]:
"""If the node's histogram is obsolete, returns a string explanation.
Otherwise, returns None.