Path: csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!bofh.it!news.nic.it!robomod From: Julian Gilbey Newsgroups: linux.debian.maint.python Subject: Re: Reaching team consensus on usage of py3versions -r and X-Python3-Version in Lintian Date: Wed, 19 Jan 2022 20:30:03 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Jan 19 19:02:21 2022 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.058 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, RDNS_NONE=0.793] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: X-Greylist: delayed 1578 seconds by postgrey-1.36 at bendel; Wed, 19 Jan 2022 19:02:06 UTC MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailing-List: archive/latest/19708 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/YehaAA5OT00BewGo@d-and-j.net Approved: robomod@news.nic.it Lines: 125 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Louis-Philippe =?iso-8859-1?Q?V=E9ronneau?= , debian-python@lists.debian.org X-Original-Date: Wed, 19 Jan 2022 18:35:44 +0000 X-Original-Message-ID: X-Original-References: <720b7ee0-6928-d095-c505-667c3bf20cd7@debian.org> Xref: csiph.com linux.debian.maint.python:13895 On Tue, Jan 18, 2022 at 03:37:13PM +0100, Thomas Goirand wrote: > On 1/17/22 18:47, Louis-Philippe Véronneau wrote: > > Hey folks, > > > > I'm following up on bug #1001677 [1] on the DPT's list to try to reach > > consensus, as I think the Lintian tags that were created to fix this bug > > are not recommending the proper thing. > > > > As a TL;DR for those of you who don't want to read the whole BTS thread, > > jdg saw that a bunch of packages were using `py3versions -r` in > > autopkgtests, and this fails when there's no X-Python3-Version variable > > in d/control. > > > > The fix that Lintian now proposes for packages that use `py3versions -r` > > in autopkgtests is to set X-Python3-Version. > > > > I think the proper fix would be to ask people to move away from > > `py3versions -r` if there is no X-Python3-Version, and use`py3versions > > -s` instead. > > [...] Dear all, The lintian maintainers have indeed taken this suggestion on board and have made most this change (modulo some minor wording differences): the current wording is attached below. I wonder whether with the use of py3versions --supported with X-Python3-Version present, the message should recommend removing the X-Python3-Version field as the preferred option, as it does with the other case? On some of the more general points, I scanned through every source package in unstable and found the following: * 6 packages use py3versions -d (--default) in their test suite; this is clearly an error in some packages (brial, ogre, sfepy, sinntp), and possibly an error in two others (numpy, scipy) - I haven't looked in detail at the last two * Quite a few packages use py3versions -i (--installed) in their test suite; this is almost certainly wrong (though it probably does the right thing in an autopkgtest if it depends on python3-all) As far as X-Python3-Version goes: * 5 packages have X-Python3-Version: ${python3:Versions}, which is surely wrong? * 2 packages have commented-out X-Python3-Version lines; these could probably just be removed * about 166 packages have X-Python3-Version: >= 3.x, where 0 <= x <= 3.7. All of these packages would work in oldstable (buster) or later without this line * 8 packages have >= 3.8 and 3 packages have >= 3.9; these would work in stable (bullseye) or later without this line * 6 packages have just 3.9 (calibre, pytorch-audio, pytorch-ignite, pytorch-text, pytorch-vision, skorch); these will no longer work in testing (bookworm) once Python has fully migrated to 3.10. * 6 packages have "all" or "current"; I have filed bug reports on these. So of the entire archive, only 6 packages have a correct and current use of X-Python3-Version. Here is the current Lintian wording: For use of py3versions --requested/-r without a corresponding X-Python3-Version: https://salsa.debian.org/lintian/lintian/-/blob/master/tags/d/declare-python-versions-for-test.tag Tag: declare-python-versions-for-test Severity: warning Check: testsuite Renamed-from: declare-requested-python-versions-for-test Explanation: The specified test attempts to query the Python versions requested by your sources with the command py3versions --requested but your sources do not declare any versions with the field X-Python3-Version. . Please choose between two suggested remedies: . In most circumstances, it is probably best to replace the argument --requested with --supported. That will exercise the test with all available Python versions. . Should your installable require only specific Python versions, please add the field X-Python3-Version with the appropriate information to the source stanza in the debian/control file. . No redirection of the output, as in 2 > /dev/null, is needed in either case. See-Also: py3versions(1), Bug#1001677 For the use of py3versions --supported/-s with the presence of X-Python3-Version (a rare occurrence): https://salsa.debian.org/lintian/lintian/-/blob/master/tags/q/query-declared-python-versions-in-test.tag Tag: query-declared-python-versions-in-test Severity: warning Check: testsuite Renamed-From: query-requested-python-versions-in-test Explanation: The specified test queries all supported Python versions with the command py3versions --supported but your sources request a specific set of versions via the field X-Python3-Version. . Please query only the requested versions with the command py3versions --requested. See-Also: py3versions(1), Bug#1001677 Best wishes, Julian