bpo-43950: Print columns in tracebacks (PEP 657)#26958
Merged
pablogsal merged 5 commits intopython:mainfrom Jul 4, 2021
Merged
bpo-43950: Print columns in tracebacks (PEP 657)#26958pablogsal merged 5 commits intopython:mainfrom
pablogsal merged 5 commits intopython:mainfrom
Conversation
d69a6a4 to
6d4302d
Compare
Member
|
@ammaraskar Ground control to major tom, commencing countdown engines on Rebase time! |
isidentical
reviewed
Jul 2, 2021
isidentical
reviewed
Jul 2, 2021
6d4302d to
1fd558c
Compare
isidentical
reviewed
Jul 4, 2021
isidentical
reviewed
Jul 4, 2021
isidentical
reviewed
Jul 4, 2021
isidentical
reviewed
Jul 4, 2021
Member
Yeah, I will do that. Could you address first @isidentical feedback? |
73bcea3 to
9a31711
Compare
e0b1f4b to
58e2f7f
Compare
pablogsal
approved these changes
Jul 4, 2021
Member
|
@ammaraskar Can you open the prs for the follow-ups? |
Member
Author
|
#27023 for the config change, working on the traceback.py refactor + a bpo issue. |
Member
Author
|
https://bugs.python.org/issue44569 for the traceback.py change, PR for it coming soon. |
graingert
reviewed
Nov 2, 2022
| """ | ||
| if f is None: | ||
| f = sys._getframe().f_back.f_back | ||
| f = sys._getframe().f_back.f_back.f_back.f_back |
Contributor
There was a problem hiding this comment.
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 linux
Type "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'
>>>
Member
There was a problem hiding this comment.
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 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request implements the relevant bits in traceback printing to utilize the new
co_positionsandPyCode_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