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

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 2024-02-23 08:30 +0100
Message-ID <Iay0F-c1NR-1@gated-at.bofh.it> (permalink)
References <I1zyG-6n2B-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | 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