ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

7.6.5: pytest shows some `DeprecationWarning`

Open kloczek opened this issue 3 years ago • 1 comments

Description

I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes oly locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output with deprecation warnings:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipywidgets-7.6.5-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipywidgets-7.6.5-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/ipywidgets-7.6.5
collected 157 items

ipywidgets/tests/test_embed.py ........                                                                                                                              [  5%]
ipywidgets/widgets/tests/test_docutils.py ..                                                                                                                         [  6%]
ipywidgets/widgets/tests/test_interaction.py ........................................                                                                                [ 31%]
ipywidgets/widgets/tests/test_link.py ..                                                                                                                             [ 33%]
ipywidgets/widgets/tests/test_selectioncontainer.py ...                                                                                                              [ 35%]
ipywidgets/widgets/tests/test_send_state.py ..                                                                                                                       [ 36%]
ipywidgets/widgets/tests/test_set_state.py ..........                                                                                                                [ 42%]
ipywidgets/widgets/tests/test_traits.py ..............................                                                                                               [ 61%]
ipywidgets/widgets/tests/test_widget.py ..                                                                                                                           [ 63%]
ipywidgets/widgets/tests/test_widget_box.py ....                                                                                                                     [ 65%]
ipywidgets/widgets/tests/test_widget_float.py ...                                                                                                                    [ 67%]
ipywidgets/widgets/tests/test_widget_image.py ................                                                                                                       [ 77%]
ipywidgets/widgets/tests/test_widget_output.py ........                                                                                                              [ 82%]
ipywidgets/widgets/tests/test_widget_selection.py .......                                                                                                            [ 87%]
ipywidgets/widgets/tests/test_widget_string.py ..                                                                                                                    [ 88%]
ipywidgets/widgets/tests/test_widget_templates.py ................                                                                                                   [ 98%]
ipywidgets/widgets/tests/test_widget_upload.py ..                                                                                                                    [100%]

============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1740
  /usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1740: DeprecationWarning: Keyword `trait` is deprecated in traitlets 5.0, use `value_trait` instead
    value = Dict(trait=Unicode(),

../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1755
  /usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1755: DeprecationWarning: Keyword `traits` is deprecated in traitlets 5.0, use `per_key_traits` instead
    value = Dict(traits={'foo': Int()},

../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1785
  /usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1785: DeprecationWarning: Keyword `trait` is deprecated in traitlets 5.0, use `value_trait` instead
    value = Dict(trait=Unicode(),

../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1785
  /usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1785: DeprecationWarning: Keyword `traits` is deprecated in traitlets 5.0, use `per_key_traits` instead
    value = Dict(trait=Unicode(),

ipywidgets/widgets/tests/test_interaction.py: 11 warnings
  /home/tkloczko/rpmbuild/BUILD/ipywidgets-7.6.5/ipywidgets/widgets/widget_selection.py:121: DeprecationWarning: Support for mapping types has been deprecated and will be dropped in a future release.
    warnings.warn("Support for mapping types has been deprecated and will be dropped in a future release.", DeprecationWarning)

ipywidgets/widgets/tests/test_interaction.py::test_mapping
  /home/tkloczko/rpmbuild/BUILD/ipywidgets-7.6.5/ipywidgets/widgets/tests/test_interaction.py:257: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    from collections import Mapping, OrderedDict

ipywidgets/widgets/tests/test_interaction.py: 12 warnings
  /home/tkloczko/rpmbuild/BUILD/ipywidgets-7.6.5/ipywidgets/widgets/interaction.py:142: DeprecationWarning: Using function annotations to implicitly specify interactive controls is deprecated. Use an explicit keyword argument for the parameter instead.
    warn("Using function annotations to implicitly specify interactive controls is deprecated. Use an explicit keyword argument for the parameter instead.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
===================================================================== 157 passed, 28 warnings in 2.69s =====================================================================

kloczek avatar Jan 11 '22 08:01 kloczek

These should be fixed by #3569 and https://github.com/ipython/traitlets/pull/778

jasongrout avatar Sep 16 '22 17:09 jasongrout