Re: Did Python 3.12 developers honestly broke special regexp sequences? (Was: hatop fails its autopkg tests with Python 3.12)

2024-02-14 Thread Stéphane Blondon
Hello Andreas, On 13/02/2024 18:21, Andreas Tille wrote: I was constantly shaking my had above bug #1061802 featuring Syntaxwarnings like SyntaxWarning: invalid escape sequence '\.' 573s CLI_INPUT_RE = re.compile('[a-zA-Z0-9_:\.\-\+; /#%]') 573s

Re: Did Python 3.12 developers honestly broke special regexp sequences? (Was: hatop fails its autopkg tests with Python 3.12)

2024-02-13 Thread Simon McVittie
On Tue, 13 Feb 2024 at 18:21:17 +0100, Andreas Tille wrote: > SyntaxWarning: invalid escape sequence '\.' > 573s CLI_INPUT_RE = re.compile('[a-zA-Z0-9_:\.\-\+; /#%]') This should be: re.compile(r'[a-zA-Z0-9_:\.\-\+; /#%]') ^ a raw string, where the backslashes are not

Did Python 3.12 developers honestly broke special regexp sequences? (Was: hatop fails its autopkg tests with Python 3.12)

2024-02-13 Thread Andreas Tille
Hi, I was constantly shaking my had above bug #1061802 featuring Syntaxwarnings like SyntaxWarning: invalid escape sequence '\.' 573s CLI_INPUT_RE = re.compile('[a-zA-Z0-9_:\.\-\+; /#%]') 573s /tmp/autopkgtest.G4v4eK/autopkgtest_tmp/hatop.py:215: SyntaxWarning: invalid escape sequence '\s'