Bug 1528899

Summary: python2: test.test_support is in -libs, but test.support (now aliased be the previous) is in -test
Product: [Fedora] Fedora Reporter: Nehal J Wani <nehaljw.kkd1>
Component: python2Assignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: bkabrda, cstratak, dmalcolm, mcyprian, mhroncok, nehaljw.kkd1, pviktori, rkuska, tomspur, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python2-2.7.14-11.fc28 python2-2.7.14-7.fc27 python2-2.7.14-5.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-20 17:17:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nehal J Wani 2017-12-25 06:39:06 UTC
Version-Release number of selected component (if applicable): 2.7.14-2


Steps to Reproduce:

~/Downloads ❯❯❯ python2 -c "import test.test_support"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.7/test/test_support.py", line 2, in <module>
    import test.support
ImportError: No module named support


Actual results: Import fails


Expected results: Import should succeed


Additional info:
From python 2.7.14 changelog:
    - bpo-30207: To simplify backports from Python 3, the test.test_support
      module was converted into a package and renamed to test.support.  The
      test.script_helper module was moved into the test.support package.
      Names test.test_support and test.script_helper are left as aliases to
      test.support and test.support.script_helper.


ArchLinux doesn't have this problem:

[nwani@centos7 ~]$ sudo docker run --rm -it base/archlinux
[root@8a83fd9e5514 /]# pacman -Syu python2
[root@8a83fd9e5514 /]# python2 -c "import test.test_support"
[root@8a83fd9e5514 /]#

Comment 1 Miro Hrončok 2017-12-25 20:10:14 UTC
The test module is packaged as python2-test in Fedora (as most of the users don't need it and it has almost the same size as the rest of the standard library (packaged as python2-libs).

If you dnf install python2-test, all mentioned modules work:


$ python2
Python 2.7.14 (default, Dec 11 2017, 14:52:53) 
[GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import test.test_support
>>> import test.support
>>> import test.script_helper
>>> import test.support.script_helper
>>> 


However, as I wondered why /usr/lib64/python2.7/test/test_support.py is in python2-libs and /usr/lib64/python2.7/test/support/ is in python2-test, I see from the specfile that test.test_support was deliberately in python2-libs.

We should move test.support as well. Thanks for the report.

Comment 2 Miro Hrončok 2018-02-15 16:07:16 UTC
PR in progress. https://src.fedoraproject.org/rpms/python2/pull-request/11

Comment 3 Fedora Update System 2018-02-17 15:17:11 UTC
python2-2.7.14-7.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-16e632ab53

Comment 4 Fedora Update System 2018-02-17 19:55:55 UTC
python2-2.7.14-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0be6ceb3e0

Comment 5 Fedora Update System 2018-02-17 23:13:15 UTC
python2-2.7.14-7.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-16e632ab53

Comment 6 Fedora Update System 2018-02-18 18:13:41 UTC
python2-2.7.14-5.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0be6ceb3e0

Comment 7 Fedora Update System 2018-02-20 17:17:08 UTC
python2-2.7.14-7.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-03-06 17:27:28 UTC
python2-2.7.14-5.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.