Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-141004: DocumentPyBUF_WRITEABLE#141255

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@ZeroIntensity
Copy link
Member

@ZeroIntensityZeroIntensity commentedNov 8, 2025
edited
Loading

Comment on lines +264 to +266
..c:macro:: PyBUF_WRITEABLE
This is a:term:`soft deprecated` alias to:c:macro:`PyBUF_WRITABLE`.
Copy link
Member

@StanFromIrelandStanFromIrelandNov 8, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
..c:macro:: PyBUF_WRITEABLE
This is a:term:`soft deprecated` alias to:c:macro:`PyBUF_WRITABLE`.
..c:namespace::NULL
..c:macro:: PyBUF_WRITEABLE
This is a:term:`soft deprecated` alias to:c:macro:`PyBUF_WRITABLE`.

I see this was recently done for a different alias, i.e., it is put under what it is aliased to:

.. c:namespace:: NULL
.. c:function:: long PyLong_AS_LONG(PyObject *obj)
A:term:`soft deprecated` alias.
Exactly equivalent to the preferred ``PyLong_AsLong``. In particular,
it can fail with:exc:`OverflowError` or another exception.
..deprecated::3.14
The function is soft deprecated.

IMO it also makes sense to add a.. deprecated:: 3.15.

Copy link
MemberAuthor

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.

StanFromIreland reacted with thumbs up emoji

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.

Copy link
MemberAuthor

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.

StanFromIreland reacted with thumbs up emoji
Copy link
MemberAuthor

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:: NULL do? I don't see a difference in the output.

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:: NULL do? I don't see a difference in the output.

It allows for cross referencing as the macro name IIUC,per the docs:

Using NULL ... as the scope will change to global scope.

Copy link
MemberAuthor

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 likenamespace-push, right?

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.

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.

Copy link
MemberAuthor

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.

Copy link
Member

@StanFromIrelandStanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, I don't feel strongly about the indentation.

@ZeroIntensityZeroIntensity merged commit5e5fc04 intopython:mainNov 8, 2025
35 checks passed
@ZeroIntensityZeroIntensity deleted the document-pybuf-writeable branchNovember 8, 2025 17:29
@github-project-automationgithub-project-automationbot moved this fromTodo toDone inDocs PRsNov 8, 2025
@ZeroIntensityZeroIntensity added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsNov 8, 2025
@miss-islington-app
Copy link

Thanks@ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app
Copy link

Thanks@ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestNov 8, 2025
(cherry picked from commit5e5fc04)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@bedevere-app
Copy link

GH-141260 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelNov 8, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestNov 8, 2025
(cherry picked from commit5e5fc04)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@bedevere-app
Copy link

GH-141261 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelNov 8, 2025
ZeroIntensity added a commit that referenced this pull requestNov 8, 2025
gh-141004: Document `PyBUF_WRITEABLE` (GH-141255)(cherry picked from commit5e5fc04)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
ZeroIntensity added a commit that referenced this pull requestNov 8, 2025
gh-141004: Document `PyBUF_WRITEABLE` (GH-141255)(cherry picked from commit5e5fc04)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@StanFromIrelandStanFromIrelandStanFromIreland approved these changes

Assignees

No one assigned

Labels

docsDocumentation in the Doc dirskip news

Projects

Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ZeroIntensity@StanFromIreland

[8]ページ先頭

©2009-2025 Movatter.jp