Skip to content

Python >3.6 yields deprecation warning for regex #50

@sdruskat

Description

@sdruskat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions