X Tutup
Skip to content

BUG: super requires at least 1 argument #7664

@larsoner

Description

@larsoner
  • Matplotlib 'master', Python 2.7.12 Linux x86_64

  • System python, matplotlib installed with python setup.py build; pip install -e --user .

  • SSCCE:

    >>> import matplotlib.pyplot as plt
    >>> from mpl_toolkits.mplot3d import Axes3D
    >>> ax = plt.subplot(111, projection='3d')
    File "/home/larsoner/custombuilds/matplotlib/lib/matplotlib/pyplot.py", line 1042, in subplot
    fig = gcf()
    File "/home/larsoner/custombuilds/matplotlib/lib/matplotlib/pyplot.py", line 585, in gcf
    return figure()
    File "/home/larsoner/custombuilds/matplotlib/lib/matplotlib/pyplot.py", line 534, in figure
    **kwargs)
    File "/home/larsoner/custombuilds/matplotlib/lib/matplotlib/backends/backend_qt5agg.py", line 44, in new_figure_manager
    return new_figure_manager_given_figure(num, thisFig)
    File "/home/larsoner/custombuilds/matplotlib/lib/matplotlib/backends/backend_qt5agg.py", line 52, in new_figure_manager_given_figure
    return FigureManagerQT(canvas, num)
    File "/home/larsoner/custombuilds/matplotlib/lib/matplotlib/backends/backend_qt5.py", line 494, in __init__
    tbs_height = self.toolbar.sizeHint().height()
    File "/home/larsoner/custombuilds/matplotlib/lib/matplotlib/backends/backend_qt5.py", line 643, in sizeHint
    size = super().sizeHint()
    TypeError: super() takes at least 1 argument (0 given)
    
    
  • Works on 1.5.3, can git blame if this makes sense.

Changing it to the Py27-compatible size = super(NavigationToolbar2QT, self).sizeHint() seems to work, happy to open a PR if it seem like the right fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUI: QtRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup