Debian Bug report logs - #982298
dh-python: deprecated test command 'python3.9 setup.py test'

version graph

Package: dh-python; Maintainer for dh-python is Piotr Ożarowski <piotr@debian.org>; Source for dh-python is src:dh-python (PTS, buildd, popcon).

Reported by: Julian Gilbey <jdg@debian.org>

Date: Mon, 8 Feb 2021 13:27:02 UTC

Severity: normal

Found in version dh-python/4.20201102

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Piotr Ożarowski <piotr@debian.org>:
Bug#982298; Package dh-python. (Mon, 08 Feb 2021 13:27:04 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Gilbey <jdg@debian.org>:
New Bug report received and forwarded. Copy sent to Piotr Ożarowski <piotr@debian.org>. (Mon, 08 Feb 2021 13:27:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Julian Gilbey <jdg@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Mon, 08 Feb 2021 13:22:14 +0000
Package: dh-python
Version: 4.20201102
Severity: normal

I'm just building a Python module package, and I get the following
warning message:

I: pybuild base:232: python3.9 setup.py test 
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.

Since it is dh-python that runs this command, presumably it is
dh-python that should change it, or maybe I'm wrong?

Best wishes,

   Julian

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-3-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dh-python depends on:
ii  python3            3.9.1-1
ii  python3-distutils  3.9.1-2

dh-python recommends no packages.

Versions of packages dh-python suggests:
ii  dpkg-dev      1.20.7.1
ii  libdpkg-perl  1.20.7.1

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#982298; Package dh-python. (Mon, 08 Feb 2021 13:39:05 GMT) (full text, mbox, link).


Acknowledgement sent to Piotr Ożarowski <piotr@debian.org>:
Extra info received and forwarded to list. (Mon, 08 Feb 2021 13:39:05 GMT) (full text, mbox, link).


Message #10 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Piotr Ożarowski <piotr@debian.org>
To: Julian Gilbey <jdg@debian.org>
Cc: 982298@bugs.debian.org
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Mon, 8 Feb 2021 14:32:23 +0100
[Julian Gilbey, 2021-02-08]
> I: pybuild base:232: python3.9 setup.py test 
> running test
> WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
> 
> Since it is dh-python that runs this command, presumably it is
> dh-python that should change it, or maybe I'm wrong?

if your package uses pytest or nose{,2} then just add appropriate build
dependency (like: python3-pytest) and above command will not be used.
See pybuild's manual for more details



Information forwarded to debian-bugs-dist@lists.debian.org, Piotr Ożarowski <piotr@debian.org>:
Bug#982298; Package dh-python. (Tue, 09 Feb 2021 09:15:03 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Gilbey <jdg@debian.org>:
Extra info received and forwarded to list. Copy sent to Piotr Ożarowski <piotr@debian.org>. (Tue, 09 Feb 2021 09:15:03 GMT) (full text, mbox, link).


Message #15 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Julian Gilbey <jdg@debian.org>
To: 982298@bugs.debian.org
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Tue, 9 Feb 2021 09:12:38 +0000
On Mon, Feb 08, 2021 at 02:32:23PM +0100, Piotr Ożarowski wrote:
> [Julian Gilbey, 2021-02-08]
> > I: pybuild base:232: python3.9 setup.py test 
> > running test
> > WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
> > 
> > Since it is dh-python that runs this command, presumably it is
> > dh-python that should change it, or maybe I'm wrong?
> 
> if your package uses pytest or nose{,2} then just add appropriate build
> dependency (like: python3-pytest) and above command will not be used.
> See pybuild's manual for more details

Hi Piotr,

It doesn't: it uses unittest.  I guess I could depend on
python3-pytest anyway, and that might solve it, but it seems a little
strange to depend on python3-pytest when the package uses unittest.
But then maybe I haven't understood something correctly.

Best wishes,

   Julian



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#982298; Package dh-python. (Tue, 09 Feb 2021 09:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to Piotr Ożarowski <piotr@debian.org>:
Extra info received and forwarded to list. (Tue, 09 Feb 2021 09:36:04 GMT) (full text, mbox, link).


Message #20 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Piotr Ożarowski <piotr@debian.org>
To: Julian Gilbey <jdg@debian.org>, 982298@bugs.debian.org
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Tue, 9 Feb 2021 10:33:53 +0100
[Julian Gilbey, 2021-02-09]
> On Mon, Feb 08, 2021 at 02:32:23PM +0100, Piotr Ożarowski wrote:
> > [Julian Gilbey, 2021-02-08]
> > > I: pybuild base:232: python3.9 setup.py test 
> > > running test
> > > WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
> > > 
> > > Since it is dh-python that runs this command, presumably it is
> > > dh-python that should change it, or maybe I'm wrong?
> > 
> > if your package uses pytest or nose{,2} then just add appropriate build
> > dependency (like: python3-pytest) and above command will not be used.
> > See pybuild's manual for more details
> 
> It doesn't: it uses unittest.  I guess I could depend on
> python3-pytest anyway, and that might solve it, but it seems a little
> strange to depend on python3-pytest when the package uses unittest.
> But then maybe I haven't understood something correctly.

actually… pybuild should invoke something like this:
`{interpreter} -m unittest discover -v {args}`
so I don't know where "setup.py test" came from. Can you point me to
your package?



Information forwarded to debian-bugs-dist@lists.debian.org, Piotr Ożarowski <piotr@debian.org>:
Bug#982298; Package dh-python. (Tue, 09 Feb 2021 10:57:06 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Gilbey <jdg@debian.org>:
Extra info received and forwarded to list. Copy sent to Piotr Ożarowski <piotr@debian.org>. (Tue, 09 Feb 2021 10:57:06 GMT) (full text, mbox, link).


Message #25 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Julian Gilbey <jdg@debian.org>
To: 982298@bugs.debian.org
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Tue, 9 Feb 2021 10:56:50 +0000
On Tue, Feb 09, 2021 at 10:33:53AM +0100, Piotr Ożarowski wrote:
> [Julian Gilbey, 2021-02-09]
> > > if your package uses pytest or nose{,2} then just add appropriate build
> > > dependency (like: python3-pytest) and above command will not be used.
> > > See pybuild's manual for more details
> > 
> > It doesn't: it uses unittest.  I guess I could depend on
> > python3-pytest anyway, and that might solve it, but it seems a little
> > strange to depend on python3-pytest when the package uses unittest.
> > But then maybe I haven't understood something correctly.
> 
> actually… pybuild should invoke something like this:
> `{interpreter} -m unittest discover -v {args}`
> so I don't know where "setup.py test" came from. Can you point me to
> your package?

That's strange, then.

Here's the package (not yet in the Debian archive):
https://salsa.debian.org/python-team/packages/jsx-lexer

Best wishes,

   Julian



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#982298; Package dh-python. (Tue, 09 Feb 2021 11:27:05 GMT) (full text, mbox, link).


Acknowledgement sent to Piotr Ożarowski <piotr@debian.org>:
Extra info received and forwarded to list. (Tue, 09 Feb 2021 11:27:05 GMT) (full text, mbox, link).


Message #30 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Piotr Ożarowski <piotr@debian.org>
To: Julian Gilbey <jdg@debian.org>, 982298@bugs.debian.org
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Tue, 9 Feb 2021 12:26:04 +0100
> > actually… pybuild should invoke something like this:
> > `{interpreter} -m unittest discover -v {args}`
> > so I don't know where "setup.py test" came from. Can you point me to

pybuild *does* that for distutils plugin. I will not change it in this
release cycle as I don't know how many packages depend on that



Information forwarded to debian-bugs-dist@lists.debian.org, Piotr Ożarowski <piotr@debian.org>:
Bug#982298; Package dh-python. (Tue, 09 Feb 2021 13:45:06 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Gilbey <jdg@debian.org>:
Extra info received and forwarded to list. Copy sent to Piotr Ożarowski <piotr@debian.org>. (Tue, 09 Feb 2021 13:45:06 GMT) (full text, mbox, link).


Message #35 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Julian Gilbey <jdg@debian.org>
To: 982298@bugs.debian.org
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Tue, 9 Feb 2021 13:42:18 +0000
On Tue, Feb 09, 2021 at 12:26:04PM +0100, Piotr Ożarowski wrote:
> > > actually… pybuild should invoke something like this:
> > > `{interpreter} -m unittest discover -v {args}`
> > > so I don't know where "setup.py test" came from. Can you point me to
> 
> pybuild *does* that for distutils plugin. I will not change it in this
> release cycle as I don't know how many packages depend on that

Indeed - changing it in this release cycle would be very unwise!

Best wishes,

   Julian



Message sent on to Julian Gilbey <jdg@debian.org>:
Bug#982298. (Fri, 22 Oct 2021 17:57:02 GMT) (full text, mbox, link).


Message #38 received at 982298-submitter@bugs.debian.org (full text, mbox, reply):

From: Stefano Rivera <stefanor@debian.org>
To: 982298-submitter@bugs.debian.org
Subject: Bug#982298 marked as pending in dh-python
Date: Fri, 22 Oct 2021 17:55:39 +0000
Control: tag -1 pending

Hello,

Bug #982298 in dh-python reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/python-team/tools/dh-python/-/commit/9ad61f341bd410f93b976651010681748594a3e0

------------------------------------------------------------------------
pybuild: Avoid calling deprecated "setup.py test", instead use unittest discover. (closes: #982298)
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/982298



Added tag(s) pending. Request was from Stefano Rivera <stefanor@debian.org> to 982298-submitter@bugs.debian.org. (Fri, 22 Oct 2021 17:57:02 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Piotr Ożarowski <piotr@debian.org>:
Bug#982298; Package dh-python. (Fri, 22 Oct 2021 18:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Piotr Ożarowski <piotr@debian.org>. (Fri, 22 Oct 2021 18:09:03 GMT) (full text, mbox, link).


Message #45 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Stefano Rivera <stefanor@debian.org>
To: Piotr Ożarowski <piotr@debian.org>, 982298@bugs.debian.org
Cc: Julian Gilbey <jdg@debian.org>
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Fri, 22 Oct 2021 11:06:02 -0700
Hi Piotr (2021.02.09_03:26:04_-0800)
> > > actually… pybuild should invoke something like this:
> > > `{interpreter} -m unittest discover -v {args}`
> > > so I don't know where "setup.py test" came from. Can you point me to
> 
> pybuild *does* that for distutils plugin. I will not change it in this
> release cycle as I don't know how many packages depend on that

It's the next cycle, so let's do this.

I'm doing some testing to see what effect this will have. There are
about 500 affected packages, as far as I can tell.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272



Message sent on to Julian Gilbey <jdg@debian.org>:
Bug#982298. (Fri, 22 Oct 2021 18:27:02 GMT) (full text, mbox, link).


Message #48 received at 982298-submitter@bugs.debian.org (full text, mbox, reply):

From: Stefano Rivera <stefanor@debian.org>
To: 982298-submitter@bugs.debian.org
Subject: Bug#982298 marked as pending in dh-python
Date: Fri, 22 Oct 2021 18:24:45 +0000
Control: tag -1 pending

Hello,

Bug #982298 in dh-python reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/python-team/tools/dh-python/-/commit/cd8a18e2677a803c654c1807026a403fac976a5a

------------------------------------------------------------------------
Revert "pybuild: Avoid calling deprecated "setup.py test", instead use unittest discover. (closes: #982298)"

This reverts commit 9ad61f341bd410f93b976651010681748594a3e0.

Need to do an urgent upload and this isn't sufficiently tested, yet.
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/982298



Information forwarded to debian-bugs-dist@lists.debian.org, Piotr Ożarowski <piotr@debian.org>:
Bug#982298; Package dh-python. (Sun, 24 Oct 2021 02:06:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Piotr Ożarowski <piotr@debian.org>. (Sun, 24 Oct 2021 02:06:03 GMT) (full text, mbox, link).


Message #53 received at 982298@bugs.debian.org (full text, mbox, reply):

From: Stefano Rivera <stefanor@debian.org>
To: 982298@bugs.debian.org
Cc: Piotr Ożarowski <piotr@debian.org>, Julian Gilbey <jdg@debian.org>
Subject: Re: Bug#982298: dh-python: deprecated test command 'python3.9 setup.py test'
Date: Sat, 23 Oct 2021 19:02:49 -0700
Hi Piotr (2021.10.22_11:06:02_-0700)
> I'm doing some testing to see what effect this will have. There are
> about 500 affected packages, as far as I can tell.

So, about 50 of them fail to build with this change (and a couple go
from FTBFS to building successfully):

--- setuppy-test-failed	2021-10-24 01:50:12.702126456 +0000
+++ unittest-failed	2021-10-24 01:50:21.006070451 +0000
@@ -1,29 +1,75 @@
+autopep8_1.5.7-1_arm64.build:Status: attempted
+black_21.4b2-3_arm64.build:Status: attempted
 blessings_1.6-3_arm64.build:Status: attempted
-blist_1.3.6-7_arm64.build:Status: attempted
+debmutate_0.45_arm64.build:Status: attempted
+django-classy-tags_2.0.0-1_arm64.build:Status: attempted
+django-guardian_2.4.0-1_arm64.build:Status: attempted
+django-prometheus_2.1.0-1_arm64.build:Status: attempted
+django-recurrence_1.10.3-1_arm64.build:Status: attempted
 django-restricted-resource_2016.8-3_arm64.build:Status: attempted
+django-sekizai_2.0.0-4_arm64.build:Status: attempted
 doxypypy_0.8.8.6-4_arm64.build:Status: attempted
+elasticsearch-curator_5.8.1-1_arm64.build:Status: attempted
+factory-boy_2.11.1-3_arm64.build:Status: attempted
 fail2ban_0.11.2-2_arm64.build:Status: attempted
+flask-autoindex_0.6.6-2_arm64.build:Status: attempted
 flask-migrate_2.6.0-1_arm64.build:Status: attempted
+flask-testing_0.8.1-1_arm64.build:Status: attempted
 frozen-flask_0.11-3.1_arm64.build:Status: attempted
 glue_0.13-5_arm64.build:Status: attempted
 hydroffice.bag_0.2.15-3_arm64.build:Status: attempted
 khard_0.17.0-2_arm64.build:Status: attempted
+lazr.uri_1.0.6-1_arm64.build:Status: attempted
+lesana_0.8.1-1_arm64.build:Status: attempted
+lttnganalyses_0.6.1-2_arm64.build:Status: attempted
+magic-wormhole_0.12.0-1_arm64.build:Status: attempted
+manuel_1.10.1-2_arm64.build:Status: attempted
+mmllib_0.3.0.post1-2_arm64.build:Status: attempted
+multiprocess_0.70.12.2-1_arm64.build:Status: attempted
 nose_1.3.7-7_arm64.build:Status: attempted
 objgraph_3.5.0-3_arm64.build:Status: attempted
 pelican_4.0.1+dfsg-1.1_arm64.build:Status: attempted
+pocketsphinx-python_0.1.15-2_arm64.build:Status: attempted
+ponyorm_0.7.14-1_arm64.build:Status: attempted
+powerline_2.8.2-1_arm64.build:Status: attempted
 pygithub_1.43.7-1_arm64.build:Status: attempted
 pyliblo_0.10.0-4_arm64.build:Status: attempted
+pyramid-jinja2_2.7+dfsg-1.2_arm64.build:Status: attempted
 pyro4_4.80-1_arm64.build:Status: attempted
+pytables_3.6.1-5_arm64.build:Status: attempted
+python-applicationinsights_0.11.10-1_arm64.build:Status: attempted
+python-argcomplete_1.12.3-0.1_arm64.build:Status: attempted
+python-bitcoinlib_0.11.0-1_arm64.build:Status: attempted
+python-chameleon_3.8.1-1_arm64.build:Status: attempted
+python-ciso8601_2.2.0-1_arm64.build:Status: attempted
+python-configargparse_1.2.3-1_arm64.build:Status: attempted
+python-django-bootstrap-form_3.4-5_arm64.build:Status: attempted
+python-django-colorfield_0.4.5+ds1-1_arm64.build:Status: attempted
+python-django-ical_1.8.0-1_arm64.build:Status: attempted
 python-django-imagekit_4.0.2-3_arm64.build:Status: attempted
 python-django-registration_2.2-5_arm64.build:Status: attempted
+python-django-swapper_1.1.2-2_arm64.build:Status: attempted
+python-funcsigs_1.0.2-5_arm64.build:Status: attempted
 python-jsmin_2.2.2-2_arm64.build:Status: attempted
+python-launchpadlib_1.10.14-1_arm64.build:Status: attempted
+python-libais_0.17+git.20190917.master.e464cf8-2_arm64.build:Status: attempted
 python-libusb1_1.9.1-1_arm64.build:Status: attempted
+python-mpv_0.5.2-1_arm64.build:Status: attempted
+python-ofxhome_0.3.3-3_arm64.build:Status: attempted
+python-phabricator_0.7.0-1.1_arm64.build:Status: attempted
 python-pkginfo_1.4.2-3_arm64.build:Status: attempted
+python-pulp_2.5.1+dfsg-2_arm64.build:Status: attempted
+python-pylibdmtx_0.1.9-3_arm64.build:Status: attempted
 python-pyramid-multiauth_0.8.0-1.1_arm64.build:Status: attempted
 python-pyramid-zcml_1.0.0-1.2_arm64.build:Status: attempted
 python-slimmer_0.1.30-8_arm64.build:Status: attempted
-pytrainer_2.0.2-2_arm64.build:Status: attempted
+python-wadllib_1.3.6-1_arm64.build:Status: attempted
+python-zstd_1.4.5.1-3_arm64.build:Status: attempted
 pyvirtualdisplay_0.2.1-3_arm64.build:Status: attempted
-retweet_0.10-1.1_arm64.build:Status: attempted
+pyzbar_0.1.8-3_arm64.build:Status: attempted
+quark-sphinx-theme_0.5.1-2_arm64.build:Status: attempted
+silver-platter_0.4.3-1_arm64.build:Status: attempted
 simpleeval_0.9.10-1_arm64.build:Status: attempted
 supervisor_4.2.2-2_arm64.build:Status: attempted
+supysonic_0.6.2+ds-3_arm64.build:Status: attempted
+toro_1.0.1-4_arm64.build:Status: attempted

That's enough that I'm not about to just upload this to unstable, unless
someone persuades me that it's a good idea to.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272



Removed tag(s) pending. Request was from Stefano Rivera <stefanor@debian.org> to control@bugs.debian.org. (Sat, 20 Aug 2022 15:57:06 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Jun 19 16:14:00 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.