Movatterモバイル変換


[0]ホーム

URL:


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

Issue withPyObject_DelAttr[String] in stable ABI builds targeting older CPython versions #134989

Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-bugAn unexpected behavior, bug, or error
@wjakob

Description

@wjakob

Bug report

Bug description:

To my knowledge, one can use newer Python version (e.g. Python 3.13) to build C extensions forolder Python versions (e.g. 3.12) when targeting the stable ABI. This is accomplished by settingPy_LIMITED_API to a suitable number like0x030b0000, which simply disables all features beyond this cutoff.

If this understanding is correct, then I would like to report a bug:

Python 3.13 added an new C API function forPyObject_DelAttr(). In contrast, Python 3.12 realized this operation using a macro wrappingPyObject_SetAttr():

#define  PyObject_DelAttr(O, A) PyObject_SetAttr((O), (A), NULL)

This change is problematic: extensions built on 3.13 targeting 3.12 stable ABI will now call a function that does not exist on Python 3.12, and such extensions will fail to load with a linker error. The change to the new C API entry point should have been guarded with#ifdefs.

This issue also affectsPyObject_DelAttrString().

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp