Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-111339: Move optimizer types to object.c #111430

Merged
merged 5 commits into from
Oct 29, 2023

Conversation

savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Oct 28, 2023

This PR moves types defined in optimizer.c to static_types in object.c per @brandtbucher's hunch. I tried to abide by the naming conventions of the other types in static_types by updating names to be prefixed by _Py. Please let me know if this is incorrect.

I've tested this and I can no longer reproduce the assertion error.

@savannahostrowski savannahostrowski changed the title GH-111339: Add optimizer types to object.c GH-111339: Move optimizer types to object.c Oct 28, 2023
@savannahostrowski savannahostrowski changed the title GH-111339: Move optimizer types to object.c GH-111339: Move optimizer types to object.c Oct 28, 2023
@brandtbucher brandtbucher self-assigned this Oct 28, 2023
Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

This is solid, thanks. And great instinct with the renaming!

There's nothing wrong with this, just a few observations:

Objects/object.c Outdated Show resolved Hide resolved
Include/internal/pycore_optimizer.h Outdated Show resolved Hide resolved
@brandtbucher brandtbucher added type-bug An unexpected behavior, bug, or error skip news interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Oct 28, 2023
@brandtbucher
Copy link
Member

(I think these types may need to be added to an ignore-list somewhere? I think the failing check has more info.)

Savannah Ostrowski and others added 3 commits October 28, 2023 19:58
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@brandtbucher brandtbucher merged commit 4a929d4 into python:main Oct 29, 2023
26 checks passed
@savannahostrowski savannahostrowski deleted the fix-111339 branch October 30, 2023 16:11
FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants