[cython/cython] Support weakref in limited api cdef classes (PR #5840)

0 views
Skip to first unread message

da-woods

unread,
Nov 18, 2023, 11:07:55 AM11/18/23
to cython/cython, Subscribed

Fixes #5793.

Note that this won't work on Python versions <3.9. (The code will compile fine, but the classes won't be weak referenceable).


You can view, comment on, or merge this pull request online at:

  https://github.com/cython/cython/pull/5840

Commit Summary

  • 100850d Support weakref in limited api cdef classes

File Changes

(4 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <cython/cython/pull/5840@github.com>

scoder

unread,
Nov 18, 2023, 1:52:28 PM11/18/23
to cython/cython, Subscribed

>Note that this won&#39;t work on Python versions &lt;3.9. (The code will compile fine, but the classes won&#39;t be weak referenceable).

We could print a C compiler warning when we detect that case. That would make the problem visible. It's then best for users to either require a newer Python version or work around the missing feature at runtime. We shouldn't fail the compilation for this.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <cython/cython/pull/5840/c1817595418@github.com>

da-woods

unread,
Nov 18, 2023, 2:19:28 PM11/18/23
to cython/cython, Push

@da-woods pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <cython/cython/pull/5840/push/15877214578@github.com>

da-woods

unread,
Nov 18, 2023, 2:22:28 PM11/18/23
to cython/cython, Push

@da-woods pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <cython/cython/pull/5840/push/15877228512@github.com>

da-woods

unread,
May 16, 2024, 3:54:59 AM5/16/24
to cython/cython, Push

@da-woods pushed 1 commit.

  • 6b375b6 Merge branch 'master' into limited-api-weakref


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <cython/cython/pull/5840/push/18443835290@github.com>

Reply all
Reply to author
Forward
0 new messages