py3compile should not emit python runtime warnings during dist-upgrade

Bug #1863195 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dh-python (Ubuntu)
Confirmed
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned

Bug Description

py3compile should compile without emitting python runtime warnings

on dist-upgrade from bionic to focal a tonne of RuntimeWarnings are emitted during apt upgrade, due to buffering=1 being deprecated.

We will not fix all the packages, and these warnings are not helpful to the users, as they cannot and shouldn't need to do anything about them, as they come from packages that are maintained by the distro.

Imho py3compile should execute python interpreter with -W ignore

Or maybe set PYTHONWARNINGS=ignore in the environment during the upgrade?

summary: - py3compile should compile without emitting python runtime warnings
+ py3compile should not emit python runtime warnings during dist-upgrade
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Setting up printer-driver-hpcups (3.19.12+dfsg0-3ubuntu1) ...
Setting up gir1.2-freedesktop:amd64 (1.62.0-4ubuntu3) ...
Setting up ubuntu-drivers-common (1:0.7.7) ...
/usr/lib/python3.8/subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdin = io.open(p2cwrite, 'wb', bufsize)
/usr/lib/python3.8/subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdin = io.open(p2cwrite, 'wb', bufsize)
Setting up linux-generic (5.4.0.14.17) ...
Setting up python3-talloc:amd64 (2.3.0-3ubuntu1) ...
Setting up hplip-data (3.19.12+dfsg0-3ubuntu1) ...
/usr/lib/python3.8/subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdin = io.open(p2cwrite, 'wb', bufsize)
/usr/share/hplip/base/utils.py:2063: 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 "":
Setting up samba-libs:amd64 (2:4.11.1+dfsg-3ubuntu4) ...
Setting up libswresample3:amd64 (7:4.2.2-1build1) ...

and similar.

We cannot, and will not fix them all.

Changed in dh-python (Ubuntu):
status: New → Confirmed
tags: removed: champagne
tags: added: id-5e4eb9bd8595f13168db02d2
Revision history for this message
Stefano Rivera (stefanor) wrote :

> Or maybe set PYTHONWARNINGS=ignore in the environment during the upgrade?

That sounds more like it. Wouldn't we want to see these in other situations?

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

Other bug subscribers

Remote bug watches

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