Bug 2272044 - copr-backend fails to build with pytest 8: AttributeError: 'NoneType' object has no attribute 'setup_method'
Summary: copr-backend fails to build with pytest 8: AttributeError: 'NoneType' object ...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: copr-backend
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Copr Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-03-28 12:21 UTC by Tomáš Hrnčiar
Modified: 2024-04-10 16:00 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-10 13:55:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-03-28 12:21:33 UTC
copr-backend fails to build with pytest 8.

==================================== ERRORS ====================================
_______________ ERROR at setup of TestHelpers.test_walk_limited ________________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7f73bed40860>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: Callable[[], TResult],
        when: Literal["collect", "setup", "call", "teardown"],
        reraise: Optional[
            Union[Type[BaseException], Tuple[Type[BaseException], ...]]
        ] = None,
    ) -> "CallInfo[TResult]":
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :param when:
            The phase in which the function is called.
        :param reraise:
            Exception or exceptions that shall propagate if raised by the
            function, instead of being wrapped in the CallInfo.
        """
        excinfo = None
        start = timing.time()
        precise_start = timing.perf_counter()
        try:
>           result: Optional[TResult] = func()

/usr/lib/python3.12/site-packages/_pytest/runner.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup
    yield from unraisable_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup
    yield from self._runtest_for(item, "setup")
/usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for
    yield
/usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup
    yield from thread_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/runner.py:158: in pytest_runtest_setup
    item.session._setupstate.setup(item)
/usr/lib/python3.12/site-packages/_pytest/runner.py:515: in setup
    raise exc
/usr/lib/python3.12/site-packages/_pytest/runner.py:512: in setup
    col.setup()
/usr/lib/python3.12/site-packages/_pytest/python.py:1775: in setup
    self._request._fillfixtures()
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:687: in _fillfixtures
    item.funcargs[argname] = self.getfixturevalue(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:541: in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef
    self._compute_fixture_value(fixturedef)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value
    fixturedef.execute(request=subrequest)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1079: in execute
    result = ihook.pytest_fixture_setup(fixturedef=self, request=request)
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/setuponly.py:36: in pytest_fixture_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1132: in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:906: in call_fixture_func
    fixture_result = next(generator)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest '_xunit_setup_method_fixture_TestHelpers' for <Function test_walk_limited>>

    def xunit_setup_method_fixture(request) -> Generator[None, None, None]:
        instance = request.instance
        method = request.function
        if setup_method is not None:
>           func = getattr(instance, setup_name)
E           AttributeError: 'NoneType' object has no attribute 'setup_method'

/usr/lib/python3.12/site-packages/_pytest/python.py:847: AttributeError
_______ ERROR at setup of TestHelpers.test_recursive_copy_and_link_rpms ________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7f73bdd32de0>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: Callable[[], TResult],
        when: Literal["collect", "setup", "call", "teardown"],
        reraise: Optional[
            Union[Type[BaseException], Tuple[Type[BaseException], ...]]
        ] = None,
    ) -> "CallInfo[TResult]":
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :param when:
            The phase in which the function is called.
        :param reraise:
            Exception or exceptions that shall propagate if raised by the
            function, instead of being wrapped in the CallInfo.
        """
        excinfo = None
        start = timing.time()
        precise_start = timing.perf_counter()
        try:
>           result: Optional[TResult] = func()

/usr/lib/python3.12/site-packages/_pytest/runner.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup
    yield from unraisable_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup
    yield from self._runtest_for(item, "setup")
/usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for
    yield
/usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup
    yield from thread_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/runner.py:158: in pytest_runtest_setup
    item.session._setupstate.setup(item)
/usr/lib/python3.12/site-packages/_pytest/runner.py:515: in setup
    raise exc
/usr/lib/python3.12/site-packages/_pytest/runner.py:512: in setup
    col.setup()
/usr/lib/python3.12/site-packages/_pytest/python.py:1775: in setup
    self._request._fillfixtures()
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:687: in _fillfixtures
    item.funcargs[argname] = self.getfixturevalue(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:541: in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef
    self._compute_fixture_value(fixturedef)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value
    fixturedef.execute(request=subrequest)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1079: in execute
    result = ihook.pytest_fixture_setup(fixturedef=self, request=request)
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/setuponly.py:36: in pytest_fixture_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1132: in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:906: in call_fixture_func
    fixture_result = next(generator)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest '_xunit_setup_method_fixture_TestHelpers' for <Function test_recursive_copy_and_link_rpms>>

    def xunit_setup_method_fixture(request) -> Generator[None, None, None]:
        instance = request.instance
        method = request.function
        if setup_method is not None:
>           func = getattr(instance, setup_name)
E           AttributeError: 'NoneType' object has no attribute 'setup_method'

/usr/lib/python3.12/site-packages/_pytest/python.py:847: AttributeError
___________ ERROR at setup of TestModifyRepo.test_copr_repo_do_stat ____________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7f73bed40860>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: Callable[[], TResult],
        when: Literal["collect", "setup", "call", "teardown"],
        reraise: Optional[
            Union[Type[BaseException], Tuple[Type[BaseException], ...]]
        ] = None,
    ) -> "CallInfo[TResult]":
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :param when:
            The phase in which the function is called.
        :param reraise:
            Exception or exceptions that shall propagate if raised by the
            function, instead of being wrapped in the CallInfo.
        """
        excinfo = None
        start = timing.time()
        precise_start = timing.perf_counter()
        try:
>           result: Optional[TResult] = func()

/usr/lib/python3.12/site-packages/_pytest/runner.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup
    yield from unraisable_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup
    yield from self._runtest_for(item, "setup")
/usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for
    yield
/usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup
    yield from thread_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/runner.py:158: in pytest_runtest_setup
    item.session._setupstate.setup(item)
/usr/lib/python3.12/site-packages/_pytest/runner.py:515: in setup
    raise exc
/usr/lib/python3.12/site-packages/_pytest/runner.py:512: in setup
    col.setup()
/usr/lib/python3.12/site-packages/_pytest/python.py:1775: in setup
    self._request._fillfixtures()
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:687: in _fillfixtures
    item.funcargs[argname] = self.getfixturevalue(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:541: in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef
    self._compute_fixture_value(fixturedef)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value
    fixturedef.execute(request=subrequest)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1079: in execute
    result = ihook.pytest_fixture_setup(fixturedef=self, request=request)
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/setuponly.py:36: in pytest_fixture_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1132: in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:906: in call_fixture_func
    fixture_result = next(generator)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest '_xunit_setup_method_fixture_TestModifyRepo' for <Function test_copr_repo_do_stat>>

    def xunit_setup_method_fixture(request) -> Generator[None, None, None]:
        instance = request.instance
        method = request.function
        if setup_method is not None:
>           func = getattr(instance, setup_name)
E           AttributeError: 'NoneType' object has no attribute 'setup_method'

/usr/lib/python3.12/site-packages/_pytest/python.py:847: AttributeError
____ ERROR at setup of TestModifyRepo.test_copr_repo_rpms_to_remove_in_call ____

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7f73bee1b7e0>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: Callable[[], TResult],
        when: Literal["collect", "setup", "call", "teardown"],
        reraise: Optional[
            Union[Type[BaseException], Tuple[Type[BaseException], ...]]
        ] = None,
    ) -> "CallInfo[TResult]":
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :param when:
            The phase in which the function is called.
        :param reraise:
            Exception or exceptions that shall propagate if raised by the
            function, instead of being wrapped in the CallInfo.
        """
        excinfo = None
        start = timing.time()
        precise_start = timing.perf_counter()
        try:
>           result: Optional[TResult] = func()

/usr/lib/python3.12/site-packages/_pytest/runner.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup
    yield from unraisable_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup
    yield from self._runtest_for(item, "setup")
/usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for
    yield
/usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup
    yield from thread_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/runner.py:158: in pytest_runtest_setup
    item.session._setupstate.setup(item)
/usr/lib/python3.12/site-packages/_pytest/runner.py:515: in setup
    raise exc
/usr/lib/python3.12/site-packages/_pytest/runner.py:512: in setup
    col.setup()
/usr/lib/python3.12/site-packages/_pytest/python.py:1775: in setup
    self._request._fillfixtures()
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:687: in _fillfixtures
    item.funcargs[argname] = self.getfixturevalue(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:541: in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef
    self._compute_fixture_value(fixturedef)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value
    fixturedef.execute(request=subrequest)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1079: in execute
    result = ihook.pytest_fixture_setup(fixturedef=self, request=request)
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/setuponly.py:36: in pytest_fixture_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1132: in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:906: in call_fixture_func
    fixture_result = next(generator)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest '_xunit_setup_method_fixture_TestModifyRepo' for <Function test_copr_repo_rpms_to_remove_in_call>>

    def xunit_setup_method_fixture(request) -> Generator[None, None, None]:
        instance = request.instance
        method = request.function
        if setup_method is not None:
>           func = getattr(instance, setup_name)
E           AttributeError: 'NoneType' object has no attribute 'setup_method'

/usr/lib/python3.12/site-packages/_pytest/python.py:847: AttributeError
___________ ERROR at setup of TestSign.test_call_sign_bin_repeatedly ___________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7f73bee18ea0>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: Callable[[], TResult],
        when: Literal["collect", "setup", "call", "teardown"],
        reraise: Optional[
            Union[Type[BaseException], Tuple[Type[BaseException], ...]]
        ] = None,
    ) -> "CallInfo[TResult]":
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :param when:
            The phase in which the function is called.
        :param reraise:
            Exception or exceptions that shall propagate if raised by the
            function, instead of being wrapped in the CallInfo.
        """
        excinfo = None
        start = timing.time()
        precise_start = timing.perf_counter()
        try:
>           result: Optional[TResult] = func()

/usr/lib/python3.12/site-packages/_pytest/runner.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup
    yield from unraisable_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup
    yield from self._runtest_for(item, "setup")
/usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for
    yield
/usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup
    yield from thread_exception_runtest_hook()
/usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook
    yield
/usr/lib/python3.12/site-packages/_pytest/runner.py:158: in pytest_runtest_setup
    item.session._setupstate.setup(item)
/usr/lib/python3.12/site-packages/_pytest/runner.py:515: in setup
    raise exc
/usr/lib/python3.12/site-packages/_pytest/runner.py:512: in setup
    col.setup()
/usr/lib/python3.12/site-packages/_pytest/python.py:1775: in setup
    self._request._fillfixtures()
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:687: in _fillfixtures
    item.funcargs[argname] = self.getfixturevalue(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:541: in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef
    self._compute_fixture_value(fixturedef)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value
    fixturedef.execute(request=subrequest)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1079: in execute
    result = ihook.pytest_fixture_setup(fixturedef=self, request=request)
/usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.12/site-packages/_pytest/setuponly.py:36: in pytest_fixture_setup
    return (yield)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:1132: in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
/usr/lib/python3.12/site-packages/_pytest/fixtures.py:906: in call_fixture_func
    fixture_result = next(generator)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest '_xunit_setup_method_fixture_TestSign' for <Function test_call_sign_bin_repeatedly>>

    def xunit_setup_method_fixture(request) -> Generator[None, None, None]:
        instance = request.instance
        method = request.function
        if setup_method is not None:
>           func = getattr(instance, setup_name)
E           AttributeError: 'NoneType' object has no attribute 'setup_method'

/usr/lib/python3.12/site-packages/_pytest/python.py:847: AttributeError
=============================== warnings summary ===============================
../../../../usr/lib/python3.12/site-packages/munch/__init__.py:24
  /usr/lib/python3.12/site-packages/munch/__init__.py:24: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

tests/daemons/test_log.py:18
  /builddir/build/BUILD/copr-backend-1.176/tests/daemons/test_log.py:18: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/daemons/test_log.py:24
  /builddir/build/BUILD/copr-backend-1.176/tests/daemons/test_log.py:24: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/run/test_copr_prune_results.py:21
  /builddir/build/BUILD/copr-backend-1.176/tests/run/test_copr_prune_results.py:21: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/run/test_copr_prune_results.py:26
  /builddir/build/BUILD/copr-backend-1.176/tests/run/test_copr_prune_results.py:26: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/run/test_copr_prune_results.py:31
  /builddir/build/BUILD/copr-backend-1.176/tests/run/test_copr_prune_results.py:31: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/run/test_copr_prune_results.py:36
  /builddir/build/BUILD/copr-backend-1.176/tests/run/test_copr_prune_results.py:36: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/test_frontend.py:14
  /builddir/build/BUILD/copr-backend-1.176/tests/test_frontend.py:14: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/test_frontend.py:29
  /builddir/build/BUILD/copr-backend-1.176/tests/test_frontend.py:29: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture

tests/run/test_copr_prune_results.py: 3 warnings
tests/test_action.py: 5 warnings
tests/test_modifyrepo.py: 16 warnings
  /usr/lib64/python3.12/tarfile.py:2221: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
    warnings.warn(

tests/test_action.py::TestAction::test_comps_create
  /usr/lib/python3.12/site-packages/httpretty/core.py:1077: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    now = datetime.utcnow()

tests/test_worker_manager.py::TestActionWorkerManager::test_add_task_for_running_worker
  /usr/lib64/python3.12/copy.py:151: DeprecationWarning: Pickle, copy, and deepcopy support will be removed from itertools in Python 3.14.
    rv = reductor(4)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR tests/test_helpers.py::TestHelpers::test_walk_limited - AttributeError:...
ERROR tests/test_helpers.py::TestHelpers::test_recursive_copy_and_link_rpms
ERROR tests/test_modifyrepo.py::TestModifyRepo::test_copr_repo_do_stat - Attr...
ERROR tests/test_modifyrepo.py::TestModifyRepo::test_copr_repo_rpms_to_remove_in_call
ERROR tests/test_sign.py::TestSign::test_call_sign_bin_repeatedly - Attribute...
====== 171 passed, 11 skipped, 35 warnings, 5 errors in 62.38s (0:01:02) =======

I think this could be related to this change:
https://github.com/pytest-dev/pytest/commit/c8792bd0800b8ffc536a6ce251f9eb3075b5f5fa
https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07167828-copr-backend/

For all our attempts to build copr-backend with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/copr-backend/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change proposal https://fedoraproject.org/wiki/Changes/Pytest_8

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Jakub Kadlčík 2024-04-10 11:50:48 UTC
Thank you for the report Tomáš,
much appreciated.

Modified in: https://github.com/fedora-copr/copr/pull/3213

Comment 2 Miro Hrončok 2024-04-10 14:04:38 UTC
We use bugzilla for tracking purposes. Landing the fix upstream is great, but enough to make the package build. We need this fixed in Fedora. Would you consider not closing this Fedora bugzilla until it is fixed in Fedora?

Comment 3 Miro Hrončok 2024-04-10 14:05:09 UTC
s/but enough to make the package build/but not enough to make the package build/

Comment 4 Pavel Raiskup 2024-04-10 14:18:55 UTC
We do release relatively often, so you may consider this fixed.  It's just a matter
of issue tracking house-cleaning; we prefer to track everything upstream.

Said that, feel free to keep this open if it matters (but we'll likely forget about
closing this at the right time anyway).

Comment 5 Miro Hrončok 2024-04-10 16:00:48 UTC
Thanks.


Note You need to log in before you can comment on or make changes to this bug.