Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this was recently done for a different alias, i.e., it is put under what it is aliased to:
cpython/Doc/c-api/long.rst
Lines 196 to 205 in be1c72a
IMO it also makes sense to add a
.. deprecated:: 3.15.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't think we should be backporting deprecations. It implies that it's valid to use up until that version, which we don't want people to think.
In general, it's very uncommon to backport deprecations. This is the second time someone has pointed to that as precedent, but I would have disagreed there too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it from the suggestion, but why not keep it here and just edit Miss Islington's backports to remove it? I volunteer to do it if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need C API WG approval in order to do a deprecation, and that can take months. I'd like to do deprecations after we've gotten everything documented so we're not blocked by them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, what does
.. c:namespace:: NULLdo? I don't see a difference in the output.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It allows for cross referencing as the macro name IIUC, per the docs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I don't follow. This should be in the global namespace already. I think that only applies if you're using something like
namespace-push, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simply copied what Petr had done, I've not tested it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing it, it is not in the global namespace, and I need to use
:c:macro:`PyBUF_WRITABLE.PyBUF_WRITEABLE`to get a link.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I just tested it too, using
:c:macro:`PyBUF_WRITEABLE`works just fine on my end.