GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Test Limited API in _testcapi module · Issue #95991 · python/cpython

Test Limited API in _testcapi module #95991

New issue
Copy link
New issue
Copy link
Closed
Closed
Test Limited API in _testcapi module#95991
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-C-API

Description

@encukou
encukou
opened on Aug 15, 2022
Issue body actions

The Limited API is currently tested in xxlimited module(s), which isn't a great location since the module serves as a “tutorial” example of how to make a module. There's no room for advanced stuff or edge cases.
Testing Limited API together with other C API is complicated, because:

  • Limited API needs to be enabled per source file
  • Some builds don't support Limited API, so Limited API tests must be skipped on those builds.
    (Currently this is Py_TRACE_REFS, but that may change.)
  • Py_LIMITED_API must be defined before <Python.h> is included.

With #95505 (splitting _testcapi module into several source files), the first complication is solved. I'd like to add helpers for the others, to make testing Limited API easy.

Activity

  1. encukou
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    topic-C-API
    on Aug 15, 2022
  2. encukou
    added 2 commits that reference this issue on Aug 15, 2022

    pythongh-95991: Add some infrastructure for testing Limited API in _t…

    368e434

    gh-95991: Add some infrastructure for testing Limited API in _testcapi (

    0f2b469
  3. encukou commented on Aug 17, 2022

    @encukou
    encukou
    on Aug 17, 2022
    MemberAuthor
    More actions

    Keeping this open until I get to the devguide update.

  4. encukou
    closed this as completedon Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dirtopic-C-API

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.