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-158080: Py_InitializeFromConfig() no longer exits Python by vstinner · Pull Request #158085 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Sep 24, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

If a command line option wants to exit Python, move this option processing from PyConfig_Read() to Py_Main(). So
Py_InitializeFromInitConfig() and Py_InitializeFromConfig() can no longer return an exit code.

Deprecate PyInitConfig_GetExitCode(), PyStatus_Exit(), and PyStatus_IsExit()
functions, and PyStatus.exitcode member.

Renumber getopt.c long options to start at 1, instead of 0.

  • Issue: C API: No longer exit Python in Py_InitializeFromConfig() #158080

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner
pythongh-158080: Py_InitializeFromConfig() no longer exits Python
2a92baf
If a command line option wants to exit Python, move this option
processing from PyConfig_Read() to Py_Main(). So
Py_InitializeFromInitConfig() and Py_InitializeFromConfig() can no
longer return an exit code.

Renumber getopt.c long options to start at 1, instead of 0.
@vstinner
vstinner requested review from AA-Turner, FFY00, ZeroIntensity and ericsnowcurrently as code owners September 24, 2026 13:36
@bedevere-app bedevere-app Bot mentioned this pull request Sep 24, 2026
C API: No longer exit Python in Py_InitializeFromConfig() #158080
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 24, 2026
@read-the-docs-community

read-the-docs-community Bot commented Sep 24, 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 #34756872 | 📁 Comparing 665be15 against main (a5a4659)

  🔍 Preview build  

13 files changed · ± 13 modified

± Modified

  • c-api/init_config.html
  • c-api/interp-lifecycle.html
  • c-api/module.html
  • c-api/stable.html
  • deprecations/c-api-pending-removal-in-future.html
  • deprecations/index.html
  • howto/remote_debugging.html
  • library/turtle.html
  • whatsnew/3.12.html
  • whatsnew/3.13.html
  • and 3 more...
All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner added 4 commits September 24, 2026 16:28
@vstinner
Update test_embed
674ce04
@vstinner
Merge branch 'main' into defer_option
3a5ae3e
@vstinner
Fix python -VV
f01c750
* Make test_cmd_line.test_version() stricter
* Adjust documentation.
@vstinner
Update doc/comments
665be15
@vstinner
vstinner enabled auto-merge (squash) September 25, 2026 11:01
@vstinner
vstinner merged commit fe7717c into python:main Sep 25, 2026
55 checks passed

Uh oh!

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

@vstinner
vstinner deleted the defer_option branch September 25, 2026 11:34
@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 25, 2026
@davidnich davidnich mentioned this pull request Oct 23, 2026
C API: copying a PyStatus emits -Wdeprecated-declarations in C++ with clang since gh-158080 #160436
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity is a code owner
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

1 participant

@vstinner
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.