Skip to content

Conversation

@lkollar
Copy link
Contributor

@lkollarlkollar commented May 29, 2025

The standard followed by APIs like pstat.Stats is to take a file, line, function triplet. The parse_code_object function (and callers exposing this in Python like RemoteUnwinder.get_stack_trace) return function, file, line triplets which requires the caller to reorder these when using it in classes like pstat.Stats.

The standard followed by APIs like pstat.Stats is to take a file, line, function triplet. The parse_code_object function (and callers exposing this in Python like RemoteUnwinder.get_stack_trace) return function, file, line triplets which requires the caller to reorder these when using it in classes like pstat.Stats.
@lkollarlkollarforce-pushed the reorder-stack-frames branch from b128a06 to 58e9e03CompareMay 30, 2025 06:46
@lkollarlkollar changed the title Reorder result tuple of parse_code_objectgh-91048: Reorder result tuple of parse_code_objectMay 30, 2025
@lkollarlkollar marked this pull request as ready for review May 30, 2025 06:54
@pablogsalpablogsal enabled auto-merge (squash) May 31, 2025 00:32
@pablogsalpablogsal merged commit 8e8786f into python:mainMay 31, 2025
48 checks passed
@miss-islington-app
Copy link

Thanks @lkollar for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2025
…34898) Reorder result tuple of parse_code_object The standard followed by APIs like pstat.Stats is to take a file, line, function triplet. The parse_code_object function (and callers exposing this in Python like RemoteUnwinder.get_stack_trace) return function, file, line triplets which requires the caller to reorder these when using it in classes like pstat.Stats. (cherry picked from commit 8e8786f) Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
@bedevere-app
Copy link

GH-134956 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14 bugs and security fixes label May 31, 2025
@lkollarlkollar deleted the reorder-stack-frames branch June 7, 2025 17:50
pablogsal added a commit that referenced this pull request Jun 11, 2025
#134956) * gh-91048: Reorder result tuple of parse_code_object (GH-134898) Reorder result tuple of parse_code_object The standard followed by APIs like pstat.Stats is to take a file, line, function triplet. The parse_code_object function (and callers exposing this in Python like RemoteUnwinder.get_stack_trace) return function, file, line triplets which requires the caller to reorder these when using it in classes like pstat.Stats. (cherry picked from commit 8e8786f) Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com> * Reorder asyncio --------- Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
) Reorder result tuple of parse_code_object The standard followed by APIs like pstat.Stats is to take a file, line, function triplet. The parse_code_object function (and callers exposing this in Python like RemoteUnwinder.get_stack_trace) return function, file, line triplets which requires the caller to reorder these when using it in classes like pstat.Stats.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
) Reorder result tuple of parse_code_object The standard followed by APIs like pstat.Stats is to take a file, line, function triplet. The parse_code_object function (and callers exposing this in Python like RemoteUnwinder.get_stack_trace) return function, file, line triplets which requires the caller to reorder these when using it in classes like pstat.Stats.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@lkollar@pablogsal