-
Notifications
You must be signed in to change notification settings - Fork 55
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
Use create()
rather than _create()
#1215
Conversation
Also remove a few uses of ._create() in favour of .create()
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.
LGTM; a few comments.
This PR seems to include a couple of .zip
files that I think shouldn't be there. (cf: #776)
PendingDeprecationWarning, | ||
"in a future Pyface version, code should not pass the create " | ||
"parameter and should instead call create() explicitly", | ||
DeprecationWarning, |
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.
It may be worth adding a suitable stacklevel
parameter here so that the warning message points to the client code (i.e., the code that's passing the create
parameter).
Also applies to other uses of DeprecationWarning
in this PR.
pyface/i_widget.py
Outdated
warn( | ||
"The _create() method will be removed in a future version of " | ||
"Pyface. Use create() instead.", | ||
PendingDeprecationWarning, |
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.
OT: I'm still not sure I understand the use-cases for PendingDeprecationWarning
; it's tempting just to avoid it and use DeprecationWarning
everywhere instead.
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.
In my mind the difference is between "this is going to go away; but we're still using it internally" vs "this is going to go away; and we aren't using it internally any more". That allows two levels of warning for downstream projects.
But yes, this should probably be a deprecation warning.
pyface/image/library/icons.zip
Outdated
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 suspect this addition was unintentional.
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.
Ah, sorry; I see it's a modification, not an addition.
pyface/image/library/std.zip
Outdated
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.
Unintentional addition?
That's what I get for doing |
Yes, sorry - I take it back about the |
This carries out the next two steps of #729
_create
with calls tocreate
_create
intocreate
, and make_create
callcreate
as well as the next step in removing
create
calls from__init__
methods:create
keyword argument.