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

gh-137716: TracebackException to handle messages with punctuation #138111

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

Open
krisztian-gajdar wants to merge 14 commits into python:main
base: main
Choose a base branch
Loading
from krisztian-gajdar:traceback-to-handle-error-msgs-with-period

Conversation

@krisztian-gajdar
Copy link

@krisztian-gajdar krisztian-gajdar commented Aug 24, 2025
edited by bedevere-app bot
Loading

Added extra handling for error messages with punctuation to avoid double punctuations and eliminated code duplication

Copy link

python-cla-bot bot commented Aug 24, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

There seems to be too many changes. Please revert unrelated changes and code refactoring.

Copy link

bedevere-app bot commented Aug 24, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Ok for the refactoring (no need for additional tests). However here are some suggestions for readability:

Copy link
Member

picnixz commented Aug 24, 2025

I'm still unusure about whether to rstrip() or not. I said "no" for now but it could be helpful. On one's hand, if a (custom) exception message ends with a new line for readability purposes, it would be better not to add the punctuation as well and use a fresh new line.

Copy link
Author

I have made the requested changes; please review again

Thank you for reconsideration of the proposed refactor.
I think we can safely consider exception messages ending with a new line out of scope for this use case.

Copy link

bedevere-app bot commented Aug 24, 2025

Thanks for making the requested changes!

: please review the changes made to this pull request.

...tuations
docs: add news entry for TracebackException punctuation fix
style: remove trailing whitespace in traceback.py
Update 2025年08月24日-11-42-38.gh-issue-137716.7-Mtj-.rst
Update 2025年08月24日-11-42-38.gh-issue-137716.7-Mtj-.rst
refactor: improve suggestion message computation and punctuation handling
style: remove trailing whitespace in traceback.py
pythongh-137986: Fix and improve the csv functions docstrings (pythonGH-137987)
The csv.register_dialect() docstring no longer imply that it returns a
dialect.
All functions have now signatures.
Co-authored-by: maurycy <5383+maurycy@users.noreply.github.com>
pythongh-135261: bring back CI job for testing OpenSSL 1.1.1w (python#135262)
This partially reverts commit d83e30c
by bringing back the CI job for testing OpenSSL 1.1.1w. Despite this
version being upstream EOL, the rationale for keeping it as follows:
- It most resembles other 1.1.1-work-a-like ssl APIs supported by important vendors.
- Python officially requires OpenSSL 1.1.1 or later, although OpenSSL 3.0 or later
 is recommended for cryptographic modules. Since changing the build requirements
 requires a transition period, we need to keep testing the allowed versions.
- The code base still contains calls to OpenSSL functions that are deprecated since
 OpenSSL 3.0 as well as `ifdef` blocks constrained to OpenSSL 1.1.1.
Copy link
Member

This PR contains several unrelated changes, please revert all of these.

krisztian-gajdar reacted with thumbs up emoji

Copy link
Member

picnixz commented Aug 24, 2025
edited
Loading

This PR contains several unrelated changes, please revert all of these.

I thought so but I think it's necessary (the changes are a simple refactorization to simplify the handling). As for the blank lines being removed, we can revert them or keep them.

EDIT: NVM, it's the merge commit that messed up the review. @krisztian-gajdar Please avoid force-pushing, it makes incremental review harder.

krisztian-gajdar reacted with thumbs up emoji

Copy link
Author

NVM, it's the merge commit that messed up the review. @krisztian-gajdar Please avoid force-pushing, it makes incremental review harder.

Yep, fixed. sorry for the inconvenience.

@hugovk hugovk removed their request for review August 25, 2025 16:07
Copy link
Author

@picnixz, @AA-Turner Is there anything else I should do?

Copy link
Author

@picnixz, @AA-Turner Is there anything else I should do?

Just checking in, let me know if I can help move this forward 🙏

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Some refactoring suggestions.

Copy link
Author

@picnixz I have made the requested changes; please review again.

Copy link

bedevere-app bot commented Sep 7, 2025

Thanks for making the requested changes!

: please review the changes made to this pull request.

Copy link
Author

Thank you @picnixz for the approve. @AA-Turner what are the next steps?

Copy link
Author

@picnixz @AA-Turner do I need to update, or resolve conflicts?

Copy link
Member

Yes, please resolve conflicts.

A

krisztian-gajdar and others added 3 commits October 31, 2025 08:05
Remove "Did you mean" suggestions and import prompts from NameError and
AttributeError exception handling in traceback formatting. This eliminates
automatic suggestion text that was being appended to error messages.
Copy link
Author

@AA-Turner conflicts have been resolved, please proceed with the merge. 🙏

Copy link
Member

AA-Turner commented Nov 2, 2025
edited
Loading

please proceed with the merge. 🙏

I still have outstanding review comments above, please let me know if it's been resolved.

A

Copy link
Author

All of them has been resolved as I see, please let me know if it's not the case.

Copy link
Member

Thank you. In the future, please add a comment after each review suggestion noting if/how it has been resolved.

A

krisztian-gajdar reacted with thumbs up emoji

Copy link
Author

@AA-Turner I wrote it down, thank you!

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

Reviewers

@picnixz picnixz picnixz approved these changes

@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti

@AA-Turner AA-Turner Awaiting requested review from AA-Turner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /