cpython
cpython copied to clipboard
gh-95914: Add Py_UNICODE encode APIs removed in PEP 624 to 3.11 What's New
Add a mention of the deprecated Py_UNICODE encode functions removed in Python 3.11 per PEP-624 by @methane in issue #88195 / PR #25881 to 3.11 What's New, as discussed in #95914 .
Inada-san, could you take a look at this?
Also, @AA-Turner @ezio-melotti @hugovk , any idea why ! appears to not be working as documented in :c:func: here, resulting in -n warnings and incorrect rendering? Does it have something to do with the legacy C role support still used by the CPython docs?
- Issue: gh-95914
Also, @AA-Turner @ezio-melotti @hugovk , any idea why
!appears to not be working as documented in:c:func:here, resulting in-nwarnings and incorrect rendering?
Nope... The ! prefix is meant to prevent creating a reference/hyperlink. But because the functions have been removed, you can omit the ! and it won't create a link anyway (and will render as code formatting).
The ! prefix is meant to prevent creating a reference/hyperlink.
Right, which is why I don't understand why it doesn't work, unless this is a Spihnx bug or some corner case (which I searched for at some length in the Sphinx repo and googled, to no avail). I figure if anyone knows, @AA-Turner would...
But because the functions have been removed, you can omit the ! and it won't create a link anyway (and will render as code formatting).
Right, of course, but the whole reason I'm adding the ! is because the functions have been removed, so Sphinx doesn't try to link them and fail with a ton of spurious warnings, obscuring real ones about actual bad references/object names amidst the noise. In that case, if for whatever reason ! doesn't work in the C domain, it would be IMO better to just use literals (as is generally used elsewhere) than known-broken references that generate a ton of spurious warnings.
@CAM-Gerlach Is this still a draft or can it be reviewed?
I believe the markup for removed functions should be fixed before merging -- from :c:func:`...` to just ``...``.
I ended up going with the default-domain :func:`!...` for now, so at least the formatting is consistent and the semantics are close enough. However, I am still curious to know what's going on there...
This should be ready for final review now @pablogsal
Thanks @CAM-Gerlach for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. 🐍🍒⛏🤖
GH-96094 is a backport of this pull request to the 3.11 branch.