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):
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...