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:
@@ -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
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user