Skip to content

Use raw-strings for regex strings to suppress python 3.12 warnings - #33

Open
oboehmer wants to merge 1 commit into
sileht:masterfrom
oboehmer:fix-regex
Open

oboehmer wants to merge 1 commit into
sileht:masterfrom
oboehmer:fix-regex

Conversation

@oboehmer

@oboehmer oboehmer commented Jan 7, 2026

Copy link
Copy Markdown

python 3.12 complains about invalid escape sequences in regex strings, which should be specified as raw strings

.venv/lib/python3.12/site-packages/jsonpath_rw_ext/_string.py:19: SyntaxWarning: invalid escape sequence '\('
   SUB = re.compile("sub\(/(.*)/,\s+(.*)\)")
.venv/lib/python3.12/site-packages/jsonpath_rw_ext/_string.py:20: SyntaxWarning: invalid escape sequence '\('
   SPLIT = re.compile("split\((.),\s+(\d+),\s+(\d+|-1)\)")

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

Successfully merging this pull request may close these issues.

1 participant