HPLIP: SyntaxWarning, using is or is not, did you mean == or != ?

Bug #1870019 reported by Frans van Berckel
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
hplip (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

While running python rtupdate hooks for python3.8, got these warnings from the hplip-data package ...

/usr/share/hplip/base/utils.py:2060: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if weburl is "" or weburl is None:
/usr/share/hplip/check-plugin.py:116: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if log_level is 'debug':
/usr/share/hplip/check.py:685: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if 'getfacl' not in g and '' is not g and 'file' not in g:
/usr/share/hplip/installer/core_install.py:2037: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if home_dir is "":
/usr/share/hplip/ui5/devmgr_ext.py:15: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.latest_available_version is not "":
/usr/share/hplip/ui5/devmgr_ext.py:37: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.latest_available_version is not "":

Tags: focal
tags: added: focal
description: updated
summary: - SyntaxWarning
+ hplib: SyntaxWarning, did you mean "=="? or "!="?
summary: - hplib: SyntaxWarning, did you mean "=="? or "!="?
+ HPLIP: SyntaxWarning, did you mean "=="? or "!="?
summary: - HPLIP: SyntaxWarning, did you mean "=="? or "!="?
+ HPLIP: SyntaxWarning, did you mean ==? or !=?
summary: - HPLIP: SyntaxWarning, did you mean ==? or !=?
+ HPLIP: SyntaxWarning, did you mean == or != ?
description: updated
description: updated
description: updated
summary: - HPLIP: SyntaxWarning, did you mean == or != ?
+ HPLIP: SyntaxWarning, using is, is not, did you mean == or != ?
Changed in hplip (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
summary: - HPLIP: SyntaxWarning, using is, is not, did you mean == or != ?
+ HPLIP: SyntaxWarning, using is or is not, did you mean == or != ?
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

This is already fixed in Debian, in 3.20.3+dfsg0-2. I have synced this version to Ubuntu Focal now.

Changed in hplip (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 3.20.3+dfsg0-2

---------------
hplip (3.20.3+dfsg0-2) unstable; urgency=medium

  * Patch upstream for python3.8 support:
    - Fix SyntaxWarning: "is"/"is not" with a literal (Closes: #955168,
      #954732, LP: #1870019)
    - Assume the python3-distro package is available, depend on it
      (Closes: #955137)

 -- Didier Raboud <email address hidden> Wed, 01 Apr 2020 08:51:28 +0200

Changed in hplip (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Maurycy (mmaurycy) wrote :

22.04.2 LTS (Jammy Jellyfish) 64-bitowe MATE 1.26.0
HP Linux Imaging and Printing System (ver. 3.23.3)
HP Device Manager ver. 15.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

/usr/share/hplip/ui5/devmgr_ext.py:15: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.latest_available_version is not "":
/usr/share/hplip/ui5/devmgr_ext.py:37: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.latest_available_version is not "":
-Segmentation fault (core dumped)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.