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

'saferepr' handles classes with broken __getattribute__ #7168

Merged

Conversation

nicoddemus
Copy link
Member

Fix #7145

Credit goes to @bluetech. 👍

@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label May 5, 2020
Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

neat! I made a video about this recently heheh

@asottile
Copy link
Member

asottile commented May 6, 2020

fwiw, backporting this to 4.6 will be tricky, since you may have raised old-style classes (covered in the video) where type(obj).__name__ will always return "instance"

@nicoddemus
Copy link
Member Author

fwiw, backporting this to 4.6 will be tricky, since you may have raised old-style classes (covered in the video) where type(obj).name will always return "instance"

Oh no, the backport is to the 5.4.x branch. We have changed the meaning of the backport labels since we changed the development workflow to remove the features branch.

@bluetech do you remember where we wrote that down? 🤔

@nicoddemus nicoddemus merged commit 4d43976 into pytest-dev:master May 6, 2020
@nicoddemus nicoddemus deleted the saferepr-getattr-fail-7145 branch May 6, 2020 20:57
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request May 6, 2020
@asottile
Copy link
Member

asottile commented May 6, 2020

ah I figured as much, the label still says 4.6 though 😆

@nicoddemus
Copy link
Member Author

Ahh fair enough, I will update the descriptions! 👍

@nicoddemus
Copy link
Member Author

Backported: #7174

@nicoddemus nicoddemus added backported and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels May 6, 2020
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.

INTERNALERROR when exception in __repr__
3 participants