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

Modify GML test to fix invalid octal character warning. #7159

Merged
merged 3 commits into from Dec 17, 2023

Conversation

rossbar
Copy link
Contributor

@rossbar rossbar commented Dec 14, 2023

Closes #7149

@rossbar
Copy link
Contributor Author

rossbar commented Dec 14, 2023

I think there are actually two conflated problems:

  1. The string in the test is malformed (I don't think octals were intended) which is the cause of networkx-3.2.1_1: /usr/lib/python3.12/site-packages/networkx/readwrite/tests/test_gml.py:557: SyntaxWarning: invalid octal escape sequence '\420' #7149
  2. It's not clear what the test is supposed to capture, or whether the enforced behavior gml-compliant.

IMO issue 1 is the most pressing, which I'd advocate solving either by modifying the test as in 7e65b7d, or converting to true unicode (i.e. \u4200), or even deleting the test altogether. We can then address the question of how gml should handle unicode characters in a separate issue.

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.

Thansk @rossbar !

@dschult dschult merged commit f34dda2 into networkx:main Dec 17, 2023
39 checks passed
@jarrodmillman jarrodmillman added this to the 3.3 milestone Dec 17, 2023
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
* Modify GML test to fix invalid octal character warning.

* Switch to unicode char.

* Rm extra unicode string indicators.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants