Warn on unrecognized Configurable kwargs with UserWarning - #976
Conversation
HasTraits already warned when leftover kwargs reached object.__init__, but it used DeprecationWarning at stacklevel=2. That points at Configurable.__init__, so IPython hid the message. UserWarning is visible by default, which matches the discussion on ipython#926.
Codecov Report✅ All modified and coverable lines are covered by tests.
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The The failing test there is jupyter_server's own |
|
Update on the second failing check: |
Fixes #926.
HasTraits.__init__already warns when leftover kwargs are passed through toobject.__init__. The warning usedDeprecationWarningatstacklevel=2, so forConfigurablesubclasses the reported frame isConfigurable.__init__and IPython hides it.@minrk noted that this is always a bug in the calling code and that
UserWarningis appropriate. This switches the category so the message is visible by default, including forConfigurable/IPython.embed()typos.