New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
element.getchildren() was removed from stdlib #57
Conversation
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
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? |
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. |
The test fails with python version 3.9 and up as soon as you use get_children() again. |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for finding this and adding a fix with a test -- this is great. :)
I requested a few changes to make the test more like the others. No worries about the YAML re-formatting -- it looks better than it did before now.
Thank you for the feedback. I hope I implemented it correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just waiting for builds to pass.
Thank you again for contributing!
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