Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #13895

Re: Reaching team consensus on usage of py3versions -r and X-Python3-Version in Lintian

Path csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!bofh.it!news.nic.it!robomod
From Julian Gilbey <jdg@debian.org>
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 <DHoOD-7Xg-21@gated-at.bofh.it> (permalink)
References <DGEiK-3zd-9@gated-at.bofh.it> <DGXOq-8jZ-9@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Wed Jan 19 19:02:21 2022
Old-Return-Path <julian@d-and-j.net>
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 <debian-python@lists.debian.org> archive/latest/19708
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
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 Véronneau <pollo@debian.org>, debian-python@lists.debian.org
X-Original-Date Wed, 19 Jan 2022 18:35:44 +0000
X-Original-Message-ID <YehaAA5OT00BewGo@d-and-j.net>
X-Original-References <c37e2c8b-3b1a-17fc-79f1-25cef88d2cdf@debian.org> <720b7ee0-6928-d095-c505-667c3bf20cd7@debian.org>
Xref csiph.com linux.debian.maint.python:13895

Show key headers only | View raw


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
 <em>requested</em> by your sources with the command
 <code>py3versions --requested</code> but your sources do not declare
 any versions with the field <code>X-Python3-Version</code>.
 .
 Please choose between two suggested remedies:
 .
 In most circumstances, it is probably best to replace the argument
 <code>--requested</code> with <code>--supported</code>. That will
 exercise the test with all available Python versions.
 .
 Should your installable require only specific Python versions, please add
 the field <code>X-Python3-Version</code> with the appropriate information
 to the source stanza in the <code>debian/control</code> file.
 .
 No redirection of the output, as in <code>2 &gt; /dev/null</code>, 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 <em>supported</em> Python versions
 with the command <code>py3versions --supported</code> but your sources request
 a specific set of versions via the field <code>X-Python3-Version</code>.
 .
 Please query only the requested versions with the command
 <code>py3versions --requested</code>.
See-Also:
 py3versions(1),
 Bug#1001677


Best wishes,

   Julian

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Reaching team consensus on usage of py3versions -r and  X-Python3-Version in Lintian Louis-Philippe Véronneau <pollo@debian.org> - 2022-01-17 18:50 +0100
  Re: Reaching team consensus on usage of py3versions -r and  X-Python3-Version in Lintian Sandro Tosi <morph@debian.org> - 2022-01-17 21:00 +0100
  Re: Reaching team consensus on usage of py3versions -r and  X-Python3-Version in Lintian Neil Williams <codehelp@debian.org> - 2022-01-18 09:20 +0100
    Re: Reaching team consensus on usage of py3versions -r and X-Python3-Version in Lintian Scott Kitterman <debian@kitterman.com> - 2022-01-18 14:10 +0100
  Re: Reaching team consensus on usage of py3versions -r and  X-Python3-Version in Lintian Thomas Goirand <zigo@debian.org> - 2022-01-18 15:40 +0100
    Re: Reaching team consensus on usage of py3versions -r and  X-Python3-Version in Lintian Julian Gilbey <jdg@debian.org> - 2022-01-19 20:30 +0100

csiph-web