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-99180: Remove traceback anchors in return and assign statements that cover all the displayed range #112670

Merged
merged 1 commit into from
May 1, 2024

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Dec 3, 2023

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Spotted some minor typos:

Lib/test/test_traceback.py Outdated Show resolved Hide resolved
Lib/test/test_traceback.py Outdated Show resolved Hide resolved
@pablogsal pablogsal requested a review from lysnikolaou January 8, 2024 15:12
@pablogsal
Copy link
Member Author

Hey @lysnikolaou, can you check if this is more or less what you had in mind? (I will rebase soon)

…nts that cover all the displayed range

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>

Apply suggestions from code review

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

fix whitespace issue causing the lint check to fail
Copy link
Member

@lysnikolaou lysnikolaou left a comment

Choose a reason for hiding this comment

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

This looks a lot like what I had in mind and seeing the implementation I think it's a step towards the right direction!

@lysnikolaou
Copy link
Member

@pablogsal Let's merge this?

@pablogsal pablogsal merged commit 4a08a75 into python:main May 1, 2024
31 checks passed
@pablogsal pablogsal deleted the gh-99180 branch May 1, 2024 13:42
@pablogsal pablogsal added the needs backport to 3.12 bug and security fixes label May 1, 2024
@pablogsal pablogsal removed the needs backport to 3.12 bug and security fixes label May 1, 2024
@python python deleted a comment from miss-islington-app bot May 1, 2024
@python python deleted a comment from miss-islington-app bot May 1, 2024
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot iOS ARM64 Simulator 3.x has failed when building commit 4a08a75.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1380/builds/143) and take a look at the build logs.
  4. Check if the failure is related to this commit (4a08a75) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1380/builds/143

Failed tests:

  • test_socket

Failed subtests:

  • test_dual_stack_client_v6 - test.test_socket.CreateServerFunctionalTest.test_dual_stack_client_v6

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/358FF9CB-4D5D-4034-8AFB-6FDD92A7A50B/data/Containers/Bundle/Application/1CB439A9-DD6A-4243-BF2F-EC7DA3A99532/iOSTestbed.app/python/lib/python3.13/test/test_socket.py", line 6847, in test_dual_stack_client_v6
    with socket.create_server(("", port), family=socket.AF_INET6,
         ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                              dualstack_ipv6=True) as sock:
                              ^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/358FF9CB-4D5D-4034-8AFB-6FDD92A7A50B/data/Containers/Bundle/Application/1CB439A9-DD6A-4243-BF2F-EC7DA3A99532/iOSTestbed.app/python/lib/python3.13/socket.py", line 934, in create_server
    raise error(err.errno, msg) from None
OSError: [Errno 48] Address already in use (while attempting to bind on address ('', 57463))

SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
@@ -727,6 +724,37 @@ def output_line(lineno):

return ''.join(row)

def should_show_carets(self, start_offset, end_offset, all_lines, anchors):
Copy link
Member

@AlexWaygood AlexWaygood May 24, 2024

Choose a reason for hiding this comment

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

Is this method meant to be a public-API method on StackSummary objects, or is it meant to be private API? If the former, we should probably document it at https://docs.python.org/3.13/library/traceback.html#stacksummary-objects. If the latter, maybe it should have a name prefixed with an underscore?

Copy link
Member Author

Choose a reason for hiding this comment

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

It should be private so I am fine prefixing it with an underscore

Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants