A few fixes related to how we set `__qualname__` and how we show the type name in function signatures: - `__qualname__` isn't supposed to have the module name at the beginning, but we've been putting it there. This removes it, while keeping the `Nested.Class` name chaining. - print `__module__.__qualname__` rather than `type->tp_name`; the latter doesn't work properly for nested classes, so we would get `module.B` rather than `module.A.B` for a class `B` with parent `A`. This also unifies the Python 3 and PyPy code. Fixes #1166. - This now sets a `__qualname__` attribute on the type (as would happen in Python 3.3+) for Python <3.3, including PyPy. While not particularly important to have in earlier Python versions, it's useful for us to be able to extracted the nested name, which is why `__qualname__` was invented in the first place. - Added tests for the above.
| Name |
Last commit
|
Last Update |
|---|---|---|
| docs | Loading commit data... | |
| include/pybind11 | Loading commit data... | |
| pybind11 | Loading commit data... | |
| tests | Loading commit data... | |
| tools | Loading commit data... | |
| .appveyor.yml | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| .readthedocs.yml | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CONTRIBUTING.md | Loading commit data... | |
| ISSUE_TEMPLATE.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| MANIFEST.in | Loading commit data... | |
| README.md | Loading commit data... | |
| setup.cfg | Loading commit data... | |
| setup.py | Loading commit data... |