-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autodoc: fix detection of class methods implemented by extension modules #13200
autodoc: fix detection of class methods implemented by extension modules #13200
Conversation
Works. |
Btw, I'm not sure if this is something CPython wants to improve by adding some |
Can't you use CPython builtin classes (e.g. int) to test this? BTW, there is no "official" way to describe signatures for extensions. The gmp module (as many CPython builtins) uses funny notation in |
I can use built-in classes but I wanted some complex inheritance just in case. I guess I can write some tests with what I have already in hand though. |
IIRC, multiple inheritance does not work for statically defined types. |
Oh I see. Though, I thought about inheriting (in pure Python) from my custom built-in class just to check that we correctly pick up something written in C as well. What I didn't want to do is use a built-in whose signature rendering may change across versions for various reasons. It makes tests harder to maintain (something that usually happens for |
# Conflicts: # CHANGES.rst # sphinx/ext/autodoc/__init__.py
I agree with Sergey that using e.g. A |
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
I'm not on my dev session but I have some additional local work to commit tomorrow (something I overlooked was that we have |
Closes #13188.
cc @skirpichev
@AA-Turner do we have tests for this? I tested it locally but I'm not sure we're building a C extension module in Sphinx to test this.