Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxWarning: invalid escape sequence '\e' #181

Closed
dserodio opened this issue Jun 20, 2024 · 5 comments
Closed

SyntaxWarning: invalid escape sequence '\e' #181

dserodio opened this issue Jun 20, 2024 · 5 comments

Comments

@dserodio
Copy link

I have just installed litecli 1.11.0 via Homebrew, and when I launch it I get the following warning:

/opt/homebrew/Cellar/litecli/1.11.0/libexec/lib/python3.12/site-packages/litecli/main.py:332: SyntaxWarning: invalid escape sequence '\e'
  """Editor command is any query that is prefixed or suffixed by a '\e'.
/opt/homebrew/Cellar/litecli/1.11.0/libexec/lib/python3.12/site-packages/litecli/packages/special/iocommands.py:124: SyntaxWarning: invalid escape sequence '\e'
  pattern = re.compile("(^\\\e|\\\e$)")
/opt/homebrew/Cellar/litecli/1.11.0/libexec/lib/python3.12/site-packages/litecli/packages/special/iocommands.py:248: SyntaxWarning: invalid escape sequence '\d'
  match = re.search("\\?|\\$\d+", query)
/opt/homebrew/Cellar/litecli/1.11.0/libexec/lib/python3.12/site-packages/litecli/packages/parseutils.py:15: SyntaxWarning: invalid escape sequence '\s'
  "all_punctuations": re.compile("([^\s]+)$"),
/opt/homebrew/Cellar/litecli/1.11.0/libexec/lib/python3.12/site-packages/litecli/packages/parseutils.py:20: SyntaxWarning: invalid escape sequence '\d'
  """
/opt/homebrew/Cellar/litecli/1.11.0/libexec/lib/python3.12/site-packages/litecli/sqlcompleter.py:260: SyntaxWarning: invalid escape sequence '\$'
  self.name_pattern = compile("^[_a-z][_a-z0-9\$]*$")

My "default" python is 3.9.18, installed via asdf:

$ python -V
Python 3.9.18
$ which python
/Users/daniel.serodio/.asdf/shims/python
@dserodio
Copy link
Author

dserodio commented Jul 4, 2024

Nevermind, I can't reproduce it anymore

@dserodio dserodio closed this as completed Jul 4, 2024
@dandavison
Copy link

dandavison commented Aug 31, 2024

I got a similar error the first time I ran litecli. And for me also, it went away the second time I ran it. I'd vote for re-opening this.

litecli 1.11.0
Python 3.12.5
MacOS

I installed litecli with uv add litecli, and I'm invoking it from python with os.execvp("litecli", ["litecli", str(db.path)]).

/Users/dan/src/tringa/.venv/lib/python3.12/site-packages/litecli/main.py:332: SyntaxWarning: invalid escape sequence '\e'
  """Editor command is any query that is prefixed or suffixed by a '\e'.
/Users/dan/src/tringa/.venv/lib/python3.12/site-packages/litecli/packages/special/iocommands.py:124: SyntaxWarning: invalid escape sequence '\e'
  pattern = re.compile("(^\\\e|\\\e$)")
/Users/dan/src/tringa/.venv/lib/python3.12/site-packages/litecli/packages/special/iocommands.py:248: SyntaxWarning: invalid escape sequence '\d'
  match = re.search("\\?|\\$\d+", query)
/Users/dan/src/tringa/.venv/lib/python3.12/site-packages/litecli/packages/parseutils.py:15: SyntaxWarning: invalid escape sequence '\s'
  "all_punctuations": re.compile("([^\s]+)$"),
/Users/dan/src/tringa/.venv/lib/python3.12/site-packages/litecli/packages/parseutils.py:20: SyntaxWarning: invalid escape sequence '\d'
  """
/Users/dan/src/tringa/.venv/lib/python3.12/site-packages/litecli/sqlcompleter.py:260: SyntaxWarning: invalid escape sequence '\$'
  self.name_pattern = compile("^[_a-z][_a-z0-9\$]*$")

@dserodio
Copy link
Author

dserodio commented Sep 2, 2024

It's already been fixed by #180, but the fix hasn't been released yet

@dserodio
Copy link
Author

dserodio commented Sep 2, 2024

Hmmm that's weird. 1.11.1 was tagged in Github (and contains the fix) but not published to PyPi

@amjith
Copy link
Member

amjith commented Sep 3, 2024

My bad. I've released it now.

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

No branches or pull requests

3 participants