Skip to content

Conversation

@encukou
Copy link
Member

@encukou encukou commented Jan 13, 2026

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.
@encukou encukou requested a review from vstinner January 13, 2026 12:00
@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Jan 13, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Jan 13, 2026
@encukou encukou added topic-C-API docs Documentation in the Doc dir skip news and removed docs Documentation in the Doc dir awaiting core review skip news labels Jan 13, 2026
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

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 encukou merged commit a009e78 into python:main Jan 15, 2026
31 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Jan 15, 2026
@encukou encukou deleted the doc-PyMem_DEL branch January 15, 2026 11:37
@encukou encukou added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jan 15, 2026
@miss-islington-app
Copy link

Thanks @encukou 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-app
Copy link

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 15, 2026
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):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html

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

Co-authored-by: Petr Viktorin <encukou@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 15, 2026
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):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html

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

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jan 15, 2026

GH-143864 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jan 15, 2026
@bedevere-app
Copy link

bedevere-app bot commented Jan 15, 2026

GH-143865 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jan 15, 2026
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Jan 15, 2026
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):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html

Since PEP 445, they are now direct aliases; there are no (additional) binary compatibility concerns over the preferred names.
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 skip news topic-C-API

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants