Skip to content

[BUG]: undefined symbol: Py_REFCNT (Python 3.14) #1183

@tttapa

Description

@tttapa

Problem description

The Py_REFCNT function is not part of the stable API in Python 3.13 and earlier, but it is used unconditionally in nb_ft.h:

if (Py_REFCNT(obj) > 0) {

As a result, nanobind modules built using Python 3.14.0rc3 with Py_LIMITED_API=0x030c0000 cannot be imported on Python 3.12 and 3.13; they fail with libnanobind-abi3.so: undefined symbol: Py_REFCNT.

Reproducible example code

 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions