Bug 1497336

Summary: backports.functools_lru_cache cannot be imported
Product: [Fedora] Fedora Reporter: Elliott Sales de Andrade <quantum.analyst>
Component: python-backports-functools_lru_cacheAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dmach, gwync, ignatenko, jmracek, orion, rpm-software-management
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-backports-functools_lru_cache-1.4-3.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-10 19:30:06 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 Elliott Sales de Andrade 2017-09-29 20:16:50 UTC
Description of problem:
When python-backport-functools_lru_cache is installed directly, then it cannot be imported.

Version-Release number of selected component (if applicable):
python2-backports-functools_lru_cache-1.4-2.fc27.noarch


Steps to Reproduce:
$ mock -r fedora-27-x86_64 --install python2-backports-functools_lru_cache
$ mock -r fedora-27-x86_64 --shell
# python2
Python 2.7.13 (default, Aug 16 2017, 12:56:26) 
[GCC 7.1.1 20170802 (Red Hat 7.1.1-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from backports import functools_lru_cache
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named backports
>>> import backports.functools_lru_cache
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named backports.functools_lru_cache


The --install line installs: python2-backports-functools_lru_cache, python2, python2-libs, python2-pip, python2-setuptools

I believe the problem is that there is a missing `Requires: python2-backports` which was recently split out. This affects Fedora 27 and Rawhide, but not 26 which didn't see that split.

Comment 1 Gwyn Ciesla 2017-10-02 12:42:58 UTC
It's working for me on rawhide, it requires python-backports, which is provided by python2-backports.

By 'installed directly', do you mean pip or dnf?

Comment 2 Elliott Sales de Andrade 2017-10-02 19:26:11 UTC
Meaning dnf. Did you try a clean chroot? Neither Rawhide nor 27 works if all you install is python2-backports-functools_lru_cache. dnf does not install python2-backports.

Comment 3 Gwyn Ciesla 2017-10-05 16:03:12 UTC
Then I think this might be a DNF bug.

Comment 4 Igor Gnatenko 2017-10-05 19:38:20 UTC
$ sudo dnf repoquery --requires python2-backports-functools_lru_cache 2>/dev/null
python(abi) = 2.7


If it requires python2-backports, then package should have Requires: python2-backports...

Comment 5 Elliott Sales de Andrade 2017-10-05 19:50:17 UTC
(In reply to Elliott Sales de Andrade from comment #0)
> I believe the problem is that there is a missing `Requires:
> python2-backports` which was recently split out. This affects Fedora 27 and
> Rawhide, but not 26 which didn't see that split.

Oh, I was slightly wrong there. There *is* a dependency on python-backports, but it's applied to the main package. It should be applied to the python2-* subpackage (and preferably changed to python2-backports).

Comment 6 Gwyn Ciesla 2017-10-06 12:24:40 UTC
AHhhhhh!  Thank you.  That'll teach me to reassign a bug when I'm busy. Apologies.  Fix coming ASAP.

Comment 7 Fedora Update System 2017-10-06 12:36:38 UTC
python-backports-functools_lru_cache-1.4-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-14b3f8ebf7

Comment 8 Fedora Update System 2017-10-06 22:26:28 UTC
python-backports-functools_lru_cache-1.4-3.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-2017-14b3f8ebf7

Comment 9 Fedora Update System 2017-10-10 19:30:06 UTC
python-backports-functools_lru_cache-1.4-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.