Possible MBF for SyntaxWarning with Python 3.8
Hi all,
Python 3.8 generates a SyntaxWarning when it sees code that is most probably
incorrect such as
if foo is 0:
...
if bar is not 'quux':
...
if baz is ():
...
When the Debian package is installed, py3compile sees such code and causes a
pile of SyntaxWarning messages to be spewed in the middle of the apt run.
Since code like the above is wrong and errors are unwelcome for the user (and
are likely to generate quite a lot of support requests), I propose an MBF on
the issue.
Looking through piuparts installation logs for packages in sid, I've so far
identified 75 binary packages that emit SyntaxWarning on installation, but that
is only the subset of python packages that happen to have been installed by
piuparts over the last 60 days. I guess we'll need to continue to look at
piuparts logs and that we will find more.
Any thoughts?
cheers
Stuart
raw entries from piuparts logs: https://people.debian.org/~stuart/swlog
data for bug reports: https://people.debian.org/~stuart/swbugs
ddlist: https://people.debian.org/~stuart/swddlist
bug template:
Subject: {package} generates SyntaxWarning at install time
Package: {package}
Version: {version}
Severity: important
Tags: sid bullseye
User: debian-python@lists.debian.org
Usertags: py38syntaxwarning
Dear maintainer,
Python 3.8 introduced a series of checks that look for code that is highly
likely to be buggy. When the code is processed by Python 3.8, it emits a
SyntaxWarning complaining about the code. For Debian packages, these
warnings will be visible at package install time.
This package generates SyntaxWarning output during package install:
{output}
Fixing this class of bug is generally straightforward and the upstream
developers may have already done so.
If there are questions, please ask for help on IRC #debian-python, or
the debian-python@lists.debian.org mailing list.
--
Stuart Prescott http://www.nanonanonano.net/ stuart@nanonanonano.net
Debian Developer http://www.debian.org/ stuart@debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
Reply to: