F40 Change Proposal: Remove Python Mock Useage (System-Wide)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wiki -> https://fedoraproject.org/wiki/Changes/RemovePythonMockUsage

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.


== Summary ==
`python-mock` has been [[Changes/DeprecatePythonMock|deprecated since
Fedora 34]] - 6 releases ago, but is still in use in many packages. We
plan to go through the remaining usages and clean them up, with the
goal of retiring `python-mock` from Fedora.

== Owner ==
* Name: [[User:Salimma|Michel Lind]]
* Email: michel @ michel-slm.name

* Name: [[ User:Gotmax23|Maxwell G]]
* Email: maxwell @ gtmx.me



== Detailed Description ==
`python-mock` has been marked as deprecated since Fedora 34, but many
packages are still using it

Binary packages from 16 source packages require `python3-mock`
 <nowiki>
 $ fedrq whatrequires python3-mock -b rawhide -F source --notsrc | wc -l
 16
 $ repoquery -q --repo=rawhide{,-source} --whatrequires python3-mock |
grep -v src$ | wc -l
 16
 $ repoquery -q --repo=rawhide --whatrequires python3-mock --source | wc -l
 16
 </nowiki>

124 source packages require `python3-mock`
 <nowiki>
 $ fedrq whatrequires python3-mock -b rawhide -F source --src | wc -l
 124
 $ repoquery -q --repo=rawhide{,-source} --whatrequires python3-mock |
grep src$ | wc -l
 124
 </nowiki>

For a combined 134 packages
 <nowiki>
 $ fedrq whatrequires python3-mock -b rawhide -F source | wc -l
 134
 $ (repoquery -q --repo=rawhide{,-source} --whatrequires python3-mock
| grep src$; repoquery -q --repo=rawhide --whatrequires python3-mock
--source) | pkgname | sort | uniq | wc -l
 134
 </nowiki>

Some of these are false positives - packages not using dynamic build
requirements might still be marked as requiring `python-mock` after
upstream no longer does so. The rest should be easily portable as
described in the previous proposal.

Some packages could be dead upstream and not used by anything else in
Fedora, in which case we can consider removing them.

== Feedback ==

== Benefit to Fedora ==
Eventually, we might be able to no longer maintain a standard library
backport in a separate package.

This will also make branching packages for EPEL easier - there have
been several instances where the Fedora package needs to be modified
to not use `python-mock` because of a policy decision to not bring
`python-mock` into newer EPEL releases (where the default Python
already contains `unittest.mock`).

== Scope ==
* Proposal owners:
** Set up a COPR with a stub package providing `python3-mock` and
rebuild all packages that list python3-mock as a BR. The ones that
successfully build don't actually need it
** Put up PRs for the affected packages. In case the changes are
minimal and no response is heard from the package maintainers the PRs
will be merged after a sufficient time.
** Set up a second COPR to rebuild packages with the PRs applied to
remove `python3-mock`. This will allow us to track progress in one
place

* Other developers:
Package maintainers should review and merge any PRs filed against
their packages, and if necessary forward the patches upstream (e.g. by
filing upstream PRs).

* Release engineering: N/A (not needed for this Change)

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

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

* Alignment with Community Initiatives:
Not specifically, but this is in line with Fedora's "First" Foundation

== Upgrade/compatibility impact ==
N/A



== How To Test ==
Package owners who receive a PR should be able to verify that the CI
passes on the PR, and alternatively they can check the provided COPRs

== User Experience ==
No changes

== Dependencies ==
N/A

== Contingency Plan ==

* Contingency mechanism: defer retiring `python-mock` for another cycle
* Contingency deadline: Final Freeze
* Blocks release? No


== Documentation ==
The previous [[Changes/DeprecatePythonMock#How_to_migrate_to_unittest.mock|howto]]
on migrating to unittest.mock still applies.

Upstream [https://docs.python.org/3/library/unittest.mock.html
unittest.mock documentation]

== Release Notes ==



-- 
Aoife Moloney

Fedora Operations Architect

Fedora Project

Matrix: @amoloney:fedora.im

IRC: amoloney
--
_______________________________________________
devel-announce mailing list -- devel-announce@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-announce-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel-announce@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux