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

DeprecationWarnings emitted from re.compile #349

Closed
mattip opened this issue Sep 20, 2019 · 2 comments · Fixed by #389
Closed

DeprecationWarnings emitted from re.compile #349

mattip opened this issue Sep 20, 2019 · 2 comments · Fixed by #389

Comments

@mattip
Copy link

mattip commented Sep 20, 2019

Running python3.6 -mpytest tests raises a DeprecationWarning

tests/test_c_lexer.py:166
  /tmp/pycparser/tests/test_c_lexer.py:166: DeprecationWarning: invalid escape sequence \9
    '"jx\9"',

tests/test_c_lexer.py:169
  /tmp/pycparser/tests/test_c_lexer.py:169: DeprecationWarning: invalid escape sequence \9
    '"fo\9999999"',

-- Docs: https://docs.pytest.org/en/latest/warnings.html

It seems all the re.compile expressions should be using r raw strings?

xref numpy/numpy#14554

@eliben
Copy link
Owner

eliben commented Sep 20, 2019

Thanks for the report. I'll accept PRs to fix this

@eliben
Copy link
Owner

eliben commented Mar 3, 2020

I'm starting to plan for releasing a new version -- see #365

If you want this fix in, hurry up :-) I actually can't reproduce the warning, perhaps because I'm not using pytest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants