-
Notifications
You must be signed in to change notification settings - Fork 533
FIX: Replace deprecated HasTraits.get
with trait_get
#2534
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
FIX: Replace deprecated HasTraits.get
with trait_get
#2534
Conversation
Deprecation mark: https://github.com/enthought/traits/blob/a99b3f64d50c5f7f28ffc01bf69419b061f9e976/traits/has_traits.py#L1481 Fixes the following deprecation warning: ``` nipype/nipype/interfaces/base/specs.py:160: DeprecationWarning: use "HasTraits.trait_get" instead out = super(BaseTraitedSpec, self).get(**kwargs) ``` This warning has started to appear recently, traits must have gotten a major update.
On the other hand, I do think we should conform to the API and move to |
Instead of removing the AttributeError check, I could raise a Warning asking the user to update traits. Even though Regarding conforming our API to the traits', I'm not sure we want to change that. Nipype usually prefers the properties to access the inputs/outputs so no need for getter/setters. WDYT @satra? |
Sorry, ref. the first comment: the idea would be removing the except AttributeError completely in nipype 2.0. |
Our minimum version is 4.6. There is no danger of someone hitting the
Something like this is a pretty common idiom in nipype: def _list_outputs(self):
outputs = self._outputs().get()
... |
i think we could conform to |
Move to trait_get, keep get as alias
Deprecation mark: https://github.com/enthought/traits/blob/a99b3f64d50c5f7f28ffc01bf69419b061f9e976/traits/has_traits.py#L1481
Fixes the following deprecation warning:
This warning has started to appear recently, traits must have gotten a major update.