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 '\.' #1154

Open
antonsoroko opened this issue Jul 11, 2024 · 1 comment
Open

SyntaxWarning: invalid escape sequence '\.' #1154

antonsoroko opened this issue Jul 11, 2024 · 1 comment

Comments

@antonsoroko
Copy link

antonsoroko commented Jul 11, 2024

Describe the bug

Not a "real" bug, but I noticed SyntaxWarning during upgrade to 1.6.6 on ubuntu 24.04 with python 3.12.
iirc python 3.12 does not like when raw strings are used as normal strings (i guess you wanted to use raw string r'.', but i might be wrong.)

Include the following information:

  • OpenSnitch version: 1.6.6
  • OS: Ubuntu
  • Version: 24.04
  • Window Manager: KDE5
  • Kernel version: 6.8.0-36-generic

To Reproduce
sudo apt install ./opensnitch_1.6.6-1_amd64.deb ./python3-opensnitch-ui_1.6.6-1_all.deb

Post error logs:

/usr/lib/python3/dist-packages/opensnitch/dialogs/prompt.py:608: SyntaxWarning: invalid escape sequence '\.'
  appimage_path = os.path.dirname(con.process_path).replace(".", "\.")

Expected behavior (optional)

Screenshots

Additional context

@akhepcat
Copy link

Apparently in newer pythons, the regular expressions should be written as raw strings: r"..." or have the backslashes quoted in the string

raw strings should be backward compatible.

(this is according to bug reports to hplip for the same thing)

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

2 participants