Closed namrathaurs closed 1 year ago
To fix the AttributeError
, that is caused due to the deprecation of getchildren()
method in the xml.etree.ElementTree module, on a system with Python 3.9, you need to patch the Frontend and Factory running GlideinWMS v3.10.2 with the file from this PR.
Frontend: replace /usr/lib/python3.6/site-packages/glideinwms/creation/lib/check_python3_expr.py
with the file here.
Factory: replace /usr/lib/python3.6/site-packages/glideinwms/creation/lib/check_python3_expr.py
with the file here.
After replacing the files, restart Factory and Frontend.
Fixes #299.
A quick search of the
AttributeError
revealed thatgetchildren()
method has been deprecated since Python 3.2 but has not been warned about until v3.8. Further, the deprecation has been removed in Python 3.9. [This was also suspected by Bruno Coimbra during a discussion]Ref: Python 3.8 documentation
As part of the investigation, also checked to compare the deprecated behavior of
getchildren()
[from Python 3.6] withlist()
from v3.8+ to make sure the outputs were identical (i.e. the result set and the type of the result). The outputs, along with their type, from the deprecated and the current approaches seems to be consistent with one another. (Thanks to @BrunoCoimbra for recommending to do this exercise as part of the investigation!)Following is the code snippet from the testing: ()