warnings seen during pytest runs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

warnings seen during pytest runs

jclerman
Hello, and thank you for your work on Owlready!

I have noticed some warnings (regarding deprecated regex escape sequences) when testing projects that depend on Owlready2 (I am using the latest version, 0.44).  I don't think this issue has yet been resolved in the source code.

Here are the warnings I see:

../../Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/driver.py:160
  /Users/jclerman/Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/driver.py:160: DeprecationWarning: invalid escape sequence \s
    splitter = re.compile("\s")

../../Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/reasoning.py:30
  /Users/jclerman/Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/reasoning.py:30: DeprecationWarning: invalid escape sequence \s
    _HERMIT_RESULT_REGEXP = re.compile("^([A-Za-z]+)\\( ((?:<(?:[^>]+)>\s*)+) \\)$", re.MULTILINE)

../../Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/reasoning.py:31
  /Users/jclerman/Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/reasoning.py:31: DeprecationWarning: invalid escape sequence \s
    _HERMIT_PROP_REGEXP   = re.compile("^<([^>]+)> \\(known instances:\s*(.*?)(?:\s*\\|\s*)possible instances:\s*(.*?)\s*\\)", re.MULTILINE)

../../Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/reasoning.py:34
  /Users/jclerman/Library/Caches/pypoetry/virtualenvs/myproject-H7gjigDm-py3.8/lib/python3.8/site-packages/owlready2/reasoning.py:34: DeprecationWarning: invalid escape sequence \(
    _PELLET_DATA_PROP_REGEXP = re.compile("^DATAPROPVAL: ([^ ]+) ([^ ]+) literal\((.*),(.*?),(.*?)\)$", re.MULTILINE)

If there is a place I can file this as a bug, please let me know.  If you have plans to move this project over to GitHub, that'd be excellent!

Thanks,
--Jeff
Reply | Threaded
Open this post in threaded view
|

Re: warnings seen during pytest runs

Jiba
Administrator
Hello,

Reporting bugs here is fine for me.

I do not have these warnings, but they seems to be related to a problem in escape sequence in regexp.

I fixed the problem in the development version on Bitbucket, thanks for reporting.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: warnings seen during pytest runs

jclerman
Great; thank you!