python / python/cpython

Add tests on basic `PyStackRef` functions

Open
#139,716 0 comments 0 reactions 1 assignee View on GitHub

@efimov-mikhail is already working on this.

Since Oct 16, 2025.

extension-modules tests type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Proposal:

Definitions of basic PyStackRef manipulation functions aren't so easy.
There are a lot of them, they have connections to each other and we have 3 variants of them now (GIL, no-GIL, PyStackRef debug).

It's easy to forget something when provide some change to them.
In fact, there is one of such issues for PyStackRef debug build: https://github.com/python/cpython/issues/135125

I propose to add tests that ensure all basic PyStackRef functions are correct in combination.

I've already have a PR.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-139717
  • gh-141675
  • gh-143024

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.