From Fedora Project Wiki
(mark ready)
(adding tracker links)
 
(6 intermediate revisions by 3 users not shown)
Line 3: Line 3:
= Deprecate python-pytest-runner =
= Deprecate python-pytest-runner =


{{Change_Proposal_Banner}}


== Summary ==
== Summary ==
Line 16: Line 15:
This should link to your home wiki page so we know who you are.  
This should link to your home wiki page so we know who you are.  
-->
-->
* Name: [[User:salimma|Michel Lind]]
* Name: [[User:salimma|Michel Lind]], [[User:music|Ben Beasley]]
<!-- Include you email address that you can be reached should people want to contact you about helping with your change, status is requested, or technical issues need to be resolved. If the change proposal is owned by a SIG, please also add a primary contact person. -->
<!-- Include you email address that you can be reached should people want to contact you about helping with your change, status is requested, or technical issues need to be resolved. If the change proposal is owned by a SIG, please also add a primary contact person. -->
* Email: michel@michel-slm.name
* Email: michel@michel-slm.name, code@musicinmybrain.net
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
* FESCo shepherd: [[User:FASAccountName| Shehperd name]] <email address>
* FESCo shepherd: [[User:FASAccountName| Shehperd name]] <email address>
-->
-->


== Current status ==
== Current status ==
[[Category:ChangeReadyForWrangler]]
[[Category:ChangeAcceptedF42]]
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
Line 43: Line 41:
ON_QA -> change is fully code complete
ON_QA -> change is fully code complete
-->
-->
* [<link to devel-announce post will be added by Wrangler> Announced]
* [https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/UETMPN6DHULHYJZPH52DDFPPJMRHJBYC/ Announced]
* [<will be assigned by the Wrangler> Discussion thread]
* [https://discussion.fedoraproject.org/t/f42-change-proposal-deprecate-python-pytest-runner-self-contained/141620 Discussion thread]
* FESCo issue: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/3337 #3337]
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2342231 #2342231
* Release notes tracker: <will be assigned by the Wrangler>
* Release notes tracker: [https://gitlab.com/fedora/docs/fedora-linux-documentation/release-notes/-/issues/162 #162]


== Detailed Description ==
== Detailed Description ==
Line 66: Line 64:
* Remove 'pytest-runner' from your 'setup_requires', preferably removing the `setup_requires` option.
* 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.
* Remove 'pytest' and any other testing requirements from 'tests_require', preferably removing the `setup_requires` option.
* Use a requirement-test.txt file to hold test dependencies
* See [https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_test_dependencies_2 our guidelines] for how to specify test dependencies
* Invoke tests with ``pytest``
* Invoke tests with `pytest`
* Another good option is to configure a ``tox.ini`` next to your ``setup.cfg`` https://tox.readthedocs.io/en/latest/
* Another good option is to configure a `tox.ini` next to your `setup.cfg`. https://tox.readthedocs.io/en/latest/


== Feedback ==
== Feedback ==

Latest revision as of 11:45, 27 January 2025


Deprecate python-pytest-runner

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.


Owner

Current status

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 https://github.com/pypa/setuptools/issues/1684.


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. https://tox.readthedocs.io/en/latest/

Feedback

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.

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

Upgrade/compatibility impact

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


Early Testing (Optional)

Do you require 'QA Blueprint' support? N

How To Test

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


User Experience

No changes

Dependencies

N/A (not a system-wide change)

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


Documentation

N/A (not a System Wide Change)

Release Notes