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 — gh-158643: Doc: document that Py_EnterRecursiveCall uses C stack, not a counter by BHUVANSH855 · Pull Request #158644 · python/cpython

Conversation

@BHUVANSH855

@BHUVANSH855 BHUVANSH855 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Fixes gh-158643.

As of 3.14, Py_EnterRecursiveCall/Py_LeaveRecursiveCall compare the
machine stack pointer against c_stack_soft_limit rather than decrementing
a call counter. The docs didn't say this, so a reader could reasonably assume
sys.setrecursionlimit() affects the C-level guard.

Adds a clarifying sentence and a versionchanged:: 3.14 note.

No NEWS entry needed (docs-only change). Requested by @ZeroIntensity in
gh-156205.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@BHUVANSH855
Doc: document that Py_EnterRecursiveCall uses C stack, not a counter
0acd368
@BHUVANSH855
BHUVANSH855 requested a review from ZeroIntensity as a code owner October 3, 2026 10:02
@bedevere-app bedevere-app Bot mentioned this pull request Oct 3, 2026
Doc: Py_EnterRecursiveCall uses C stack space, not a call counter #158643
Closed
@bedevere-app bedevere-app Bot added awaiting review docs Documentation in the Doc dir skip news labels Oct 3, 2026
@github-project-automation github-project-automation Bot added this to Docs PRs Oct 3, 2026
@read-the-docs-community

read-the-docs-community Bot commented Oct 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34914951 | 📁 Comparing 60dc145 against main (1a85213)

  🔍 Preview build  

1 file changed
± c-api/exceptions.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BHUVANSH855 BHUVANSH855 mentioned this pull request Oct 3, 2026
gh-156204: Guard recursion in PyErr_GivenExceptionMatches #156205
Merged
@aisk aisk added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 3, 2026
aisk
aisk reviewed Oct 3, 2026
View reviewed changes
Comment thread Doc/c-api/exceptions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@BHUVANSH855 @aisk
Update Doc/c-api/exceptions.rst
60dc145
Co-authored-by: An Long <[email protected]>
@BHUVANSH855
BHUVANSH855 requested a review from aisk October 3, 2026 11:01
aisk
aisk approved these changes Oct 3, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Oct 3, 2026
ZeroIntensity
ZeroIntensity approved these changes Oct 3, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Oct 3, 2026
@ZeroIntensity
ZeroIntensity merged commit d6d1ebc into python:main Oct 3, 2026
39 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Oct 3, 2026

Copy link
Copy Markdown

Thanks @BHUVANSH855 for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 3, 2026
@bedevere-app

bedevere-app Bot commented Oct 3, 2026

Copy link
Copy Markdown

GH-158653 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 3, 2026
@bedevere-app

bedevere-app Bot commented Oct 3, 2026

Copy link
Copy Markdown

GH-158654 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 3, 2026
ZeroIntensity pushed a commit that referenced this pull request Oct 3, 2026
@miss-islington @BHUVANSH855 @aisk
[3.14] gh-158643: Document that Py_EnterRecursiveCall uses the C st…
8d745f7
…ack, not a counter (GH-158644) (GH-158654)

(cherry picked from commit d6d1ebc)

Co-authored-by: Bhuvansh <[email protected]>
Co-authored-by: An Long <[email protected]>
hugovk pushed a commit that referenced this pull request Oct 3, 2026
@miss-islington @BHUVANSH855 @aisk
[3.15] gh-158643: Document that Py_EnterRecursiveCall uses the C st…
748262f
…ack, not a counter (GH-158644) (#158653)

Co-authored-by: Bhuvansh <[email protected]>
Co-authored-by: An Long <[email protected]>
@BHUVANSH855
BHUVANSH855 deleted the doc-enter-recursive-call branch October 11, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aisk aisk aisk approved these changes
@ZeroIntensity ZeroIntensity ZeroIntensity approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Doc: Py_EnterRecursiveCall uses C stack space, not a call counter

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@BHUVANSH855 @aisk @ZeroIntensity
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.