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-104668: Don't call `PyOS_*` hooks in subinterpreters by brandtbucher · Pull Request #104674 · python/cpython

Conversation

@brandtbucher

@brandtbucher brandtbucher commented May 19, 2023 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

PyOS_InputHook and PyOS_ReadlineFunctionPointer are now only called in the main interpreter.

  • Issue: The PyOS_* hooks interact poorly with subinterpreters #104668

📚 Documentation preview 📚: https://cpython-previews--104674.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
brandtbucher added 4 commits May 18, 2023 17:23
@brandtbucher
Only call PyOS_* hooks from the main interpreter
262ed9f
@brandtbucher
Document the change
83d92ae
@brandtbucher
blurb add
7fba174
@brandtbucher
Add issue numbers
9800546
@brandtbucher brandtbucher added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-tkinter topic-subinterpreters topic-C-API labels May 19, 2023
@brandtbucher
brandtbucher requested a review from ericsnowcurrently May 19, 2023 22:19
@brandtbucher
brandtbucher requested a review from pablogsal as a code owner May 19, 2023 22:19
@brandtbucher brandtbucher self-assigned this May 19, 2023
@brandtbucher
brandtbucher requested a review from lysnikolaou as a code owner May 19, 2023 22:19
@bedevere-bot bedevere-bot added the awaiting core review label May 19, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 19, 2023
The PyOS_* hooks interact poorly with subinterpreters #104668
Closed
@erlend-aasland

erlend-aasland commented May 20, 2023

Copy link
Copy Markdown
Contributor

We should advertise this in What's New as well.

brandtbucher reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@brandtbucher
Catch up with main
0157842
ericsnowcurrently
ericsnowcurrently approved these changes May 22, 2023
View reviewed changes

@ericsnowcurrently ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 22, 2023
@brandtbucher
What's New
b42f86a
@brandtbucher
brandtbucher enabled auto-merge (squash) May 22, 2023 19:25
@brandtbucher
brandtbucher merged commit 357bed0 into python:main May 22, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 22, 2023
@arhadthedev

arhadthedev commented May 22, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Should we backport it to 3.12?

Edit: I noticed that the label isn't added yet.

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra

JelleZijlstra commented May 22, 2023

Copy link
Copy Markdown
Member

@brandtbucher this didn't actually end up in the 3.12 branch. Should we backport it, or is it a new feature that should only go into 3.13?

All reactions

Sorry, something went wrong.

Uh oh!

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

@brandtbucher brandtbucher added the needs backport to 3.12 only security fixes label May 22, 2023
@miss-islington

miss-islington commented May 22, 2023

Copy link
Copy Markdown
Contributor

Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 22, 2023
@brandtbucher @miss-islington
pythonGH-104668: Don't call PyOS_* hooks in subinterpreters (pythonGH…
ef66708
…-104674)

(cherry picked from commit 357bed0)

Co-authored-by: Brandt Bucher <[email protected]>
@bedevere-bot

bedevere-bot commented May 22, 2023

Copy link
Copy Markdown

GH-104760 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label May 22, 2023
@brandtbucher

brandtbucher commented May 22, 2023

Copy link
Copy Markdown
Member Author

I was waiting for the label. 🙂

JelleZijlstra and arhadthedev reacted with laugh emoji
All reactions
  • 😄 2 reactions

Sorry, something went wrong.

Uh oh!

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

brandtbucher added a commit that referenced this pull request May 23, 2023
@miss-islington @brandtbucher
[3.12] GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104760)
905d419
GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104674)
(cherry picked from commit 357bed0)

Co-authored-by: Brandt Bucher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently ericsnowcurrently approved these changes
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner

Uh oh!

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

Assignees

@brandtbucher brandtbucher

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-C-API topic-subinterpreters topic-tkinter type-bug An unexpected behavior, bug, or error

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.

7 participants

@brandtbucher @erlend-aasland @arhadthedev @JelleZijlstra @miss-islington @bedevere-bot @ericsnowcurrently
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.