django-treewidget
django-treewidget copied to clipboard
Warning in runtime (py 3.12)
Getting this message every time when app is starting up:
/usr/local/lib/python3.12/site-packages/treewidget/fields.py:142: SyntaxWarning: invalid escape sequence '/'
https://github.com/netzkolchose/django-treewidget/blob/48d83398a33b11a6083436a3c8b427edbc297ab2/treewidget/fields.py#L142
should be:
'json_data': mark_safe(json_data.replace('</script', '<\\/script')),
Seems python 3.12 is more strict about that than older versions.
Edit: It still works as intended in 3.12 (just tested with python:slim docker image), my guess is, that they disable this quirk with some later version though.