Bug#1052812: python-pytest-timeout: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.11 returned exit code 13

2023-10-04 Thread Scott Talbert

On Tue, 26 Sep 2023, Lucas Nussbaum wrote:


Relevant part (hopefully):

 debian/rules binary
dh binary --buildsystem=pybuild --with python3
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:291: python3.11 setup.py config
running config
   dh_auto_build -O--buildsystem=pybuild
I: pybuild base:291: /usr/bin/python3 setup.py build
running build
running build_py
copying pytest_timeout.py -> 
/<>/.pybuild/cpython3_3.11_python-pytest-timeout/build
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:291: cd 
/<>/.pybuild/cpython3_3.11_python-pytest-timeout/build; python3.11 
-m pytest


I think this is happening because of the change to dh-python to remove the 
*.egg-info files as part of 'clean'.  The egg is needed for running tests 
so the plugin can be found.  (The egg is built as part of the build 
process, but not until the 'install' phase.)  We could try to work around 
this, but I think a better solution is to switch to pyproject.toml, which 
I think shouldn't be affected by this problem.  I sent a pull request 
upstream.


Scott



Bug#1052812: python-pytest-timeout: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.11 returned exit code 13

2023-09-26 Thread Lucas Nussbaum
Source: python-pytest-timeout
Version: 2.1.0-3
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20230925 ftbfs-trixie

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules binary
> dh binary --buildsystem=pybuild --with python3
>dh_update_autotools_config -O--buildsystem=pybuild
>dh_autoreconf -O--buildsystem=pybuild
>dh_auto_configure -O--buildsystem=pybuild
> I: pybuild base:291: python3.11 setup.py config 
> running config
>dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:291: /usr/bin/python3 setup.py build 
> running build
> running build_py
> copying pytest_timeout.py -> 
> /<>/.pybuild/cpython3_3.11_python-pytest-timeout/build
>dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:291: cd 
> /<>/.pybuild/cpython3_3.11_python-pytest-timeout/build; 
> python3.11 -m pytest 
> = test session starts 
> ==
> platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0
> rootdir: /<>
> configfile: tox.ini
> plugins: cov-4.1.0
> collected 33 items
> 
> test_pytest_timeout.py FFF..FF.xx.FF 
> [100%]
> 
> === FAILURES 
> ===
> _ test_header 
> __
> 
> testdir = 
> 
> def test_header(testdir):
> testdir.makepyfile(
> """
> def test_x(): pass
> """
> )
> result = testdir.runpytest("--timeout=1")
> >   result.stdout.fnmatch_lines(
> ["timeout: 1.0s", "timeout method:*", "timeout func_only:*"]
> )
> E   Failed: remains unmatched: 'timeout: 1.0s'
> 
> /<>/.pybuild/cpython3_3.11_python-pytest-timeout/build/test_pytest_timeout.py:35:
>  Failed
> - Captured stdout call 
> -
> running: /usr/bin/python3.11 -mpytest 
> --basetemp=/tmp/pytest-of-user42/pytest-9/test_header0/runpytest-0 --timeout=1
>  in: /tmp/pytest-of-user42/pytest-9/test_header0
> - Captured stderr call 
> -
> ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
> __main__.py: error: unrecognized arguments: --timeout=1
>   inifile: None
>   rootdir: /tmp/pytest-of-user42/pytest-9/test_header0
> 
> _ test_sigalrm 
> _
> 
> testdir = 
> 
> @have_sigalrm
> def test_sigalrm(testdir):
> testdir.makepyfile(
> """
> import time
> 
> def test_foo():
> time.sleep(2)
>  """
> )
> result = testdir.runpytest("--timeout=1")
> >   result.stdout.fnmatch_lines(["*Failed: Timeout >1.0s*"])
> E   Failed: remains unmatched: '*Failed: Timeout >1.0s*'
> 
> /<>/.pybuild/cpython3_3.11_python-pytest-timeout/build/test_pytest_timeout.py:51:
>  Failed
> - Captured stdout call 
> -
> running: /usr/bin/python3.11 -mpytest 
> --basetemp=/tmp/pytest-of-user42/pytest-9/test_sigalrm0/runpytest-0 
> --timeout=1
>  in: /tmp/pytest-of-user42/pytest-9/test_sigalrm0
> - Captured stderr call 
> -
> ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
> __main__.py: error: unrecognized arguments: --timeout=1
>   inifile: None
>   rootdir: /tmp/pytest-of-user42/pytest-9/test_sigalrm0
> 
> _ test_thread 
> __
> 
> testdir = 
> 
> def test_thread(testdir):
> testdir.makepyfile(
> """
> import time
> 
> def test_foo():
> time.sleep(2)
> """
> )
> result = testdir.runpytest("--timeout=1", "--timeout-method=thread")
> >   result.stderr.fnmatch_lines(
> [
> "*++ Timeout ++*",
> "*~~ Stack of MainThread* ~~*",
> "*File *, line *, in *",
> "*++ Timeout ++*",
> ]
> )
> E   Failed: nomatch: '*++ Timeout ++*'
> E   and: 'ERROR: usage: __main__.py [options] [file_or_dir] 
> [file_or_dir] [...]'
> E   and: '__main__.py: error: unrecognized arguments: --timeout=1 
> --timeout-method=thread'
> E   and: '  inifile: None'
> E   and: '  rootdir: /tmp/pytest-of-user42/pytest-9/test_thread0'
> E   and: ''
> E   remains unmatched: '*++ Timeout ++*'
> 
> /<>/.pybuild/cpython3_3.11_python-pytest-timeout/build/test_pytest_timeout.py:64:
>  Failed
> - Captured stdout call 
> -
> running: /usr/bin/python3.11 -mpytest 
> --basetemp=/tmp/pytest-of-user42/pytest-9/test_thread0/runpytest