Skip to content

Fix profiler on cpython-3.13#154037

Merged
atalman merged 1 commit into
release/2.7from
cherry-pick-153848-by-pytorch_bot_bot_
May 21, 2025
Merged

Fix profiler on cpython-3.13#154037
atalman merged 1 commit into
release/2.7from
cherry-pick-153848-by-pytorch_bot_bot_

Conversation

@pytorchbot

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

Per PEP 667 PyFrame_GetLocals no longer returns dict, but rather instance of PyFrameLocalsProxy_Type, so calling PyDict_GetItemString is no longer valid(it will always return None) and must be replaced with PyMapping_GetItemString

Tested by partially reverting #141674 full revert will be done in the followup PR

Fixes #148273

Per [PEP 667](https://peps.python.org/pep-0667/) `PyFrame_GetLocals` no longer returns dict, but rather instance of `PyFrameLocalsProxy_Type`, so calling `PyDict_GetItemString` is no longer valid(it will always return None) and must be replaced with `PyMapping_GetItemString`

Tested by partially reverting #141674 full revert will be done in the followup PR

Fixes #148273
Pull Request resolved: #153848
Approved by: https://github.com/Skylion007

(cherry picked from commit c0343b1)
@pytorch-bot

pytorch-bot Bot commented May 21, 2025

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/154037

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 19b80ad with merge base 924a247 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@sraikund16 sraikund16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@atalman atalman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@atalman atalman merged commit bdec157 into release/2.7 May 21, 2025
102 checks passed
@github-actions github-actions Bot deleted the cherry-pick-153848-by-pytorch_bot_bot_ branch June 21, 2025 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants