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

Python >3.6 yields deprecation warning for regex #50

Open
sdruskat opened this issue Jun 8, 2021 · 0 comments
Open

Python >3.6 yields deprecation warning for regex #50

sdruskat opened this issue Jun 8, 2021 · 0 comments

Comments

@sdruskat
Copy link

sdruskat commented Jun 8, 2021

Hello, and thanks for this great project.

I'm running Sickle on Python 3.8.5, but this issue seems to be valid for Python 3.6 upwards due to a change in re it seems.

return re.search('(\{.*\})', element.tag).group(1)
yields the following warning (running via pytest for this specific instance):

venv/lib/python3.8/site-packages/sickle/utils.py:20
  /home/user/src/venv/lib/python3.8/site-packages/sickle/utils.py:20: DeprecationWarning: invalid escape sequence \{
    return re.search('(\{.*\})', element.tag).group(1)

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

Seems to be something that's promising an easy fix, and I'll see if I can find the time to submit a PR for this.

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

No branches or pull requests

1 participant