Skip to content

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

krisztian-gajdar
Copy link

@krisztian-gajdar krisztian-gajdar commented Aug 24, 2025

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

@python-cla-bot
Copy link

python-cla-bot bot commented Aug 24, 2025

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.

@bedevere-app
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:

@picnixz
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.

@krisztian-gajdar
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.

@bedevere-app
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.
@krisztian-gajdar krisztian-gajdar force-pushed the traceback-to-handle-error-msgs-with-period branch from e71d03b to 686051c Compare August 24, 2025 12:34
@AA-Turner
Copy link
Member

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

@picnixz
Copy link
Member

picnixz commented Aug 24, 2025

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
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.

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

Successfully merging this pull request may close these issues.

3 participants