Bug 1709599

Summary: installing python2-scipy doesn't properly pull in python2-six as a dependency
Product: Red Hat Enterprise Linux 8 Reporter: Ryan Mullett <rmullett>
Component: python27-2.7-moduleAssignee: Nikola Forró <nforro>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.2CC: cstratak, jkejda, kwalker, nforro, pviktori
Target Milestone: rc   
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python27-2.7-8010020190606164356.51c94b97 Doc Type: Bug Fix
Doc Text:
Cause: python{2,3}-scipy packages were missing python{2,3}-six runtime dependency Consequence: scipy module failed to import Fix: missing dependencies were added Result: scipy module can now be imported
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 20:44:11 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 Ryan Mullett 2019-05-13 22:58:57 UTC
Description of problem:
When installing python2-scipy python2-six is not properly resolved and pulled in. After installing just python2-scipy and attempting to import it there is a traceback for the missing six modules.

Version-Release number of selected component (if applicable):
python2-scipy-1.0.0-19.module+el8.0.0+2961+596d0223.x86_64

How reproducible:
Always

Steps to Reproduce:

1. # yum install python2-scipy

2. # python2
Python 2.7.15 (default, Apr  4 2019, 20:16:50) 
[GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

3. >>> import scipy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/scipy/__init__.py", line 109, in <module>
    from scipy._lib._version import NumpyVersion as _NumpyVersion
  File "/usr/lib64/python2.7/site-packages/scipy/_lib/_version.py", line 11, in <module>
    from six import string_types
ImportError: No module named six

Actual results:

python2-scipy doesn't pull in python2-six as a dependency. 

Expected results:

python2-scipy should pull in python2-six as a dependency. If you manually install python2-six then python2-scipy does actually function as intended and you can import and utilize it.

Additional info:

I see that we unbundled six from python2-scipy in the following bug (for 2.7)
https://bugzilla.redhat.com/show_bug.cgi?id=1647341

I also see that the spec does still have a requires on python2-six. I dug a bit and wasn't able to find exactly why it's not getting resolved to pull in python2-six. I did confirm that python2-scipy isn't showing that it actually provides python2-six, and that python2-six does show itself providing python2-six.

# yum provides python2-six
Updating Subscription Management repositories.
Last metadata expiration check: 2:29:08 ago on Mon 13 May 2019 04:21:20 PM EDT.
python2-six-1.11.0-4.module+el8+2540+b19c9b35.noarch : Python 2 and 3 compatibility utilities
Repo        : rhel-8-for-x86_64-appstream-rpms
Matched from:
Provide    : python2-six = 1.11.0-4.module+el8+2540+b19c9b35

python2-six-1.11.0-5.module+el8.0.0+2961+596d0223.noarch : Python 2 and 3 compatibility utilities
Repo        : rhel-8-for-x86_64-appstream-rpms
Matched from:
Provide    : python2-six = 1.11.0-5.module+el8.0.0+2961+596d0223

[root@localhost ~]# repoquery --provides python2-scipy
Updating Subscription Management repositories.
Last metadata expiration check: 2:32:25 ago on Mon 13 May 2019 04:21:20 PM EDT.
python2-scipy = 1.0.0-18.module+el8+2540+b19c9b35
python2-scipy = 1.0.0-19.module+el8.0.0+2961+596d0223
python2-scipy(x86-64) = 1.0.0-18.module+el8+2540+b19c9b35
python2-scipy(x86-64) = 1.0.0-19.module+el8.0.0+2961+596d0223
python2.7dist(scipy) = 1.0.0
python2dist(scipy) = 1.0.0

[root@localhost ~]# repoquery --provides python2-six
Updating Subscription Management repositories.
Last metadata expiration check: 2:32:34 ago on Mon 13 May 2019 04:21:20 PM EDT.
python2-six = 1.11.0-4.module+el8+2540+b19c9b35
python2-six = 1.11.0-5.module+el8.0.0+2961+596d0223
python2.7dist(six) = 1.11.0
python2dist(six) = 1.11.0

As a side note to this as well, the issue isn't present for python3, so I didn't have to open up a bug for that. The reason being that python3-six is actually a core package, and not having it on the system isn't viable for RHEL 8 (if you tried to remove it it's going to attempt to remove protected packages like dnf), so python3-scipy doesn't hit the issue. That being said, I could imagine a scenario where there is an update to python3-scipy and python3-six that results in python3-scipy not pulling in a required updated version of python3-six, so we may want to look into that as well once the python2 cause is identified.

Comment 1 Charalampos Stratakis 2019-05-30 17:11:26 UTC
I think the problem is that the Requires are applied on the srpm and not on the correct sections at the %package directives of the python*-* binary rpms.

Comment 7 errata-xmlrpc 2019-11-05 20:44:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3335