Package: src:python-bugzilla
Version: 3.2.0-1
Severity: serious
Tags: ftbfs
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build:
--------------------------------------------------------------------------------
[...]
debian/rules binary
dh binary --with python3 --buildsystem=pybuild
dh_update_autotools_config -O--buildsystem=pybuild
dh_autoreconf -O--buildsystem=pybuild
dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:311: python3.12 setup.py config
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning:
Unknown distribution option: 'tests_require'
warnings.warn(msg)
running config
dh_auto_build -O--buildsystem=pybuild
I: pybuild base:311: /usr/bin/python3 setup.py build
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning:
Unknown distribution option: 'tests_require'
warnings.warn(msg)
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_session.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/exceptions.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/base.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/oldclasses.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_backendxmlrpc.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_authfiles.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/bug.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/__init__.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/apiversion.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/rhbugzilla.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_backendrest.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_util.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_backendbase.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_cli.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
copying bugzilla/_rhconverters.py ->
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/bugzilla
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build;
python3.12 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.2, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collected 53 items
tests/test_api_attachments.py . [ 1%]
tests/test_api_authfiles.py .... [ 9%]
tests/test_api_bug.py ..... [ 18%]
tests/test_api_externalbugs.py . [ 20%]
tests/test_api_groups.py . [ 22%]
tests/test_api_misc.py .................... [ 60%]
tests/test_api_products.py ... [ 66%]
tests/test_api_users.py . [ 67%]
tests/test_cli_attach.py .. [ 71%]
tests/test_cli_info.py . [ 73%]
tests/test_cli_login.py .. [ 77%]
tests/test_cli_misc.py .......F. [ 94%]
tests/test_cli_modify.py . [ 96%]
tests/test_cli_new.py . [ 98%]
tests/test_cli_query.py F [100%]
=================================== FAILURES ===================================
________________________________ testManualURL _________________________________
run_cli = <function run_cli.<locals>._do_run at 0x7f6d2e33a200>
def testManualURL(run_cli):
"""
Test passing a manual URL, to hit those non-testsuite code paths
"""
try:
cmd = "bugzilla --bztype foobar "
cmd += "--bugzilla https:///FAKEURL query --bug_id 1"
run_cli(cmd, None)
tests/test_cli_misc.py:103:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:104: in _do_run
return tests.utils.do_run_cli(capsys, monkeypatch, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
capsys = <_pytest.capture.CaptureFixture object at 0x7f6d2e8e2ed0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f6d2e31a3f0>
argvstr = 'bugzilla --bztype foobar --bugzilla https:///FAKEURL query --bug_id
1'
bzinstance = None, expectfail = False, stdin = None
def do_run_cli(capsys, monkeypatch,
argvstr, bzinstance,
expectfail=False, stdin=None):
"""
Run bin/bugzilla.main() directly with passed argv
"""
argv = shlex.split(argvstr)
monkeypatch.setattr(sys, "argv", argv)
if stdin:
monkeypatch.setattr(sys, "stdin", io.StringIO(stdin))
else:
monkeypatch.setattr(sys.stdin, "isatty", lambda: True)
ret = 0
try:
# pylint: disable=protected-access
if bzinstance is None:
bugzilla._cli.cli()
else:
bugzilla._cli.main(unittest_bz_instance=bzinstance)
except SystemExit as sys_e:
ret = sys_e.code
out, err = capsys.readouterr()
outstr = out + err
if ret != 0 and not expectfail:
raise RuntimeError("Command failed with %d\ncmd=%s\nout=%s" %
(ret, argvstr, outstr))
E RuntimeError: Command failed with 2
E cmd=bugzilla --bztype foobar --bugzilla https:///FAKEURL query
--bug_id 1
E out=
E Connection lost/failed: HTTPSConnectionPool(host='fakeurl', port=443):
Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy',
NewConnectionError('<urllib3.connection.HTTPSConnection object at
0x7f6d2e31bb00>: Failed to establish a new connection: [Errno 111] Connection
refused')))
tests/utils.py:111: RuntimeError
During handling of the above exception, another exception occurred:
run_cli = <function run_cli.<locals>._do_run at 0x7f6d2e33a200>
def testManualURL(run_cli):
"""
Test passing a manual URL, to hit those non-testsuite code paths
"""
try:
cmd = "bugzilla --bztype foobar "
cmd += "--bugzilla https:///FAKEURL query --bug_id 1"
run_cli(cmd, None)
except Exception as e:
assert "No host supplied" in str(e)
E assert 'No host supplied' in "Command failed with 2\ncmd=bugzilla --bztype
foobar --bugzilla https:///FAKEURL query --bug_id 1\nout=\nConnection lo....HTTPSConnection
object at 0x7f6d2e31bb00>: Failed to establish a new connection: [Errno 111] Connection
refused')))\n"
E + where "Command failed with 2\ncmd=bugzilla --bztype foobar --bugzilla
https:///FAKEURL query --bug_id 1\nout=\nConnection lo....HTTPSConnection object at 0x7f6d2e31bb00>:
Failed to establish a new connection: [Errno 111] Connection refused')))\n" =
str(RuntimeError("Command failed with 2\ncmd=bugzilla --bztype foobar --bugzilla https:///FAKEURL
query --bug_id 1\nout=\n...HTTPSConnection object at 0x7f6d2e31bb00>: Failed to establish a new
connection: [Errno 111] Connection refused')))\n"))
tests/test_cli_misc.py:105: AssertionError
__________________________________ test_query __________________________________
run_cli = <function run_cli.<locals>._do_run at 0x7f6d2e4ca020>
def test_query(run_cli):
# bad field option
fakebz = tests.mockbackend.make_bz()
cmd = "bugzilla query --field FOO"
out = run_cli(cmd, fakebz, expectfail=True)
assert "Invalid field argument" in out
# Simple query with some comma opts
cmd = "bugzilla query "
cmd += "--product foo --component foo,bar --bug_id 1234,2480"
fakebz = tests.mockbackend.make_bz(
bug_search_args="data/mockargs/test_query1.txt",
bug_search_return="data/mockreturn/test_query1.txt")
out = run_cli(cmd, fakebz)
tests.utils.diff_compare(out, "data/clioutput/test_query1.txt")
# RHBZ query with a ton of opts
cmd = "bugzilla query "
cmd += "--product foo --component foo,bar --bug_id 1234,2480 "
cmd += "--keywords fribkeyword --fixed_in amifixed "
cmd += "--qa_whiteboard some-example-whiteboard "
cmd += "--cc f...@example.com --qa_contact q...@example.com "
cmd += "--comment 'some comment string' "
fakebz = tests.mockbackend.make_bz(rhbz=True,
bug_search_args="data/mockargs/test_query1-rhbz.txt",
bug_search_return="data/mockreturn/test_query1.txt")
out = run_cli(cmd, fakebz)
tests.utils.diff_compare(out, "data/clioutput/test_query1-rhbz.txt")
# --emailtype handling
cmd = "bugzilla query --cc f...@example.com --emailtype BAR "
fakebz = tests.mockbackend.make_bz(rhbz=True,
bug_search_args="data/mockargs/test_query2-rhbz.txt",
bug_search_return="data/mockreturn/test_query1.txt")
out = run_cli(cmd, fakebz)
tests.utils.diff_compare(out, "data/clioutput/test_query2-rhbz.txt")
# Same but with --ids output
cmd = "bugzilla query --ids "
cmd += "--product foo --component foo,bar --bug_id 1234,2480"
fakebz = tests.mockbackend.make_bz(
bug_search_args="data/mockargs/test_query1-ids.txt",
bug_search_return="data/mockreturn/test_query1.txt")
out = run_cli(cmd, fakebz)
tests.utils.diff_compare(out, "data/clioutput/test_query1-ids.txt")
# Same but with --raw output
cmd = "bugzilla query --raw --bug_id 1165434"
fakebz = tests.mockbackend.make_bz(
bug_search_args="data/mockargs/test_query2.txt",
bug_search_return={"bugs": [{"id": 1165434}]},
bug_get_args=None,
bug_get_return="data/mockreturn/test_getbug_rhel.txt")
out = run_cli(cmd, fakebz)
# Dictionary ordering is random, so scrub it from our output
out = re.sub(r"\{.*\}", r"'DICT SCRUBBED'", out, re.MULTILINE)
tests.utils.diff_compare(out, "data/clioutput/test_query2.txt")
tests/test_cli_query.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
inputdata = "Bugzilla 1165434: \nATTRIBUTE[actual_time]: 0.0\nATTRIBUTE[alias]:
[]\nATTRIBUTE[assigned_to]: lvm-t...@redhat.com\nA...nATTRIBUTE[version]:
['5.8']\nATTRIBUTE[weburl]: https:TESTSUITEMOCK\nATTRIBUTE[whiteboard]:
genericwhiteboard\n\n\n\n"
filename =
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/tests/data/clioutput/test_query2.txt'
expect_out = "Bugzilla 1165434: \nATTRIBUTE[actual_time]: 0.0\nATTRIBUTE[alias]:
[]\nATTRIBUTE[assigned_to]: lvm-t...@redhat.com\nA...TRIBUTE[version]:
['5.8']\nATTRIBUTE[weburl]: https:///TESTSUITEMOCK\nATTRIBUTE[whiteboard]:
genericwhiteboard\n\n\n\n"
def diff_compare(inputdata, filename, expect_out=None):
"""Compare passed string output to contents of filename"""
def _process(data):
if isinstance(data, tuple) and len(data) == 1:
data = data[0]
if isinstance(data, (dict, tuple)):
out = pprint.pformat(data, width=81)
else:
out = str(data)
if not out.endswith("\n"):
out += "\n"
return out
actual_out = _process(inputdata)
if filename:
filename = tests_path(filename)
if not os.path.exists(filename) or
tests.CLICONFIG.REGENERATE_OUTPUT:
open(filename, "w").write(actual_out)
expect_out = open(filename).read()
else:
expect_out = _process(expect_out)
diff = "".join(difflib.unified_diff(expect_out.splitlines(1),
actual_out.splitlines(1),
fromfile=filename or "Manual input",
tofile="Generated Output"))
if diff:
raise AssertionError("Conversion outputs did not match.\n%s" % diff)
E AssertionError: Conversion outputs did not match.
E ---
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/tests/data/clioutput/test_query2.txt
E +++ Generated Output
E @@ -57,7 +57,7 @@
E ATTRIBUTE[target_release]: ['---']
E ATTRIBUTE[url]:
E ATTRIBUTE[version]: ['5.8']
E -ATTRIBUTE[weburl]: https:///TESTSUITEMOCK
E +ATTRIBUTE[weburl]: https:TESTSUITEMOCK
E ATTRIBUTE[whiteboard]: genericwhiteboard
tests/utils.py:81: AssertionError
=============================== warnings summary ===============================
tests/conftest.py:41
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build/tests/conftest.py:41:
PytestRemovedIn9Warning: The (path: py.path.local) argument is deprecated, please use
(collection_path: pathlib.Path)
see
https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
def pytest_ignore_collect(path, config):
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_cli_misc.py::testManualURL - assert 'No host supplied' in "...
FAILED tests/test_cli_query.py::test_query - AssertionError: Conversion outpu...
=================== 2 failed, 51 passed, 1 warning in 0.56s ====================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_bugzilla/build; python3.12 -m pytest
tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12
returned exit code 13
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202409/
About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.
If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.
Thanks.