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

bpo-44426: Use of 'complex' as a variable name confuses recent Sphinx; change to 'num' #26744

Merged

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Jun 15, 2021

Sphinx 4.0.2 misidentifies the name 'complex' as a C keyword, and issues a warning as a result. Sphinx is wrong here: complex is not a keyword (it's a macro), and Py_complex _Py_c_neg(Py_complex complex); is a valid C declaration (unless complex.h has been included). Nevertheless, it's not a great name. This PR changes it to num, which is already used elsewhere in the same file.

https://bugs.python.org/issue44426

@mdickinson mdickinson added docs Documentation in the Doc dir skip news needs backport to 3.10 only security fixes labels Jun 15, 2021
@mdickinson mdickinson added the needs backport to 3.9 only security fixes label Jun 16, 2021
@mdickinson mdickinson merged commit 7247f6f into python:main Jun 16, 2021
@miss-islington
Copy link
Contributor

Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 16, 2021
…nge it to 'num'. (pythonGH-26744)

(cherry picked from commit 7247f6f)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jun 16, 2021
@bedevere-bot
Copy link

GH-26760 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 16, 2021
…nge it to 'num'. (pythonGH-26744)

(cherry picked from commit 7247f6f)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jun 16, 2021
@bedevere-bot
Copy link

GH-26761 is a backport of this pull request to the 3.9 branch.

@mdickinson mdickinson deleted the doc/workaround-sphinx-complex-complaint branch June 16, 2021 17:44
mdickinson pushed a commit that referenced this pull request Jun 16, 2021
mdickinson pushed a commit that referenced this pull request Jun 16, 2021
jdevries3133 pushed a commit to jdevries3133/cpython that referenced this pull request Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants