-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
BUG: Autosummary may fail on global variables with overriden __eq__ #8583
Labels
Milestone
Comments
I believe the cause is the use of
I think
|
This was referenced Dec 23, 2020
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Dec 24, 2020
…eq__`` method It should be compared by `is` keyword instead.
Thank you for reporting. Indeed, this must be a bug! |
tk0miya
added a commit
that referenced
this issue
Dec 24, 2020
Fix #8583: autodoc: Unnecessary object comparision via ``__eq__`` method
thanks @tk0miya! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is specific to 3.4.0
Autosummary may fail on a global variable whose value is an object with an
__eq__
implementation that raises an error.Example
For example, let's say I have a module that looks like this:
foo
__eq__
behavior is strict, and may raise an errorWhen running Sphinx, autosummary will fail.
(This code example is a little contrived but hopefully it illustrates well enough—it's a very simplified version of our actual use case)
To Reproduce
I have a minimal repro here: https://github.com/timothydijamco/sphinx-eq-bug-repro
Running the below will hit the error if using Sphinx 3.4.0 (but not with Sphinx 3.3.1).
Expected behavior
Sphinx should finish building successfully (it builds OK when using 3.3.1).
Environment info
The text was updated successfully, but these errors were encountered: