[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [MBF] pybuild: Stop calling setup.py test?



On 2022-12-10 17 h 09, Colin Watson wrote:
On Mon, Aug 15, 2022 at 06:27:22PM +0000, Stefano Rivera wrote:
Calling "setup.py test" has been deprecated since setuptools 28.5.
That's 6 years ago.

pybuild calls currently setup.py test, when it can see that the package
supports it, and another test runner hasn't been selected. I looked at
dropping support for this (https://bugs.debian.org/982298) last year.
I did some test builds and decided that breaking 50 odd packages to stop
calling setup.py test wasn't worth it.

I spent a bit of time this weekend converting some packages that I'm
interested in to use the pytest runner, focusing first on ones that were
using nose but also a few from this list (lazr.uri, python-wadllib,
zope.interface).

I needed a couple of workarounds, some due to packages using
importlib.metadata to get their own version at import time (typified by
the rather messy
https://salsa.debian.org/python-team/packages/lazr.uri/-/commit/786825acc6)
and some due to pre-PEP-420 namespace packages (typified by
https://salsa.debian.org/python-team/packages/zope.interface/-/commit/a8c7881b1a).
Fortunately pytest provides IMO rather convenient ways to hook in and
gently tweak the import system just before it tries to import the
modules under test, which I think is better in this context than
bringing up a virtualenv or whatever.

I'd be happy to do a bit more of this sort of thing.
https://veronneau.org/debian-python-team-2022-sprint-report.html said
that around 29 of 67 team-maintained packages were fixed during the
sprint, which means I'm going to have a slightly annoying hit rate if I
have to just go through this email to find targets.  Is there somewhere
else where the current list of target packages is being maintained, or
would it be possible to do this mass bug-filing at sub-RC level so that
there's a convenient list in the BTS?
This is the list we used during the sprint to coordinate:

https://pad.riseup.net/p/FixSetupTest-keep

It's probably outdated though and I feel a real MBF would be helpful to keep track at this point...

--
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
  ⢿⡄⠘⠷⠚⠋   pollo@debian.org / veronneau.org
  ⠈⠳⣄


Reply to: