Hi,

As I checked https://docs.python.org/3/whatsnew/3.12.html

   A backslash-character pair that is not a valid escape sequence now generates
   a SyntaxWarning, instead of DeprecationWarning. For example,
   re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an invalid escape
   sequence, use raw strings for regular expression: re.compile(r"\d+\.\d+")).
   In a future Python version, SyntaxError will eventually be raised, instead of
   SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)
   
I suppose I need to use raw string explicitly.

This is nasty change which affects many code out there.  Sigh.

Osamu

On Wed, 2024-03-06 at 22:43 -0800, Loren M. Lang wrote:
> Package: debmake
> Version: 4.4.0-3
> Severity: minor
> 
> Dear Maintainer,
> 
> Using debmake on unstable with Python 3.12 installed. While installing
> debmake with apt-get, a long series of warnings were produced similar to
> this:
> 
> Setting up debmake (4.4.0-3) ...
> /usr/lib/python3/dist-packages/debmake/__main__.py:304: SyntaxWarning: invalid
> escape sequence '\/'
>   + ' -type f 2>&1 | sed -e "s/^debian\/'
> /usr/lib/python3/dist-packages/debmake/__main__.py:306: SyntaxWarning: invalid
> escape sequence '\/'
>   + '\///" | sort >../{0}.install.log'.format(para["package"])
> 
> The package should install cleanly without warnings. These warnings do
> not seem to affect the functionality as Python 3.12 simply falls back to
> 3.11 behavior after producing the warning.
> 
> 
> -- System Information:
> Debian Release: trixie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 6.5.0-21-generic (SMP w/12 CPU threads; PREEMPT)
> Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
> Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: unable to detect
> 
> Versions of packages debmake depends on:
> ii  devscripts      2.23.7
> ii  dpkg-dev        1.22.4
> ii  python3         3.11.8-1
> ii  python3-debian  0.1.49
> ii  rsync           3.2.7-1+b1
> 
> Versions of packages debmake recommends:
> ii  build-essential  12.10
> ii  curl             8.6.0-3
> ii  strace           6.5-0.1
> ii  wget             1.21.4-1+b1
> 
> Versions of packages debmake suggests:
> ii  autotools-dev     20220109.1
> pn  ccache            <none>
> pn  cmake             <none>
> pn  debmake-doc       <none>
> pn  dgit              <none>
> ii  dh-autoreconf     20
> ii  dh-python         6.20231223
> ii  eatmydata         131-1
> pn  gem2deb           <none>
> ii  git               1:2.43.0-1
> ii  git-buildpackage  0.9.33
> pn  gitk              <none>
> pn  javahelper        <none>
> ii  lintian           2.117.0
> pn  mc                <none>
> ii  quilt             0.67+really0.67-4
> pn  rpm2cpio          <none>
> ii  sbuild            0.85.5
> 
> -- no debconf information

Reply via email to