Bug 1808384 - python-linecache2: FTBFS in Fedora rawhide: No module named 'unittest2'
Summary: python-linecache2: FTBFS in Fedora rawhide: No module named 'unittest2'
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-linecache2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: PYTHON39 1794222 F33FTBFS
TreeView+ depends on / blocked
 
Reported: 2020-02-28 11:21 UTC by Miro Hrončok
Modified: 2020-02-28 11:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-28 11:25:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-02-28 11:21:08 UTC
Description of problem:
Package python-linecache2 fails to build from source in Fedora rawhide.

+ /usr/bin/python3 -m unittest -v
linecache2.tests.test_linecache (unittest.loader._FailedTest) ... ERROR
======================================================================
ERROR: linecache2.tests.test_linecache (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: linecache2.tests.test_linecache
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/builddir/build/BUILD/linecache2-1.0.0/linecache2/tests/test_linecache.py", line 4, in <module>
    import unittest2 as unittest
ModuleNotFoundError: No module named 'unittest2'
----------------------------------------------------------------------

In commit https://src.fedoraproject.org/rpms/python-linecache2/c/40b3cd8b18b850cdafe787ce765021333b287e45?branch=master the dependency on unittest2 was removed, but it was pulled into the buildroot anyway, transitively. The package needs to be patched to import unittest instead of unittest2.

Version-Release number of selected component (if applicable):
1.0.0-26.fc32

Steps to Reproduce:
koji build --scratch f33 python-linecache2-1.0.0-26.fc32.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-linecache2
https://koschei.fedoraproject.org/build/8007822


This also blocks the Python 3.9 rebuild.

Comment 1 Miro Hrončok 2020-02-28 11:25:08 UTC
Pushed to master and f32.

Comment 2 Miro Hrončok 2020-02-28 11:26:30 UTC
As as side note, nothing requires python3-linecache2 in Fedora. I suppose we could also retire it.


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