Since Fedora 37, the "pytest" script runs Python with the "-s" option. As a result, the test code can only use official Python packages installed via RPM, and doesn't see the user's locally installed packages with pip and so on. This is wrong - pytest is supposed to run the user's Python code, and use whatever libraries the user chose to install. The Fedora Python packaging guidelines at https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ explain that "-s" was added to Python shebangs for a reason: it explains that the "-s" "ensures the user’s Python packages (e.g. installed by pip install --user, or just placed in the current directory) don’t interfere with the RPM installed software.". However, the document immediately comments that "Sometimes, such content is desirable, such as with plugins.". This is exactly the case here in pytest: pytest is designed to run the user's Python code (the tests themselves), and it is very natural that the user will also want to use libraries that they installed themselves and not an official part of the system.
Fix component. python3-pytest is EPEL-only (but bugzilla doesn't know that).
https://src.fedoraproject.org/rpms/pytest/pull-request/34 https://src.fedoraproject.org/rpms/pytest/pull-request/35
FEDORA-2022-f8e5d427e7 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f8e5d427e7
FEDORA-2022-f8e5d427e7 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-a174e00184 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-a174e00184
FEDORA-2022-a174e00184 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-a174e00184` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-a174e00184 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-a174e00184 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.