Bug 1497336 - backports.functools_lru_cache cannot be imported
Summary: backports.functools_lru_cache cannot be imported
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-backports-functools_lru_cache
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-29 20:16 UTC by Elliott Sales de Andrade
Modified: 2017-10-10 19:30 UTC (History)
6 users (show)

Fixed In Version: python-backports-functools_lru_cache-1.4-3.fc27
Clone Of:
Environment:
Last Closed: 2017-10-10 19:30:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.