Skip to content
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

Stable ABI: Some optional (#ifdef'd) functions aren't handled correctly #91325

Closed
encukou opened this issue Mar 30, 2022 · 5 comments
Closed

Comments

@encukou
Copy link
Member

encukou commented Mar 30, 2022

BPO 47169
Nosy @encukou, @kulikjak
PRs
  • bpo-47169: Add feature macro PY_HAVE_THREAD_NATIVE_ID to the stable ABI definition #32365
  • bpo-47169: Export PyOS_CheckStack in the Windows stable ABI DLL #32414
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2022-03-30.15:52:37.045>
    labels = ['expert-C-API']
    title = "Stable ABI: Some optional (#ifdef'd) functions aren't handled correctly"
    updated_at = <Date 2022-04-08.12:49:59.275>
    user = 'https://github.com/encukou'

    bugs.python.org fields:

    activity = <Date 2022-04-08.12:49:59.275>
    actor = 'petr.viktorin'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['C API']
    creation = <Date 2022-03-30.15:52:37.045>
    creator = 'petr.viktorin'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47169
    keywords = ['patch']
    message_count = 2.0
    messages = ['416377', '416477']
    nosy_count = 2.0
    nosy_names = ['petr.viktorin', 'kulikjak']
    pr_nums = ['32365', '32414']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue47169'
    versions = []

    Linked PRs

    @encukou
    Copy link
    Member Author

    encukou commented Mar 30, 2022

    • PyThread_get_thread_native_id is only available when PY_HAVE_THREAD_NATIVE_ID is defined. The test currently always expects it to be available.
    • PyOS_CheckStack is only available when USE_STACKCHECK is defined (i.e. on Windows). It should be exported from the DLL.

    I plan to:

    • add the appropriate metadata
    • improve handling & testing of such optional functions in general

    @kulikjak
    Copy link
    Mannequin

    kulikjak mannequin commented Apr 1, 2022

    Solaris is affected by missing PyThread_get_thread_native_id; all other symbols from the SYMBOL_NAMES tuple (in test_stable_abi_ctypes.py) are available.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @encukou encukou closed this as completed Apr 28, 2022
    @encukou
    Copy link
    Member Author

    encukou commented Apr 29, 2022

    Reopening: PyModule_Create2 and PyModule_FromDefAndSpec2 are still missing with Py_TRACE_REFS. See Victor's comment: #88299 (comment)

    @encukou
    Copy link
    Member Author

    encukou commented Apr 29, 2022

    PR for skipping checks on Py_TRACE_REFS builds: #92046

    encukou added a commit that referenced this issue Jan 29, 2024
    …-92046)
    
    Skip Stable ABI checks with Py_TRACE_REFS special build
    
    This build is not compatible with Py_LIMITED_API nor with
    the stable ABI.
    @encukou
    Copy link
    Member Author

    encukou commented Jan 29, 2024

    It took a while, but, the exceptions are gone now.

    @encukou encukou closed this as completed Jan 29, 2024
    aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
    …ld (pythonGH-92046)
    
    Skip Stable ABI checks with Py_TRACE_REFS special build
    
    This build is not compatible with Py_LIMITED_API nor with
    the stable ABI.
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant