From Fedora Project Wiki
(First draft of a new change proposal)
 
m (Add trackers)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Unification of placement of Python test modules =
= Move <code>test.support</code> module to <code>python3-test</code> subpackage =


== Summary ==
== Summary ==
Python itself comes with a lot of test modules. Some of them are widely used and some of them are not. Because the usage of test modules outside Python itself is not supported, It would be better to have all of them in the one subpackage <code>python3-test</code> to identify which parts are actually useful outside Python itself and then we can propose a move of those parts somewhere else to the standard library. This approach is related to [https://www.python.org/dev/peps/pep-0594/ PEP 594], which is aimed to remove old and unused modules from the standard library.  
 
Move <code>test.support</code> from <code>python3-libs</code> to <code>python3-test</code> subpackage.


== Owner ==
== Owner ==
Line 23: Line 24:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
<!-- * Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1598524| 1598524] -->
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1728780 #1728780]
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/358 #358]


== Detailed Description ==
== Detailed Description ==


Python test modules should be used only for testing Python itself. However, some packages have buildtime or runtime dependency on parts of Python test modules and moreover those modules are placed in various Python subpackages (<code>python3-libs</code>, <code>python3-idle</code>, <code>python3-test</code>). This situation makes it hard finding out which test modules are actually useful and it'd make sense to make them a regular part of the standard library. This might also help to distinguish which parts are useless and can be removed during the clean up described in [https://www.python.org/dev/peps/pep-0594/ PEP 594].
Python test modules should be used only for testing Python itself. However, some packages have buildtime or runtime dependency on parts of Python test modules. The aim of this change is to move the most popular Python test module <code>test.support</code> from <code>python3-libs</code> to <code>python3-test</code> subpackage which will help us discover packages which depend on it and also identify parts of the module which might be useful to move to standard library.
 
Also, [https://docs.python.org/3/library/test.html#module-test.support the Python documentation] says test.support is not a public module. Other things should not depend on it, and if something is useful outside the CPython test suite, we should ideally take it out of test.support.


== Benefit to Fedora ==
== Benefit to Fedora ==


All Python test modules will be contained in one subpackage which helps us understand which parts of Python test suite are useful and which is worth to move to the standard library.
The main benefit here is that moving it all to -test is less fragile and more consistent.
 
In the long run, it also helps us understand which parts of Python test suite are useful and which is worth to move to the standard library. (Note that the change owners have already done some pre-scoping, see the ''Scope'' section for the list of packages expected to be affected by this change.)
 
There were also a few bugs caused by parts of the test module packaged in different subpackages and by differences between Python 2 and 3 - [https://bugzilla.redhat.com/show_bug.cgi?id=1651245 RHBZ#1651245], [https://bugzilla.redhat.com/show_bug.cgi?id=1528899 RHBZ#1528899], [https://bugzilla.redhat.com/show_bug.cgi?id=596258 RHBZ#596258]


== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners:
** Move all test modules from other Python subpackages to the -test subpackage
** Move <code>test.support</code> from <code>python3-libs</code> to <code>python3-test</code> subpackage.
** Identify as many as possible affected packages and try to fix their buildtime/runtime issues caused by the change
** During investigating the impact of the change in COPR, We've found only seven affected packages and four of those packages already depends on python3-test. We'll prepare pull requests for affected packages we know about and we'll also help package maintainers in case of any unexpected troubles. Here is the list of affected packages (from 2019-06-28):
*** {{package|python-heapdict}}
*** {{package|python-typing-extensions}}
*** {{package|python-zodbpickle}}
*** {{package|yubikey-piv-manager}}
*** {{package|python-bz2file}}
*** {{package|python-iniparse}}
*** {{package|python-pathlib2}}


* Other developers:  
* Other developers:  
** If a package depends on some module which we move to -test subpackage, change the build/runtime dependencies definition accordingly
** If a package depends on <code>test.support</code> module which we move to -test subpackage, change the build/runtime dependencies definition accordingly.


* Release engineering: N/A (not a System Wide Change)
* Release engineering: N/A (not a System Wide Change)
Line 73: Line 88:
Since this affects only a few packages, no release notes are necessary.
Since this affects only a few packages, no release notes are necessary.


[[Category:ChangePageIncomplete]]
[[Category:ChangeAcceptedF31]]
<!-- 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 -->

Latest revision as of 17:00, 10 July 2019

Move test.support module to python3-test subpackage

Summary

Move test.support from python3-libs to python3-test subpackage.

Owner

Current status

Detailed Description

Python test modules should be used only for testing Python itself. However, some packages have buildtime or runtime dependency on parts of Python test modules. The aim of this change is to move the most popular Python test module test.support from python3-libs to python3-test subpackage which will help us discover packages which depend on it and also identify parts of the module which might be useful to move to standard library.

Also, the Python documentation says test.support is not a public module. Other things should not depend on it, and if something is useful outside the CPython test suite, we should ideally take it out of test.support.

Benefit to Fedora

The main benefit here is that moving it all to -test is less fragile and more consistent.

In the long run, it also helps us understand which parts of Python test suite are useful and which is worth to move to the standard library. (Note that the change owners have already done some pre-scoping, see the Scope section for the list of packages expected to be affected by this change.)

There were also a few bugs caused by parts of the test module packaged in different subpackages and by differences between Python 2 and 3 - RHBZ#1651245, RHBZ#1528899, RHBZ#596258

Scope

  • Other developers:
    • If a package depends on test.support module which we move to -test subpackage, change the build/runtime dependencies definition accordingly.
  • Release engineering: N/A (not a System Wide Change)
  • Policies and guidelines: N/A (not a System Wide Change)
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

Test modules should not be used as a runtime dependency so there is no impact on an upgrade.

How To Test

N/A (not a System Wide Change)

User Experience

The user experience should not be affected.

Dependencies

N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: Changes will be mostly done in Python specfile and they can be easily reverted in case of some unexpected issues. The second possibility is to set Provides to temporarily deactivate the impact of the change.
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change)
  • Blocks product? No.

Documentation

N/A (not a System Wide Change)

Release Notes

Since this affects only a few packages, no release notes are necessary.