8000 Missing brackets in docs: logging.handlers.SysLogHandler(address='localhost', SYSLOG_UDP_PORT,... · Issue #93108 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Missing brackets in docs: logging.handlers.SysLogHandler(address='localhost', SYSLOG_UDP_PORT,... #93108

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

Closed
magnus-lycka opened this issue May 23, 2022 · 6 comments
Labels
docs Documentation in the Doc dir

Comments

@magnus-lycka
Copy link

Documentation

In https://docs.python.org/3/library/logging.handlers.html#logging.handlers.SysLogHandler for Python 3.10.4,
the parentheses are missing for the address parameter, which is a tuple:

class logging.handlers.SysLogHandler(address='localhost', SYSLOG_UDP_PORT, facility=LOG_USER, socktype=socket.SOCK_DGRAM)

This looks like a syntax error...

The Python 3.9 docks are fine. I haven't checked whether this is a local oops of covers other tuple params as well.

@magnus-lycka magnus-lycka added the docs Documentation in the Doc dir label May 23, 2022
@Akuli
Copy link
Contributor
Akuli commented May 23, 2022

This seems to be a bug in sphinx that has been fixed in recent versions. The docs online have been built with sphinx 3.2.1, and I don't get parentheses when building the docs locally with that sphinx version. If I upgrade sphinx to 3.3.1, I get the parentheses.

@AA-Turner
Copy link
Member
AA-Turner commented May 23, 2022

The Python 3.11 docs are built with Sphinx 4.5, and have the brackets again. @JulienPalard what would be the precedent here for fixing this? I don't imagine we can update the Python 3.10 Sphinx version?

Sphinx only supports the latest version, so we're very unlikely to get a 3.2.2 release with a backported fix.

A

@JulienPalard
Copy link
Member

We'll have to run a test build before pushing this to docs.python.org, but I'm OK to bump Sphinx to 3.3.1 for Python 3.10. The thing we can't easily bump is the needs_sphinx (the minimum required version) but we don't need to touch it here.

@JulienPalard
Copy link
Member

I'm trying Sphinx==3.4.3, as Sphinx==3.5 is not compatible with Python 3.10 (sphinx-doc/sphinx#9512)...

This issue is solved in 3.4.3 \o/

JulienPalard added a commit to JulienPalard/cpython that referenced this issue May 24, 2022
Bug was visible on SysLogHandler:

bad: SysLogHandler(address='localhost', SYSLOG_UDP_PORT, ...
good: SysLogHandler(address=('localhost', SYSLOG_UDP_PORT), ...
@JulienPalard
Copy link
Member

Related PR: #93159

JulienPalard added a commit to python/docsbuild-scripts that referenced this issue May 24, 2022
ambv pushed a commit that referenced this issue Jun 6, 2022
Bug was visible on SysLogHandler:

bad: SysLogHandler(address='localhost', SYSLOG_UDP_PORT, ...
good: SysLogHandler(address=('localhost', SYSLOG_UDP_PORT), ...
@ambv
Copy link
Contributor
ambv commented Jun 6, 2022

Fixed in 3.10. As neither 3.9 nor 3.11 were affected, we can close this! Thanks! ✨ 🍰 ✨

@ambv ambv closed this as completed Jun 6, 2022
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
Projects
None yet
Development

No branches or pull requests

5 participants
0