Bug 2279512 - python-domdf-python-tools fails to build with pytest 8: pytest.PytestRemovedIn9Warning: The (startdir: py.path.local) argument is deprecated, please use (start_path: pathlib.Path)
Summary: python-domdf-python-tools fails to build with pytest 8: pytest.PytestRemovedI...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-domdf-python-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Maxwell G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-05-07 09:33 UTC by Tomáš Hrnčiar
Modified: 2024-05-21 10:20 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-21 10:20:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-05-07 09:33:03 UTC
python-domdf-python-tools fails to build with pytest 8.

+ /usr/bin/pytest -v -k 'not test_discover_entry_points and not test_repr_deep'
Traceback (most recent call last):
  File "/usr/bin/pytest", line 8, in <module>
    sys.exit(console_main())
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 206, in console_main
    code = main()
           ^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 159, in main
    config = _prepareconfig(args, plugins)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 346, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/helpconfig.py", line 106, in pytest_cmdline_parse
    config = yield
             ^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1152, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1501, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1405, in _preparse
    self.hook.pytest_load_initial_conftests(
  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/warnings.py", line 150, in pytest_load_initial_conftests
    return (yield)
            ^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/capture.py", line 153, in pytest_load_initial_conftests
    yield
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1230, in pytest_load_initial_conftests
    self.pluginmanager._set_initial_conftests(
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 588, in _set_initial_conftests
    self._try_load_conftest(
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 636, in _try_load_conftest
    self._loadconftestmodules(
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 666, in _loadconftestmodules
    mod = self._importconftest(
          ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 742, in _importconftest
    self.consider_conftest(mod, registration_name=conftestpath_plugin_name)
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 823, in consider_conftest
    self.register(conftestmodule, name=registration_name)
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 519, in register
    self.consider_module(plugin)
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 831, in consider_module
    self._import_plugin_specs(getattr(mod, "pytest_plugins", []))
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 838, in _import_plugin_specs
    self.import_plugin(import_spec)
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 875, in import_plugin
    self.register(mod, modname)
  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 508, in register
    plugin_name = super().register(plugin, name)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 168, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 360, in _verify_hook
    _warn_for_function(argname_warning, hookimpl.function)
  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 41, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestRemovedIn9Warning: The (startdir: py.path.local) argument is deprecated, please use (start_path: pathlib.Path)
see https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path

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/07388807-python-domdf-python-tools/

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

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 Tomáš Hrnčiar 2024-05-21 10:20:46 UTC
I've got a successful build with pytest 8.2.1.

https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/build/7464096/


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