--- Begin Message ---
Source: borgmatic
Version: 1.5.1-1
Severity: important
User: [email protected]
Usertags: pytest-v6
Hi,
borgmatic FTBFS with pytest 6 in unstable. Please consult the
deprecations and removals page for possible hints as to why it fails:
https://docs.pytest.org/en/stable/deprecations.html
The error log below has more details.
> I: pybuild base:232: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build;
> python3.9 -m pytest --ignore=tests/end-to-end --ignore=tests/integration
> ============================= test session starts
> ==============================
> platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0
> rootdir: /<<PKGBUILDDIR>>, configfile: setup.cfg
> collected 487 items
>
> tests/unit/test_execute.py ................... [
> 3%]
> tests/unit/test_logger.py ...................................... [
> 11%]
> tests/unit/test_verbosity.py .. [
> 12%]
> tests/unit/borg/test_check.py ...................................... [
> 19%]
> tests/unit/borg/test_create.py ......................................... [
> 28%]
> ............................. [
> 34%]
> tests/unit/borg/test_environment.py ..... [
> 35%]
> tests/unit/borg/test_extract.py .................. [
> 39%]
> tests/unit/borg/test_flags.py ........ [
> 40%]
> tests/unit/borg/test_info.py ............... [
> 43%]
> tests/unit/borg/test_init.py ........... [
> 45%]
> tests/unit/borg/test_list.py .............................. [
> 52%]
> tests/unit/borg/test_mount.py ......... [
> 54%]
> tests/unit/borg/test_prune.py ................. [
> 57%]
> tests/unit/borg/test_umount.py ... [
> 58%]
> tests/unit/commands/test_arguments.py ........ [
> 59%]
> tests/unit/commands/test_borgmatic.py .................................. [
> 66%]
> ...F [
> 67%]
> tests/unit/config/test_checks.py ... [
> 68%]
> tests/unit/config/test_collect.py ........... [
> 70%]
> tests/unit/config/test_convert.py ....... [
> 71%]
> tests/unit/config/test_generate.py ......... [
> 73%]
> tests/unit/config/test_legacy.py ............. [
> 76%]
> tests/unit/config/test_normalize.py .... [
> 77%]
> tests/unit/config/test_override.py .......... [
> 79%]
> tests/unit/config/test_validate.py .................. [
> 82%]
> tests/unit/hooks/test_command.py ............ [
> 85%]
> tests/unit/hooks/test_cronhub.py ..... [
> 86%]
> tests/unit/hooks/test_cronitor.py .... [
> 87%]
> tests/unit/hooks/test_dispatch.py ..... [
> 88%]
> tests/unit/hooks/test_dump.py .................... [
> 92%]
> tests/unit/hooks/test_healthchecks.py ..FFF..... [
> 94%]
> tests/unit/hooks/test_mysql.py ........... [
> 96%]
> tests/unit/hooks/test_pagerduty.py .... [
> 97%]
> tests/unit/hooks/test_postgresql.py ............
> [100%]
>
> =================================== FAILURES
> ===================================
> ___ test_collect_configuration_run_summary_logs_outputs_merged_json_results
> ____
>
> def
> test_collect_configuration_run_summary_logs_outputs_merged_json_results():
>
> flexmock(module).should_receive('run_configuration').and_return(['foo',
> 'bar']).and_return(
> ['baz']
> )
>> flexmock(module.sys.stdout).should_receive('write').with_args('["foo",
>> "bar", "baz"]').once()
>
> tests/unit/commands/test_borgmatic.py:439:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/flexmock.py:391: in with_args
> self._verify_signature_match(*kargs, **kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <flexmock.Expectation object at 0x7fb5e5cd4760>
> kargs = ('["foo", "bar", "baz"]',), kwargs = {}, is_method = False, args_len
> = 2
> minimum = 2, maximum = 2, total_positional = 1, named_optionals = []
>
> def _verify_signature_match(self, *kargs, **kwargs):
> if isinstance(self._mock, Mock):
> return # no sense in enforcing this for fake objects
> allowed = self.argspec
> # we consider object a method for purposes or not counting
> "self"/"cls" as argument if:
> # - one of inspect.ismethod, inspect.isfunction, _isclass return True
> # (in Python 3 it's sometimes impossible to tell whether callable
> is method or not,
> # so we try both inspect.ismethod and inspect.isfunction; classes
> are callable too -
> # they have __init__)
> # - it's not a static method
> # - the mocked object is a module - module "methods" are in fact
> plain functions;
> # unless they're classes, which means they still have __init__
> is_method = ((inspect.ismethod(self.original) or
> inspect.isfunction(self.original)
> or _isclass(self.original)) and
> self.method_type is not staticmethod and
> (not isinstance(self._mock, types.ModuleType) or
> _isclass(self.original)))
> args_len = len(allowed.args)
> if is_method:
> args_len -= 1
> minimum = args_len - (allowed.defaults and len(allowed.defaults) or 0)
> maximum = None
> if allowed.varargs is None and allowed.keywords is None:
> maximum = args_len
> total_positional = len(
> kargs + tuple(a for a in kwargs if a in allowed.args))
> named_optionals = [a for a in kwargs
> if allowed.defaults
> if a in allowed.args[len(allowed.args) -
> len(allowed.defaults):]]
> if allowed.defaults and total_positional == minimum and
> named_optionals:
> minimum += len(named_optionals)
> if total_positional < minimum:
>> raise MethodSignatureError(
> '%s requires at least %s arguments, expectation provided %s' %
> (self.name, minimum, total_positional))
> E flexmock.MethodSignatureError: write requires at least 2
> arguments, expectation provided 1
>
> /usr/lib/python3/dist-packages/flexmock.py:278: MethodSignatureError
> __________ test_format_buffered_logs_for_payload_flattens_log_buffer
> ___________
>
> self = <_pytest.logging.LoggingPlugin object at 0x7fb5e6cc6280>
> item = <Function test_format_buffered_logs_for_payload_flattens_log_buffer>
> when = 'call'
>
> def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None,
> None, None]:
> """Implements the internals of pytest_runtest_xxx() hook."""
> with catching_logs(
> self.caplog_handler, level=self.log_level,
> ) as caplog_handler, catching_logs(
> self.report_handler, level=self.log_level,
> ) as report_handler:
> caplog_handler.reset()
> report_handler.reset()
> item._store[caplog_records_key][when] = caplog_handler.records
> item._store[caplog_handler_key] = caplog_handler
>
> yield
>
> log = report_handler.stream.getvalue().strip()
>> item.add_report_section(when, "log", log)
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:694:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <_pytest.logging.catching_logs object at 0x7fb5e5b84140>, type = None
> value = None, traceback = None
>
> def __exit__(self, type, value, traceback):
> root_logger = logging.getLogger()
> if self.level is not None:
> root_logger.setLevel(self.orig_level)
>> root_logger.removeHandler(self.handler)
> E AttributeError: 'MockClass' object has no attribute 'removeHandler'
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:310: AttributeError
>
> During handling of the above exception, another exception occurred:
>
> cls = <class '_pytest.runner.CallInfo'>
> func = <function call_runtest_hook.<locals>.<lambda> at 0x7fb5e5b7c040>
> when = 'call'
> reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
>
> @classmethod
> def from_call(
> cls,
> func: "Callable[[], _T]",
> when: "Literal['collect', 'setup', 'call', 'teardown']",
> reraise: "Optional[Union[Type[BaseException],
> Tuple[Type[BaseException], ...]]]" = None,
> ) -> "CallInfo[_T]":
> excinfo = None
> start = timing.time()
> precise_start = timing.perf_counter()
> try:
>> result = func() # type: Optional[_T]
>
> /usr/lib/python3/dist-packages/_pytest/runner.py:294:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/_pytest/runner.py:247: in <lambda>
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
> /usr/lib/python3/dist-packages/pluggy/hooks.py:286: in __call__
> return self._hookexec(self, self.get_hookimpls(), kwargs)
> /usr/lib/python3/dist-packages/pluggy/manager.py:92: in _hookexec
> return self._inner_hookexec(hook, methods, kwargs)
> /usr/lib/python3/dist-packages/pluggy/manager.py:83: in <lambda>
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
> /usr/lib/python3/dist-packages/_pytest/logging.py:708: in pytest_runtest_call
> yield from self._runtest_for(item, "call")
> /usr/lib/python3/dist-packages/_pytest/logging.py:694: in _runtest_for
> item.add_report_section(when, "log", log)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <_pytest.logging.catching_logs object at 0x7fb5e5b84040>
> type = <class 'AttributeError'>
> value = AttributeError("'MockClass' object has no attribute 'removeHandler'")
> traceback = <traceback object at 0x7fb5e5b843c0>
>
> def __exit__(self, type, value, traceback):
> root_logger = logging.getLogger()
> if self.level is not None:
> root_logger.setLevel(self.orig_level)
>> root_logger.removeHandler(self.handler)
> E AttributeError: 'MockClass' object has no attribute 'removeHandler'
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:310: AttributeError
> _
> test_format_buffered_logs_for_payload_inserts_truncation_indicator_when_logs_forgotten
> _
>
> self = <_pytest.logging.LoggingPlugin object at 0x7fb5e6cc6280>
> item = <Function
> test_format_buffered_logs_for_payload_inserts_truncation_indicator_when_logs_forgotten>
> when = 'call'
>
> def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None,
> None, None]:
> """Implements the internals of pytest_runtest_xxx() hook."""
> with catching_logs(
> self.caplog_handler, level=self.log_level,
> ) as caplog_handler, catching_logs(
> self.report_handler, level=self.log_level,
> ) as report_handler:
> caplog_handler.reset()
> report_handler.reset()
> item._store[caplog_records_key][when] = caplog_handler.records
> item._store[caplog_handler_key] = caplog_handler
>
> yield
>
> log = report_handler.stream.getvalue().strip()
>> item.add_report_section(when, "log", log)
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:694:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <_pytest.logging.catching_logs object at 0x7fb5e59ac580>, type = None
> value = None, traceback = None
>
> def __exit__(self, type, value, traceback):
> root_logger = logging.getLogger()
> if self.level is not None:
> root_logger.setLevel(self.orig_level)
>> root_logger.removeHandler(self.handler)
> E AttributeError: 'MockClass' object has no attribute 'removeHandler'
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:310: AttributeError
>
> During handling of the above exception, another exception occurred:
>
> cls = <class '_pytest.runner.CallInfo'>
> func = <function call_runtest_hook.<locals>.<lambda> at 0x7fb5e5c41940>
> when = 'call'
> reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
>
> @classmethod
> def from_call(
> cls,
> func: "Callable[[], _T]",
> when: "Literal['collect', 'setup', 'call', 'teardown']",
> reraise: "Optional[Union[Type[BaseException],
> Tuple[Type[BaseException], ...]]]" = None,
> ) -> "CallInfo[_T]":
> excinfo = None
> start = timing.time()
> precise_start = timing.perf_counter()
> try:
>> result = func() # type: Optional[_T]
>
> /usr/lib/python3/dist-packages/_pytest/runner.py:294:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/_pytest/runner.py:247: in <lambda>
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
> /usr/lib/python3/dist-packages/pluggy/hooks.py:286: in __call__
> return self._hookexec(self, self.get_hookimpls(), kwargs)
> /usr/lib/python3/dist-packages/pluggy/manager.py:92: in _hookexec
> return self._inner_hookexec(hook, methods, kwargs)
> /usr/lib/python3/dist-packages/pluggy/manager.py:83: in <lambda>
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
> /usr/lib/python3/dist-packages/_pytest/logging.py:708: in pytest_runtest_call
> yield from self._runtest_for(item, "call")
> /usr/lib/python3/dist-packages/_pytest/logging.py:694: in _runtest_for
> item.add_report_section(when, "log", log)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <_pytest.logging.catching_logs object at 0x7fb5e59ac180>
> type = <class 'AttributeError'>
> value = AttributeError("'MockClass' object has no attribute 'removeHandler'")
> traceback = <traceback object at 0x7fb5e59ac200>
>
> def __exit__(self, type, value, traceback):
> root_logger = logging.getLogger()
> if self.level is not None:
> root_logger.setLevel(self.orig_level)
>> root_logger.removeHandler(self.handler)
> E AttributeError: 'MockClass' object has no attribute 'removeHandler'
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:310: AttributeError
> _
> test_format_buffered_logs_for_payload_without_handler_produces_empty_payload _
>
> self = <_pytest.logging.LoggingPlugin object at 0x7fb5e6cc6280>
> item = <Function
> test_format_buffered_logs_for_payload_without_handler_produces_empty_payload>
> when = 'call'
>
> def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None,
> None, None]:
> """Implements the internals of pytest_runtest_xxx() hook."""
> with catching_logs(
> self.caplog_handler, level=self.log_level,
> ) as caplog_handler, catching_logs(
> self.report_handler, level=self.log_level,
> ) as report_handler:
> caplog_handler.reset()
> report_handler.reset()
> item._store[caplog_records_key][when] = caplog_handler.records
> item._store[caplog_handler_key] = caplog_handler
>
> yield
>
> log = report_handler.stream.getvalue().strip()
>> item.add_report_section(when, "log", log)
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:694:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <_pytest.logging.catching_logs object at 0x7fb5e5af6180>, type = None
> value = None, traceback = None
>
> def __exit__(self, type, value, traceback):
> root_logger = logging.getLogger()
> if self.level is not None:
> root_logger.setLevel(self.orig_level)
>> root_logger.removeHandler(self.handler)
> E AttributeError: 'MockClass' object has no attribute 'removeHandler'
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:310: AttributeError
>
> During handling of the above exception, another exception occurred:
>
> cls = <class '_pytest.runner.CallInfo'>
> func = <function call_runtest_hook.<locals>.<lambda> at 0x7fb5e5b7c790>
> when = 'call'
> reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
>
> @classmethod
> def from_call(
> cls,
> func: "Callable[[], _T]",
> when: "Literal['collect', 'setup', 'call', 'teardown']",
> reraise: "Optional[Union[Type[BaseException],
> Tuple[Type[BaseException], ...]]]" = None,
> ) -> "CallInfo[_T]":
> excinfo = None
> start = timing.time()
> precise_start = timing.perf_counter()
> try:
>> result = func() # type: Optional[_T]
>
> /usr/lib/python3/dist-packages/_pytest/runner.py:294:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/_pytest/runner.py:247: in <lambda>
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
> /usr/lib/python3/dist-packages/pluggy/hooks.py:286: in __call__
> return self._hookexec(self, self.get_hookimpls(), kwargs)
> /usr/lib/python3/dist-packages/pluggy/manager.py:92: in _hookexec
> return self._inner_hookexec(hook, methods, kwargs)
> /usr/lib/python3/dist-packages/pluggy/manager.py:83: in <lambda>
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
> /usr/lib/python3/dist-packages/_pytest/logging.py:708: in pytest_runtest_call
> yield from self._runtest_for(item, "call")
> /usr/lib/python3/dist-packages/_pytest/logging.py:694: in _runtest_for
> item.add_report_section(when, "log", log)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <_pytest.logging.catching_logs object at 0x7fb5e5cc1cc0>
> type = <class 'AttributeError'>
> value = AttributeError("'MockClass' object has no attribute 'removeHandler'")
> traceback = <traceback object at 0x7fb5e5af6140>
>
> def __exit__(self, type, value, traceback):
> root_logger = logging.getLogger()
> if self.level is not None:
> root_logger.setLevel(self.orig_level)
>> root_logger.removeHandler(self.handler)
> E AttributeError: 'MockClass' object has no attribute 'removeHandler'
>
> /usr/lib/python3/dist-packages/_pytest/logging.py:310: AttributeError
> =============================== warnings summary
> ===============================
> /usr/lib/python3/dist-packages/pykwalify/core.py:7
> /usr/lib/python3/dist-packages/pykwalify/core.py:7: DeprecationWarning: the
> imp module is deprecated in favour of importlib; see the module's
> documentation for alternative uses
> import imp
>
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> =========================== short test summary info
> ============================
> FAILED
> tests/unit/commands/test_borgmatic.py::test_collect_configuration_run_summary_logs_outputs_merged_json_results
> FAILED
> tests/unit/hooks/test_healthchecks.py::test_format_buffered_logs_for_payload_flattens_log_buffer
> FAILED
> tests/unit/hooks/test_healthchecks.py::test_format_buffered_logs_for_payload_inserts_truncation_indicator_when_logs_forgotten
> FAILED
> tests/unit/hooks/test_healthchecks.py::test_format_buffered_logs_for_payload_without_handler_produces_empty_payload
> =================== 4 failed, 483 passed, 1 warning in 0.88s
> ===================
> E: pybuild pybuild:353: test: plugin distutils failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build; python3.9 -m pytest
> --ignore=tests/end-to-end --ignore=tests/integration
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.9
> returned exit code 13
> make: *** [debian/rules:8: binary] Error 25
> dpkg-buildpackage: error: debian/rules binary subprocess returned exit status
> 2
--- End Message ---