Skip to content
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

All identifiers should be passed to autodoc-skip-member, even if not in __all__ #8119

Closed
jkugler opened this issue Aug 13, 2020 · 0 comments
Closed
Labels
extensions:autodoc type:enhancement enhance or introduce a new feature
Milestone

Comments

@jkugler
Copy link

jkugler commented Aug 13, 2020

Is your feature request related to a problem? Please describe.
I have a Python project for which I've generated docs. It did well. Almost everything was doc'ed. I knew about the default of excluding anything starting with '_' so I created an autodoc-skip-member function that would include those. It works. I see a bunch of private methods and functions included.

But...I have a module, let's call it XYZ that has both private and public functions. Sphinx is only doc'ing the public functions of XYZ, but not its private functions. I have other modules that have private functions, and it's doc'ing those .I added a print() to the autodoc-skip-member function and it doesn't even print out the name of those private functions so it seems it's not even seeing it.

I figured it out. The module had certain identifiers listed in __all__, and was not passing anything else in that module to autodoc-skip-member.

Describe the solution you'd like
Sphinx should pass through all members, not just the ones in __all__. Maybe add something to the options object that is passed to autodoc-skip-members that indicates it would have been excluded by the __all__ designator, or some such.

Describe alternatives you've considered
I simply removed the __all__ from the file.

@jkugler jkugler added the type:enhancement enhance or introduce a new feature label Aug 13, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Aug 14, 2020
…ot in __all__

This allows `autodoc-skip-member` handlers to determine whether a member
not included in `__all__` attribute of the module should be documented or
not.
@tk0miya tk0miya added this to the 3.3.0 milestone Aug 14, 2020
@tk0miya tk0miya modified the milestones: 3.3.0, 3.4.0 Nov 1, 2020
@tk0miya tk0miya closed this as completed in 9f0f34c Nov 8, 2020
tk0miya added a commit that referenced this issue Nov 8, 2020
…er_not_in_module.__all__

Close #8119: autodoc: Control visibility of module member not in __all__
heapcrash added a commit to heapcrash/pwntools that referenced this issue Feb 25, 2021
Per these resources:
* sphinx-doc/sphinx#8119
* sphinx-doc/sphinx#8125

Sphinx 3.4.0 now handles autodoc-skip-member differently, causing us to run
some tests multiple times due to imported code getting tested.
heapcrash added a commit to Gallopsled/pwntools that referenced this issue Feb 25, 2021
Per these resources:
* sphinx-doc/sphinx#8119
* sphinx-doc/sphinx#8125

Sphinx 3.4.0 now handles autodoc-skip-member differently, causing us to run
some tests multiple times due to imported code getting tested.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions:autodoc type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants