tools/check-version-history: avoid DeprecationWarning with newer lxml

We get the same warning thousands of times:
/work/src/tools/check-version-history.py:28: FutureWarning: This search incorrectly
ignores the root element, and will be fixed in a future version. If you rely on the
current behaviour, change it to
"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='udev_device_get_properties_list_entry']"

We also need to update the ignorelist to the new form.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-03-25 17:16:16 +01:00
parent 9f9da8a1c6
commit 8d4eda524a
2 changed files with 579 additions and 579 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ def find_undocumented_functions(pages, ignorelist):
hist_section = pagetree.find("refsect1[title='History']")
for func in pagetree.findall("//funcprototype/funcdef/function"):
path = f"/refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='{func.text}']"
path = f"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='{func.text}']"
assert pagetree.findall(path) == [func]
if (
@@ -40,7 +40,7 @@ def construct_path(element):
tag = element.tag
if tag == "refentry":
return ""
return "."
predicate = ""
if tag == "varlistentry":
+577 -577
View File
File diff suppressed because it is too large Load Diff