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 — Remove asserts that confuse `enum _framestate` with `enum _frameowner` by andersk · Pull Request #124148 · python/cpython

Conversation

@andersk

@andersk andersk commented Sep 16, 2024

Copy link
Copy Markdown
Contributor

The owner field of _PyInterpreterFrame is supposed to be a member of enum _frameowner, but FRAME_CLEARED is a member of enum _framestate. At present, it happens that FRAME_CLEARED is not numerically equal to any member of enum _frameowner, but that could change in the future. The code that incorrectly assigned owner = FRAME_CLEARED was deleted in commit a53cc3f (GH-116687). Remove the incorrect checks for owner != FRAME_CLEARED as well.

Sorry, something went wrong.

Uh oh!

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

All reactions
@andersk
Remove asserts that confuse enum _framestate with enum _frameowner
0d70eb1
The owner field of _PyInterpreterFrame is supposed to be a member of
enum _frameowner, but FRAME_CLEARED is a member of enum _framestate.
At present, it happens that FRAME_CLEARED is not numerically equal to
any member of enum _frameowner, but that could change in the future.
The code that incorrectly assigned owner = FRAME_CLEARED was deleted
in commit a53cc3f (pythonGH-116687).
Remove the incorrect checks for owner != FRAME_CLEARED as well.

Signed-off-by: Anders Kaseorg <[email protected]>
@bedevere-app bedevere-app Bot added the awaiting review label Sep 16, 2024
@andersk andersk mentioned this pull request Sep 16, 2024
Fix confusion of enum _framestate with enum _frameowner #106156
Closed
@colesbury colesbury added skip issue skip news labels Sep 18, 2024
@colesbury
Merge branch 'main' into frame-enum-confusion-2
e50936a
colesbury
colesbury approved these changes Sep 18, 2024
View reviewed changes

@colesbury colesbury left a comment

Copy link
Copy Markdown
Contributor

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-app bedevere-app Bot added awaiting merge and removed awaiting review labels Sep 18, 2024
@colesbury
colesbury requested a review from brandtbucher September 18, 2024 16:38
@andersk andersk mentioned this pull request Sep 18, 2024
gh-116098: Clean up frame allocation code and remove the invalid sneaky frame test #116687
Merged
brandtbucher
brandtbucher approved these changes Sep 24, 2024
View reviewed changes

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

Yup, makes sense. Nice catch.

Sorry, something went wrong.

Uh oh!

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

All reactions
@colesbury colesbury added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Jan 2, 2025
@colesbury
Merge branch 'main' into frame-enum-confusion-2
5496d20
@colesbury
colesbury enabled auto-merge (squash) January 2, 2025 16:33
@colesbury
colesbury merged commit a626f9a into python:main Jan 2, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jan 2, 2025
@miss-islington-app

miss-islington-app Bot commented Jan 2, 2025

Copy link
Copy Markdown

Thanks @andersk for the PR, and @colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Jan 2, 2025

Copy link
Copy Markdown

Sorry, @andersk and @colesbury, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a626f9a67b76e5fe69677afd5f8317d8c61de8de 3.13
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned colesbury Jan 2, 2025
@miss-islington-app

miss-islington-app Bot commented Jan 2, 2025

Copy link
Copy Markdown

Sorry, @andersk and @colesbury, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a626f9a67b76e5fe69677afd5f8317d8c61de8de 3.12
All reactions

Sorry, something went wrong.

Uh oh!

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

@colesbury

colesbury commented Jan 2, 2025

Copy link
Copy Markdown
Contributor

Backports didn't apply cleanly and we didn't backport #116687, so I figure it's probably not worth backporting this after all.

All reactions

Sorry, something went wrong.

Uh oh!

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

@colesbury colesbury removed needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Jan 2, 2025
@colesbury colesbury removed their assignment Jan 2, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
@andersk @srinivasreddy
Remove asserts that confuse enum _framestate with enum _frameowner (
f6fea23
pythonGH-124148)

The `owner` field of `_PyInterpreterFrame` is supposed to be a member of
`enum _frameowner`, but `FRAME_CLEARED` is a member of `enum _framestate`.

At present, it happens that `FRAME_CLEARED` is not numerically equal to any
member of `enum _frameowner`, but that could change in the future. The code
that incorrectly assigned `owner = FRAME_CLEARED` was deleted in commit
a53cc3f (pythonGH-116687). Remove the incorrect
checks for `owner != FRAME_CLEARED` as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@colesbury colesbury colesbury approved these changes
@brandtbucher brandtbucher brandtbucher approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip issue skip news

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.

3 participants

@andersk @colesbury @brandtbucher
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.