nbclient icon indicating copy to clipboard operation
nbclient copied to clipboard

FutureWarning with jupyter_client 6.1.5

Open GuillaumeFavelier opened this issue 5 years ago • 1 comments

Since the release of jupyter_client 6.1.5 we obtain a FutureWarning on mne-python in our CIs:

FutureWarning: Method cleanup(connection_file=True) is deprecated, use cleanup_resources(restart=False).
More details
../../../miniconda/lib/python3.7/site-packages/nbclient/client.py:471: in async_setup_kernel
    await self._async_cleanup_kernel()
        cleanup_kc = True
        kwargs     = {}
        loop       = <_UnixSelectorEventLoop running=False closed=False debug=False>
        on_signal  = <function NotebookClient.async_setup_kernel.<locals>.on_signal at 0x7ff5361314d0>
        self       = <nbclient.client.NotebookClient object at 0x7ff538282790>
../../../miniconda/lib/python3.7/site-packages/nbclient/client.py:346: in _async_cleanup_kernel
    await ensure_async(self.km.cleanup())
        now        = False
        self       = <nbclient.client.NotebookClient object at 0x7ff538282790>
../../../miniconda/lib/python3.7/site-packages/jupyter_client/manager.py:358: in cleanup
    FutureWarning)
E   FutureWarning: Method cleanup(connection_file=True) is deprecated, use cleanup_resources(restart=False).

GuillaumeFavelier avatar Jun 30 '20 12:06 GuillaumeFavelier

Yes, the method was deprecated with some improvements made to the underlying models. It's just a warning for now, but will disappear in some future minor or major release (shouldn't be anytime soon).

MSeal avatar Jun 30 '20 15:06 MSeal