Bug 2188982

Summary: pytest self-testing fails with setuptools >= 67.5.0
Product: [Fedora] Fedora Reporter: Charalampos Stratakis <cstratak>
Component: pytestAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dradez, mhroncok, mrunge, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: pytest-7.3.1-2.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-25 10:07:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2135404, 2168842    

Description Charalampos Stratakis 2023-04-23 23:26:13 UTC
The latest setuptools emits a deprecation warning for pkg_resources.

This makes pytest's TestInvocationVariants.test_cmdline_python_namespace_package to fail with:

E       Failed: nomatch: 'test_hello.py::test_hello*PASSED*'
E           and: '============================= test session starts =============================='
E           and: 'platform linux -- Python 3.11.3, pytest-7.3.1, pluggy-1.0.0 -- /usr/bin/python3'
E           and: 'cachedir: .pytest_cache'
E           and: 'rootdir: /tmp/pytest-of-mockbuild/pytest-1/popen-gw8/test_cmdline_python_namespace_package0/world'
E           and: 'collecting ... collected 4 items'
E           and: ''
E       fnmatch: 'test_hello.py::test_hello*PASSED*'
E          with: 'test_hello.py::test_hello PASSED                                         [ 25%]'
E       fnmatch: 'test_hello.py::test_other*PASSED*'
E          with: 'test_hello.py::test_other PASSED                                         [ 50%]'
E       fnmatch: 'ns_pkg/world/test_world.py::test_world*PASSED*'
E          with: 'ns_pkg/world/test_world.py::test_world PASSED                            [ 75%]'
E       fnmatch: 'ns_pkg/world/test_world.py::test_other*PASSED*'
E          with: 'ns_pkg/world/test_world.py::test_other PASSED                            [100%]'
E       nomatch: '*4 passed in*'
E           and: ''
E           and: '=============================== warnings summary ==============================='
E           and: '../../../../../../usr/lib/python3.11/site-packages/pkg_resources/__init__.py:121'
E           and: '  /usr/lib/python3.11/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API'
E           and: '    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)'
E           and: ''
E           and: '-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html'
E           and: '========================= 4 passed, 1 warning in 0.11s ========================='
E       remains unmatched: '*4 passed in*'

/builddir/build/BUILD/pytest-7.3.1/testing/acceptance_test.py:705: Failed

Reproducible: Always

Steps to Reproduce:
Build the package in rawhide

Comment 1 Miro Hrončok 2023-04-24 08:33:55 UTC
Upstream PR: https://github.com/pytest-dev/pytest/pull/10938

Comment 2 Fedora Update System 2023-04-25 10:04:57 UTC
FEDORA-2023-6a8e8fa897 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6a8e8fa897

Comment 3 Fedora Update System 2023-04-25 10:07:14 UTC
FEDORA-2023-6a8e8fa897 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.