-
Notifications
You must be signed in to change notification settings - Fork 85
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
Remove deleter for the kiva_backend property (which is readonly) #1686
Conversation
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 that the del
has use here: like the other del
methods, it effectively resets the value of kiva_backend
. Without this, a reset requires directly settting _kiva_backend
to `None.
Unless there is a problem I am not seeing.
|
Ah no, there's a problem I'm not seeing, which is that resetting |
Okay, I think this needs a closer look; I'm not at all convinced that the current code (even before the deleters were added) is behaving as it should be. I'll add some new tests and rework. What I think we want is that the value of |
Updated to make |
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 that this is reasonable.
PR #1670 added deleters for various ETSConfig attributes. However, the kiva_backend property is readonly, with value derived from the toolkit attribute, so we shouldn't be providing a deleter for it. The right way to mock kiva_backend is to set the toolkit attribute (and in fact there's already a test for that). This PR removes the deleter for the kiva_backend attribute, and makes the `kiva_backend` property getter a pure function with no caching. (cherry picked from commit aa05dc6)
PR #1670 added deleters for various ETSConfig attributes. However, the kiva_backend property is readonly, with value derived from the toolkit attribute, so we shouldn't be providing a deleter for it. The right way to mock kiva_backend is to set the toolkit attribute (and in fact there's already a test for that). This PR removes the deleter for the kiva_backend attribute, and makes the `kiva_backend` property getter a pure function with no caching. (cherry picked from commit aa05dc6)
PR #1670 added deleters for various
ETSConfig
attributes. However, thekiva_backend
property is readonly, with value derived from thetoolkit
attribute, so we shouldn't be providing a deleter for it. The right way to mockkiva_backend
is to set thetoolkit
attribute (and in fact there's already a test for that).This PR removes the deleter for the
kiva_backend
attribute.