edgewall / genshi

Python toolkit for generation of output for the web
http://genshi.edgewall.org
Other
86 stars 35 forks source link

element.getchildren() was removed from stdlib #57

Closed jvllmr closed 2 years ago

jvllmr commented 2 years ago

The method was removed with version 3.9 of the standard library: https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren

FelixSchwarz commented 2 years ago

Thank you for the patch, looks good to me. Any idea why this did not show up in our test suite? Could you provide a simple test case which fails unless the change is applied?

jvllmr commented 2 years ago

I added tests. I also added a .gitignore and make the github workflow runnable in PRs to ease contributions to this project. I didn't really know how to assert the return value, so I just asserted to crucial properties.

jvllmr commented 2 years ago

The test fails with python version 3.9 and up as soon as you use get_children() again.

jvllmr commented 2 years ago

Oh I just realised that my auto-formatter formatted the .yaml file without my intend. I hope you don't mind. I can change it back otherwise.

jvllmr commented 2 years ago

Thank you for the feedback. I hope I implemented it correctly.