-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
gh-137716: Fix double period in AttributeError message for invalid mock assertions #137717
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-137716: Fix double period in AttributeError message for invalid mock assertions #137717
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the wrong place for this fix. This should be fixed in traceback IMO, it should not add another period if one exists.
So here, we should check for But since dot is being added by default in the traceback, as well as all other attribute errors raised don't have dot in the end of them. Doesn't it make sense to remove it in mock ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I'm fine with this. We can pursue the traceback change independently, but most AttributeError do not end with a period
Misc/NEWS.d/next/Core_and_Builtins/2025-08-13-16-58-58.gh-issue-137716.ZcZSyi.rst
Outdated
Show resolved
Hide resolved
…e-137716.ZcZSyi.rst
Issue: #137716