47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
Description: fix build with Python 3.11
|
|
Author: Dmitry Shachnev <mitya57@debian.org>
|
|
Last-Update: 2023-01-08
|
|
|
|
--- a/src/3rdparty/chromium/tools/grit/grit/util.py
|
|
+++ b/src/3rdparty/chromium/tools/grit/grit/util.py
|
|
@@ -211,7 +211,7 @@ def ReadFile(filename, encoding):
|
|
mode = 'rb'
|
|
encoding = None
|
|
else:
|
|
- mode = 'rU'
|
|
+ mode = 'r'
|
|
|
|
with io.open(abs(filename), mode, encoding=encoding) as f:
|
|
return f.read()
|
|
--- a/src/3rdparty/chromium/tools/metrics/structured/model.py
|
|
+++ b/src/3rdparty/chromium/tools/metrics/structured/model.py
|
|
@@ -26,7 +26,7 @@ _METRIC_TYPE = models.ObjectNodeType(
|
|
'metric',
|
|
attributes=[
|
|
('name', unicode, r'^[A-Za-z0-9_.]+$'),
|
|
- ('kind', unicode, r'^(?i)(|hashed-string|int)$'),
|
|
+ ('kind', unicode, r'(?i)^(|hashed-string|int)$'),
|
|
],
|
|
alphabetization=[
|
|
(_OBSOLETE_TYPE.tag, lambda _: 1),
|
|
--- a/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
|
|
+++ b/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
|
|
@@ -42,7 +42,7 @@ _INDEX_TYPE = models.ObjectNodeType(
|
|
_STATISTICS_TYPE = models.ObjectNodeType(
|
|
'statistics',
|
|
attributes=[
|
|
- ('export', str, r'^(?i)(|true|false)$'),
|
|
+ ('export', str, r'(?i)^(|true|false)$'),
|
|
],
|
|
children=[
|
|
models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False),
|
|
@@ -94,7 +94,7 @@ _EVENT_TYPE = models.ObjectNodeType(
|
|
'event',
|
|
attributes=[
|
|
('name', str, r'^[A-Za-z0-9.]+$'),
|
|
- ('singular', str, r'^(?i)(|true|false)$'),
|
|
+ ('singular', str, r'(?i)^(|true|false)$'),
|
|
],
|
|
alphabetization=[
|
|
(_OBSOLETE_TYPE.tag, _KEEP_ORDER),
|