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: Mark up docs of old PyMem macros #143783

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

Open
encukou wants to merge 3 commits into python:main
base: main
Choose a base branch
Loading
from encukou:doc-PyMem_DEL

Conversation

@encukou
Copy link
Member

@encukou encukou commented Jan 13, 2026
edited by github-actions bot
Loading

These had a docs-only deprecation notice since the first version of the docs in this repo. Nowadays we call things "soft deprecated" if there's just a note in the docs.

The deprecated directive needs a version, I went with the first one that had the notice (2.0; it's not in 1.6).

Since PEP 445, they are now direct aliases; there are no (additional) binary compatibility concerns over the preferred names.


📚 Documentation preview 📚: https://cpython-previews--143783.org.readthedocs.build/

Their docs-only deprecation notice appeared 2.0:
https://docs.python.org/release/2.0/api/memoryInterface.html
but not 1.6:
https://docs.python.org/release/2.0/api/memoryInterface.html
Nowadays we call this soft deprecation.
Since PEP 445, they are now direct aliases; there are no (additional)
binary compatibility concerns over the preferred names.
Comment on lines 296 to 301
.. c:macro:: PyMem_MALLOC(size)
PyMem_NEW(type, size)
PyMem_REALLOC(ptr, size)
PyMem_RESIZE(ptr, type, size)
PyMem_FREE(ptr)
PyMem_DEL(ptr)
Copy link
Member

@ZeroIntensity ZeroIntensity Jan 13, 2026

Choose a reason for hiding this comment

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

I think it would be nice to have a table, similar to what I did here.

encukou reacted with thumbs up emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner left review comments

@ZeroIntensity ZeroIntensity ZeroIntensity approved these changes

Assignees

No one assigned

Labels

Projects

Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /