dbcli / pgspecial

Python implementation of postgres meta commands (backslash commands)
BSD 3-Clause "New" or "Revised" License
74 stars 54 forks source link

Fix a number of places where literal backslashes in Python strings should have been escaped #105

Closed musicinmybrain closed 3 years ago

musicinmybrain commented 3 years ago

Description

This fixes cases where a backslash appears unescaped in a (normal) Python string and is not part of an escape sequence recognized by Python itself. This fixes many occurrences of DeprecationWarning, particularly but not exclusively in test_specials.py.

While I tried to imitate local style and minimize changes in this PR, it seems to me that the project would benefit from choosing either backslash escaping ("\\") or raw strings (r"\") and sticking with one or the other in almost all cases.

Checklist

j-bennet commented 3 years ago

Nice. Thank you!