mloesch / sickle

Sickle: OAI-PMH for Humans
Other
106 stars 42 forks source link

Python >3.6 yields deprecation warning for regex #50

Open sdruskat opened 3 years ago

sdruskat commented 3 years ago

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.

https://github.com/mloesch/sickle/blob/14ef88e1aecce1b767ef7a3824e90c009899e1f7/sickle/utils.py#L20 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.