diff options
Diffstat (limited to 'sources/pyside2/PySide2/support/signature/loader.py')
-rw-r--r-- | sources/pyside2/PySide2/support/signature/loader.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sources/pyside2/PySide2/support/signature/loader.py b/sources/pyside2/PySide2/support/signature/loader.py index 1827ca454..f51bafe79 100644 --- a/sources/pyside2/PySide2/support/signature/loader.py +++ b/sources/pyside2/PySide2/support/signature/loader.py @@ -40,13 +40,18 @@ from __future__ import print_function, absolute_import """ +loader.py + +The loader has to lazy-load the signature module and also provides a few +Python modules to support Python 2.7 . + This file was originally directly embedded into the C source. After it grew more and more, I now prefer to have it as Python file. -The remaining stub loader is a short string now. +The remaining stub loader in the C source is now only a short string. -The loader has to lazy-load the signature module and also provides a few -Python modules that I consider essential and therefore built-in. -This version does not use an embedded .zip file. +This version does no longer use an embedded .zip file but is a package. +The old code without a package but with zip compression can still be found +at https://codereview.qt-project.org/#/c/203533/ for reference. """ import sys @@ -64,7 +69,12 @@ else: import inspect namespace = inspect.__dict__ from PySide2.support.signature import backport_inspect as inspect + _doc = inspect.__doc__ inspect.__dict__.update(namespace) + inspect.__doc__ += _doc + # force inspect to find all attributes. See "heuristic" in pydoc.py! + inspect.__all__ = list(x for x in dir(inspect) if not x.startswith("_")) + # name used in signature.cpp from PySide2.support.signature.parser import pyside_type_init sys.path.pop(0) |