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

PR: Fix traitlets deprecation warning #17076

Merged
merged 2 commits into from
Dec 23, 2021

Conversation

juliangilbey
Copy link
Contributor

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Fixed the traitlets DeprecationWarning raised by spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py::test_banners. The unit test should no longer raise a warning after this change.

Issue(s) Resolved

Fixes #14534 with thanks to @dalthviz

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin,
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @juliangilbey

@ccordoba12 ccordoba12 added this to the v5.2.2 milestone Dec 22, 2021
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks for your help with this @juliangilbey! I left a minor comment, otherwise looks good to me.

setup.py Outdated
@@ -241,6 +241,7 @@ def run(self):
'spyder-kernels>=2.2.0,<2.3.0',
'textdistance>=4.2.0',
'three-merge>=0.1.1',
'traitlets>=4.1',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'traitlets>=4.1',

trailets is a transitive dependency, so we don't need to depend on it directly:

spyder -> spyder-kernels -> ipykernel -> traitlets

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is true, though the remainder of the patch does explicitly import it. I guess it's a matter of style to a great extent; this explicit listing just makes the version requirements explicit, though ipykernel does that anyway. I'm not particularly bothered either way; happy to make that change or let you do it.

Copy link
Member

Choose a reason for hiding this comment

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

Please make it. We already have a lot of dependencies to add one more for such a simple change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @juliangilbey for your help with this!

@ccordoba12 ccordoba12 changed the title Fix traitlets deprecation warning PR: Fix traitlets deprecation warning Dec 23, 2021
@ccordoba12 ccordoba12 merged commit 4dd6201 into spyder-ide:5.x Dec 23, 2021
ccordoba12 added a commit that referenced this pull request Dec 23, 2021
@juliangilbey juliangilbey deleted the fix-traitlets-deprecation branch September 30, 2022 09:44
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.

None yet

2 participants