F42 Change Proposal: Deprecate python-pytest-runner (self-contained)

Deprecate python-pytest-runner

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Wiki
Announced

:link: Summary

The python-pytest-runner (python3-pytest-runner) package will be deprecated in Fedora Linux 42. Dependent packages are encouraged to switch to using pytest directly.

:link: Owner

:link: Detailed Description

pytest-runner has been considered deprecated upstream since 2019 and the repo upstream was archived over a year ago (December 3, 2023).

Per upstream,

pytest-runner depends on deprecated features of setuptools and relies on features that break security mechanisms in pip. For example setup_requires and tests_require bypass pip --require-hashes. See also Deprecate test command ¡ Issue #1684 ¡ pypa/setuptools ¡ GitHub.

:link: How to migrate to pytest

  • Remove ‘pytest-runner’ from your ‘setup_requires’, preferably removing the setup_requires option.
  • Remove ‘pytest’ and any other testing requirements from ‘tests_require’, preferably removing the setup_requires option.
  • See our guidelines for how to specify test dependencies
  • Invoke tests with pytest
  • Another good option is to configure a tox.ini next to your setup.cfg. tox

:link: Feedback

:link: Benefit to Fedora

The security benefits mostly do not apply to us, as we install dependencies from RPM packages. But preventing additional packages from depending on a package with a dead upstream that might increasingly become incompatible with newer setuptools releases would avoid us accumulating tech debt and having to deal with potential test runner failures in the future.

:link: Scope

  • Proposal owners:

    • Mark python-pytest-runner as deprecated in rawhide
    • Send PRs to affected packages to remove dependencies on this package
  • Other developers:

    • If your package depends on {{package|python-pytest-runner}, adjust it to drop the dependency
  • Release engineering: no impact anticipated

  • Policies and guidelines: N/A (not needed for this Change)

  • Trademark approval: N/A (not needed for this Change)

  • Alignment with the Fedora Strategy: N/A

:link: Upgrade/compatibility impact

N/A. This just deprecates the package, and stops it from being used in new dependencies.

:link: Early Testing (Optional)

Do you require ‘QA Blueprint’ support? N

:link: How To Test

$ fedrq pkgs python3-pytest-runner -F provides | grep deprecated deprecated()

:link: User Experience

No changes

:link: Dependencies

N/A (not a system-wide change)

:link: Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No

:link: Documentation

N/A (not a System Wide Change)

:link: Release Notes

Last edited by @salimma 2025-01-06T20:20:54Z

Last edited by @salimma 2025-01-06T20:20:54Z

How do you feel about the proposal as written?

  • Strongly in favor
  • In favor, with reservations
  • Neutral
  • Opposed, but could be convinced
  • Strongly opposed
0 voters

If you are in favor but have reservations, or are opposed but something could change your mind, please explain in a reply.

We want everyone to be heard, but many posts repeating the same thing actually makes that harder. If you have something new to say, please say it. If, instead, you find someone has already covered what you’d like to express, please simply give that post a :heart: instead of reiterating. You can even do this by email, by replying with the heart emoji or just “+1”. This will make long topics easier to follow.

Please note that this is an advisory “straw poll” meant to gauge sentiment. It isn’t a vote or a scientific survey. See About the Change Proposals category for more about the Change Process and moderation policy.

Please, don’t recommend that. Ideally, test dependencies should be specified via tox, dependency groups or extras.

1 Like

that was from the upstream deprecation notice, but thanks, I’ll remove it from the change proposal

I replaced the problematic part with a reference to Python Packaging Guidelines :: Fedora Docs

1 Like

Can you add a list of affected packages? Hopefully by maintainer and by package name? This would allow maintainers to easily see if they were affected by this.
It would have been nice to have this done before the mass rebuild (so all those affected packages would fail to build), but since thats 1 week away, not sure thats possible now.

I’ll let @salimma take care of any modifications to the proposal, but for now, a list of affected packages is available in the original devel list email.

However, I’d like to clarify that the proposal is for marking the package deprecated and for an effort to incrementally reduce the number of packages relying on it, primarily by offering PR’s. The proposal does not include retiring the package while other packages are still using it, or doing anything else that would cause previously-working packages to fail to build from source.

Ah, ok. Fair enough then…

This change proposal has now been submitted to FESCo with ticket #3337 for voting.

To find out more, please visit our Changes Policy documentation.