8000 Replace obsolete, unsafe Py_TRASHCAN_SAFE_BEGIN/END by musicinmybrain · Pull Request #1150 · MagicStack/asyncpg · GitHub
[go: up one dir, main page]

Skip to content

Replace obsolete, unsafe Py_TRASHCAN_SAFE_BEGIN/END #1150

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

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Replace obsolete, unsafe Py_TRASHCAN_SAFE_BEGIN/END
Use Py_TRASHCAN_BEGIN/END instead.

https://bugs.python.org/issue44874

These are removed from the limited C API in Python 3.9, deprecated in
3.11, and removed in Python 3.13:

https://docs.python.org/3.13/whatsnew/3.13.html#id8
  • Loading branch information
musicinmybrain committed Jul 12, 2024
commit 2f7cbbb0bd3600543b2246612e89146b831f1fba
4 changes: 2 additions & 2 deletions asyncpg/protocol/record/recordobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ record_dealloc(ApgRecordObject *o)

Py_CLEAR(o->desc);

Py_TRASHCAN_SAFE_BEGIN(o)
Py_TRASHCAN_BEGIN(o, record_dealloc)
if (len > 0) {
i = len;
while (--i >= 0) {
Expand All @@ -117,7 +117,7 @@ record_dealloc(ApgRecordObject *o)
}
Py_TYPE(o)->tp_free((PyObject *)o);
done:
Py_TRASHCAN_SAFE_END(o)
Py_TRASHCAN_END
}


Expand Down
Loading
0