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


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

Bug#1061765: Help needed to fix python-coverage-test-runner

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Andreas Tille <andreas@an3as.eu>
Newsgroups linux.debian.bugs.dist, linux.debian.maint.python
Subject Bug#1061765: Help needed to fix python-coverage-test-runner
Date Fri, 23 Feb 2024 08:30:02 +0100
Message-ID <Iay0F-c1NR-1@gated-at.bofh.it> (permalink)
References <I1zyG-6n2B-9@gated-at.bofh.it>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Fri Feb 23 07:21:10 2024
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score 0.45
Reply-To Andreas Tille <andreas@an3as.eu>, 1061765@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Gunnar Wolf <gwolf@debian.org>
X-Debian-Pr-Message followup 1061765
X-Debian-Pr-Package src:vmdb2
X-Debian-Pr-Keywords ftbfs sid trixie
X-Debian-Pr-Source vmdb2
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1822923
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 47
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc Gunnar Wolf <gwolf@debian.org>
X-Original-Date Fri, 23 Feb 2024 08:15:56 +0100
X-Original-Message-ID <ZdhGLLRzQu15idPh@an3as.eu>
X-Original-References <81ea464b-0315-46bd-9825-f8aabb439b3c@debian.org>
Xref csiph.com linux.debian.bugs.dist:1187140 linux.debian.maint.python:15489

Cross-posted to 2 groups.

Show key headers only | View raw


Control: tags -1 help

Hi,

I've attempted to fix python-coverage-test-runner in Git since this
package is finally responsible for the failure of vmdb2:

 File "/usr/lib/python3/dist-packages/CoverageTestRunner.py", line 22, 
in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

In the patch in Git[1] I replaced imp by importlib (and distutils by
setuptools but this is not causing actual problems).  Unfortunately
when trying to run vmdb2 test against this patched package I get:

./check
Running unit tests ============================================
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3/dist-packages/CoverageTestRunner.py", line 313, in <module>
    run()
  File "/usr/lib/python3/dist-packages/CoverageTestRunner.py", line 304, in run
    result = runner.run()
             ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/CoverageTestRunner.py", line 211, in run
    importlib.reload(module)
  File "/usr/lib/python3.11/importlib/__init__.py", line 148, in reload
    raise ImportError(msg.format(name), name=name)
ImportError: module plugin not in sys.modules


The fact that
   importlib.reload(module)

makes me wonder whether my patch for _load_module_from_pathname() is
correct (despite when I added some debug lines it looked sensible).  Any
help is welcome.

Kind regards
    Andreas.

[1] https://salsa.debian.org/python-team/packages/python-coverage-test-runner/-/blob/master/debian/patches/Python3.12.patch?ref_type=heads

-- 
http://fam-tille.de

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


Thread

Bug#1061765: Help needed to fix python-coverage-test-runner Andreas Tille <andreas@an3as.eu> - 2024-02-23 08:30 +0100
  Bug#1061765: Help needed to fix python-coverage-test-runner Andreas Tille <andreas@an3as.eu> - 2024-02-23 15:30 +0100

csiph-web