Public bug reported:

Ubuntu version: Ubuntu 24.04.1 LTS
hplib package: Installed: 3.23.12+dfsg0-0ubuntu5

The hplip package has errors in the regular expression patterns where
the strings are not raw strings and therefore has invalid escape
sequences.

These were reported by an an apt-upgrade. I expected it to pass without
errors, but this happened:

Setting up python3 (3.12.3-0ubuntu2) ...
running python rtupdate hooks for python3.12...
/usr/share/hplip/base/imagesize.py:186: SyntaxWarning: invalid escape sequence 
'\#'
  re.compile('\#define\s+\S+\s+\d+')     : ('image/x-xbitmap', xbmsize),
/usr/share/hplip/base/imagesize.py:187: SyntaxWarning: invalid escape sequence 
'\/'
  re.compile('\/\* XPM \*\/')            : ('image/x-xpixmap', xpmsize),
/usr/share/hplip/base/imagesize.py:189: SyntaxWarning: invalid escape sequence 
'\*'
  re.compile('^II\*\x00')                : ('image/tiff', tiffsize),
/usr/share/hplip/fax/ledmfax.py:46: SyntaxWarning: invalid escape sequence '\d'
  http_result_pat = re.compile(b"""HTTP/\d.\d\s(\d+)""", re.I)

The consequences of this is unknown, but it will likely make the code
unable to provide the correct image size for XBM images and possibly
some more.

** Affects: hplip (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to hplip in Ubuntu.
https://bugs.launchpad.net/bugs/2078417

Title:
  Invalid regexp patterns in imagesize.py and ledmfax.py

Status in hplip package in Ubuntu:
  New

Bug description:
  Ubuntu version: Ubuntu 24.04.1 LTS
  hplib package: Installed: 3.23.12+dfsg0-0ubuntu5

  The hplip package has errors in the regular expression patterns where
  the strings are not raw strings and therefore has invalid escape
  sequences.

  These were reported by an an apt-upgrade. I expected it to pass
  without errors, but this happened:

  Setting up python3 (3.12.3-0ubuntu2) ...
  running python rtupdate hooks for python3.12...
  /usr/share/hplip/base/imagesize.py:186: SyntaxWarning: invalid escape 
sequence '\#'
    re.compile('\#define\s+\S+\s+\d+')     : ('image/x-xbitmap', xbmsize),
  /usr/share/hplip/base/imagesize.py:187: SyntaxWarning: invalid escape 
sequence '\/'
    re.compile('\/\* XPM \*\/')            : ('image/x-xpixmap', xpmsize),
  /usr/share/hplip/base/imagesize.py:189: SyntaxWarning: invalid escape 
sequence '\*'
    re.compile('^II\*\x00')                : ('image/tiff', tiffsize),
  /usr/share/hplip/fax/ledmfax.py:46: SyntaxWarning: invalid escape sequence 
'\d'
    http_result_pat = re.compile(b"""HTTP/\d.\d\s(\d+)""", re.I)

  The consequences of this is unknown, but it will likely make the code
  unable to provide the correct image size for XBM images and possibly
  some more.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/2078417/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to