Details
Description
When using python 2 (2.7.15) and PySide2 5.12.3 or 5.13.0, and I have an "import typing" in the code, I get a RuntimeError due to a "maximum recursion depth exceeded" when using matplotlib (3.0.3, with Qt5Agg and pyside2 API).
Here is a minimum example which gives me the error (seeĀ error.txt):
import os import typing import matplotlib matplotlib.use("Qt5Agg") os.environ["QT_API"] = "pyside2" import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_axes([0, 0, 1, 1])
The RuntimeError disappears if I comment either "import typing" or 'os.environ["QT_API"] = "pyside2"', so I suppose there is a clash between typing and pyside2 (the typing27 module in shiboken2?)...only in python2. No problems with python3...
Attachments
For Gerrit Dashboard: PYSIDE-1073 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
271412,4 | Fix a typing bug in Python 2.7 and update | 5.13 | pyside/pyside-setup | Status: MERGED | +2 | 0 |