Skip to content
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

Future proof xml parsing in graphml. #7360

Merged
merged 1 commit into from Mar 20, 2024

Conversation

rossbar
Copy link
Contributor

@rossbar rossbar commented Mar 19, 2024

As of Python 3.12, the lxml tree parser raises a warning about evaluating truthiness of elements directly, instead recommending an is not None or len() test. For an example of the warnings, see the warning logs on any of the Python 3.12 tests in actions, e.g. https://github.com/networkx/networkx/actions/runs/8349137374/job/22852640690

As of Python 3.12, the lxml tree parser raises a warning about
evaluating truthiness of elements directly, instead recommending
an is not None or len() test.
Copy link
Member

@dschult dschult left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice -- Thanks!

@dschult dschult merged commit bc94afe into networkx:main Mar 20, 2024
42 checks passed
@jarrodmillman jarrodmillman added this to the 3.3 milestone Mar 20, 2024
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
As of Python 3.12, the lxml tree parser raises a warning about
evaluating truthiness of elements directly, instead recommending
an is not None or len() test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants