Bug 1336740 - python-matplotlib bundles python-six 1.9.0 which tries to import winreg module and fails
Summary: python-matplotlib bundles python-six 1.9.0 which tries to import winreg modul...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-matplotlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dominik 'Rathann' Mierzejewski
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/matplotlib/matplot...
Whiteboard:
Depends On:
Blocks: DuplicSysLibsTracker 1336773
TreeView+ depends on / blocked
 
Reported: 2016-05-17 11:27 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2016-06-27 18:26 UTC (History)
7 users (show)

Fixed In Version: python-matplotlib-1.5.2-0.1.rc2.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-27 18:26:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2016-05-17 11:27:23 UTC
Description of problem:
python-matplotlib bundles python-six 1.9.0 in %{python2_sitearch}/matplotlib/externals/six.py
This bundled dependency should be unbundled or at least declared in Provides if it can't be unbundled.

Version-Release number of selected component (if applicable):
1.5.1-4.fc25

Additional info:
It's probably the reason why I'm seeing this traceback in python-Pympler (in review) tests:
Traceback (most recent call last):
  File "/builddir/build/BUILD/Pympler-0.4.3/test/tracker/test_classtracker.py", line 178, in test_snapshot_members
    self.tracker.create_snapshot(compute_total=True)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/classtracker.py", line 567, in create_snapshot
    snapshot.asizeof_total = asizeof.asizeof(all=True, code=True)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 2191, in asizeof
    s = _asizer.asizeof(*t)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 1783, in asizeof
    s, _ = self._sizes(objs, None)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 1753, in _sizes
    s[i] = self._sizer(o, 0, sized)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 1729, in _sizer
    s += z(o, d, None)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 1729, in _sizer
    s += z(o, d, None)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 1729, in _sizer
    s += z(o, d, None)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 1729, in _sizer
    s += z(o, d, None)
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 1728, in _sizer
    for o in r(obj, False):
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 536, in _refs
    for _, o in _dir2(obj, **kwds):
  File "/builddir/build/BUILDROOT/python-Pympler-0.4.3-1.fc25.noarch/usr/lib/python3.5/site-packages/pympler/asizeof.py", line 347, in _dir2
    if hasattr(obj, slots):
  File "/usr/lib/python3.5/site-packages/matplotlib/externals/six.py", line 116, in __getattr__
    _module = self._resolve()
  File "/usr/lib/python3.5/site-packages/matplotlib/externals/six.py", line 113, in _resolve
    return _import_module(self.mod)
  File "/usr/lib/python3.5/site-packages/matplotlib/externals/six.py", line 80, in _import_module
    __import__(name)
ImportError: No module named 'winreg'

The bundled six.py has this:
...
class _MovedItems(_LazyModule):
    """Lazy loading of moved objects"""
    __path__ = []  # mark as package

    
_moved_attributes = [
...
    MovedModule("winreg", "_winreg"),
]

while python-six-1.10.0 (current rawhide version) has this:
...
# Add windows specific modules.
if sys.platform == "win32":
    _moved_attributes += [
        MovedModule("winreg", "_winreg"),
    ]

Comment 1 Dominik 'Rathann' Mierzejewski 2016-05-17 12:21:45 UTC
Same for %{python3_sitearch}/matplotlib/externals/six.py in python3-matplotlib subpackage.

Comment 2 Dominik 'Rathann' Mierzejewski 2016-06-02 16:49:18 UTC
This should be fixed in rawhide now. Sorry it took so long, but I had quite a few hurdles when making sure the tests complete on all three primary arches. I've requested official commit access in PkgDB and will be filling bugs against matplotlib upstream. Though I see both 2.0.0rc1 and 1.5.2rc2 releases are tagged in github repo, so it might be good to test these first.

Comment 3 Dominik 'Rathann' Mierzejewski 2016-06-10 10:27:48 UTC
Reported upstream: https://github.com/matplotlib/matplotlib/issues/6537 , who decided to stop bundling six in the upcoming 2.0 release. 1.5.2rc2 seems to be much better when it comes to passing tests, so, I'll update to that version in F24+.

Comment 4 Fedora Update System 2016-06-23 09:51:10 UTC
python-matplotlib-1.5.2-0.1.rc2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-50c1adda5a

Comment 5 Fedora Update System 2016-06-23 18:56:32 UTC
python-matplotlib-1.5.2-0.1.rc2.fc24 has been pushed to the Fedora 24 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-2016-50c1adda5a

Comment 6 Fedora Update System 2016-06-27 18:26:14 UTC
python-matplotlib-1.5.2-0.1.rc2.fc24 has been pushed to the Fedora 24 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.