Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-43950: Print columns in tracebacks (PEP 657)#26958

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pablogsal merged 5 commits intopython:mainfromcolnotab:codeobject_changes
Jul 4, 2021

Conversation

@ammaraskar
Copy link
Member

@ammaraskarammaraskar commentedJun 29, 2021
edited
Loading

This pull request implements the relevant bits in traceback printing to utilize the newco_positions andPyCode_Addr2... APIs to print carets for column locations.

All the internal structures, and data representation are subjected to change in future PRs as we add optimizations.

https://bugs.python.org/issue43950

@ammaraskarammaraskarforce-pushed thecodeobject_changes branch 8 times, most recently fromd69a6a4 to6d4302dCompareJuly 2, 2021 01:44
@ammaraskarammaraskar changed the titlebpo-43950: Make compiler output more source offsets.bpo-43950: Print columns in tracebacks (PEP 657)Jul 2, 2021
@pablogsal
Copy link
Member

@ammaraskar Ground control to major tom, commencing countdown engines on

Rebase time!

isidentical reacted with rocket emoji

@pablogsal
Copy link
Member

@pablogsal would you mind cleaning up thebyte_to_character_offset_in_line function here.

Yeah, I will do that. Could you address first@isidentical feedback?

@pablogsalpablogsalforce-pushed thecodeobject_changes branch 6 times, most recently frome0b1f4b to58e2f7fCompareJuly 4, 2021 22:24
@pablogsalpablogsal merged commit5644c7b intopython:mainJul 4, 2021
@pablogsalpablogsal deleted the codeobject_changes branchJuly 4, 2021 23:14
@pablogsal
Copy link
Member

@ammaraskar Can you open the prs for the follow-ups?

#26958 (comment)

@ammaraskar
Copy link
MemberAuthor

#27023 for the config change, working on the traceback.py refactor + a bpo issue.

@ammaraskar
Copy link
MemberAuthor

https://bugs.python.org/issue44569 for the traceback.py change, PR for it coming soon.

"""
iffisNone:
f=sys._getframe().f_back.f_back
f=sys._getframe().f_back.f_back.f_back.f_back
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't seem correct -

Python 3.11.0 | packaged by conda-forge | (main, Oct 25 2022, 06:18:27) [GCC 10.4.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import traceback>>> traceback.walk_stack(None)<generator object walk_stack at 0x7f308f4c4700>>>> list(traceback.walk_stack(None))Traceback (most recent call last):  File "<stdin>", line 1, in <module>  File "/home/graingert/anaconda3/envs/dask-distributed-311/lib/python3.11/traceback.py", line 332, in walk_stack    f = sys._getframe().f_back.f_back.f_back.f_back        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: 'NoneType' object has no attribute 'f_back'>>>

Copy link
Member

Choose a reason for hiding this comment

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

Please, don't comment on merged pull requests because they are not monitored and you risk no one looking at your comment. Always open a new issue :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@graingertgraingertgraingert left review comments

@pablogsalpablogsalpablogsal approved these changes

@isidenticalisidenticalisidentical left review comments

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@ammaraskar@pablogsal@terryjreedy@isidentical@graingert@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp