qtconsole
qtconsole copied to clipboard
Deprecation warnings with Python 3.9
I'm getting several DeprecationWarnings with the test suite:
=============================== warnings summary ===============================
qtconsole/ansi_code_processor.py:46
/home/jdg/debian/spyder-packages/qtconsole/build-area/python-qtconsole-5.0.1/.pybuild/cpython3_3.9_qtconsole/build/qtconsole/ansi_code_processor.py:46: DeprecationWarning: invalid escape sequence \[
CSI_SUBPATTERN = '\[(.*?)([%s])' % CSI_COMMANDS
qtconsole/ansi_code_processor.py:47
/home/jdg/debian/spyder-packages/qtconsole/build-area/python-qtconsole-5.0.1/.pybuild/cpython3_3.9_qtconsole/build/qtconsole/ansi_code_processor.py:47: DeprecationWarning: invalid escape sequence \]
OSC_SUBPATTERN = '\](.*?)[\x07\x1b]'
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_comms.py::Tests::test_frontend_to_kernel
/usr/lib/python3/dist-packages/jupyter_client/threaded.py:182: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
self.ioloop = ioloop.IOLoop()
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_comms.py::Tests::test_frontend_to_kernel
/usr/lib/python3/dist-packages/traitlets/config/configurable.py:82: DeprecationWarning: Passing unrecognized arguments to super(BlockingKernelClient).__init__(signature_scheme='hmac-sha256', key=b'620aa135-fdcbfa03b9a20d52b246d8ac').
object.__init__() takes exactly one argument (the instance to initialize)
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
super(Configurable, self).__init__(**kwargs)
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_comms.py::Tests::test_kernel_to_frontend
/usr/lib/python3/dist-packages/traitlets/config/configurable.py:82: DeprecationWarning: Passing unrecognized arguments to super(BlockingKernelClient).__init__(signature_scheme='hmac-sha256', key=b'5daddaad-1c01735ac8840bf8616903cf').
object.__init__() takes exactly one argument (the instance to initialize)
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
super(Configurable, self).__init__(**kwargs)
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_completion_widget.py::TestCompletionWidget::test_common_path_complete
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_completion_widget.py::TestCompletionWidget::test_droplist_completer_keyboard
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_completion_widget.py::TestCompletionWidget::test_droplist_completer_keyboard
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_completion_widget.py::TestCompletionWidget::test_droplist_completer_mousepick
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_completion_widget.py::TestCompletionWidget::test_droplist_completer_mousepick
.pybuild/cpython3_3.9_qtconsole/build/qtconsole/tests/test_completion_widget.py::TestCompletionWidget::test_droplist_completer_shows
/home/jdg/debian/spyder-packages/qtconsole/build-area/python-qtconsole-5.0.1/.pybuild/cpython3_3.9_qtconsole/build/qtconsole/completion_widget.py:171: DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
point.setY(point.y() + y)
These should be pretty straightforward to fix, I imagine.
Best wishes, Julian
The first two regex issues have now been fixed; the final deprecation warning can be fixed by replacing
point.setY(point.y() + y)
by
point.setY(int(point.y() + y))
@juliangilbey, could you give us a hand with that? Thanks!
Ah, @ArchangeGabriel has just fixed this setY issue! I think the remaining DeprecationWarnings are out of the scope of qtconsole itself. I don't know where they all originate, but this can probably be left for the time being.