ipywidgets
ipywidgets copied to clipboard
7.6.3: pytest warnings
Just normal build, install and test cycle used on building package from non-root account:
- "setup.py build"
- "setup.py install --root </install/prefix>"
- "pytest with PYTHONPATH pointing to setearch and sitelib inside </install/prefix>
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipywidgets-7.6.3-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipywidgets-7.6.3-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/ipywidgets-7.6.3
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, Faker-8.8.1
collected 159 items
. . [ 0%]
ipywidgets/tests/test_embed.py ........ [ 5%]
ipywidgets/widgets/tests/test_docutils.py .. [ 6%]
ipywidgets/widgets/tests/test_interaction.py ........................................ [ 32%]
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 .......... [ 43%]
ipywidgets/widgets/tests/test_traits.py .............................. [ 62%]
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:1739
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1739: 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:1754
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1754: 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:1784
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1784: 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:1784
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1784: 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.3/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: 12 warnings
/home/tkloczko/rpmbuild/BUILD/ipywidgets-7.6.3/ipywidgets/widgets/interaction.py:141: 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
===================================================================== 158 passed, 27 warnings in 8.63s =====================================================================
8.0.1 looks like still shows those warnings
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipywidgets-8.0.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipywidgets-8.0.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/ipywidgets-8.0.1/python/ipywidgets
plugins: anyio-3.6.1
collected 234 items
ipywidgets/tests/test_embed.py ........ [ 3%]
ipywidgets/widgets/tests/test_datetime_serializers.py ......... [ 7%]
ipywidgets/widgets/tests/test_docutils.py .. [ 8%]
ipywidgets/widgets/tests/test_interaction.py .................................... [ 23%]
ipywidgets/widgets/tests/test_link.py .. [ 24%]
ipywidgets/widgets/tests/test_selectioncontainer.py .................. [ 32%]
ipywidgets/widgets/tests/test_send_state.py ... [ 33%]
ipywidgets/widgets/tests/test_set_state.py .......................... [ 44%]
ipywidgets/widgets/tests/test_traits.py .............................. [ 57%]
ipywidgets/widgets/tests/test_widget.py ... [ 58%]
ipywidgets/widgets/tests/test_widget_box.py .... [ 60%]
ipywidgets/widgets/tests/test_widget_datetime.py ........... [ 64%]
ipywidgets/widgets/tests/test_widget_float.py ... [ 66%]
ipywidgets/widgets/tests/test_widget_image.py ................ [ 73%]
ipywidgets/widgets/tests/test_widget_naive_datetime.py .......... [ 77%]
ipywidgets/widgets/tests/test_widget_output.py ........ [ 80%]
ipywidgets/widgets/tests/test_widget_selection.py .......... [ 85%]
ipywidgets/widgets/tests/test_widget_string.py .. [ 85%]
ipywidgets/widgets/tests/test_widget_templates.py ................ [ 92%]
ipywidgets/widgets/tests/test_widget_time.py ......... [ 96%]
ipywidgets/widgets/tests/test_widget_upload.py ........ [100%]
============================================================================= warnings summary =============================================================================
../../../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1909
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1909: DeprecationWarning: Keyword `trait` is deprecated in traitlets 5.0, use `value_trait` instead
value = Dict(trait=Unicode(), default_value={"foo": "1"})
../../../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1923
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1923: DeprecationWarning: Keyword `traits` is deprecated in traitlets 5.0, use `per_key_traits` instead
value = Dict(traits={"foo": Int()}, default_value={"foo": 1})
../../../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1951
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1951: DeprecationWarning: Keyword `trait` is deprecated in traitlets 5.0, use `value_trait` instead
value = Dict(
../../../../../../../usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1951
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1951: DeprecationWarning: Keyword `traits` is deprecated in traitlets 5.0, use `per_key_traits` instead
value = Dict(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===================================================================== 234 passed, 4 warnings in 2.27s ======================================================================
Thanks for the report. This appears to be the PR in traitlets deprecating this keyword argument in traitlets 5: https://github.com/ipython/traitlets/pull/306
Since we support traitlets 4, I don't think we can change our code just yet, but note the deprecation warnings in traitlets 5, and if/when traitlets 6.0 comes out, we'll have to drop traitlets 4 support.
Actually, looking at this closer, the deprecation warning
/usr/lib/python3.8/site-packages/traitlets/tests/test_traitlets.py:1739: DeprecationWarning: Keyword
traitis deprecated in traitlets 5.0, usevalue_traitinstead
is coming from traitlets itself. It looks like we are importing a module from traitlets, and during the import those deprecation warnings are thrown on that imported code. I've opened https://github.com/ipython/traitlets/pull/778 to fix this in traitlets.
Thnak you to let me know 👍