jupyter_client icon indicating copy to clipboard operation
jupyter_client copied to clipboard

pytest warning about deprecated modules

Open SnarkBoojum opened this issue 3 years ago • 3 comments

The Debian package was broken ; I had to add the following patch:

--- jupyter-client.orig/pyproject.toml
+++ jupyter-client/pyproject.toml
@@ -53,6 +53,10 @@
   # We could eventually find a way to make sure these are only created
   # when there is a running event loop.
   "ignore:There is no current event loop:DeprecationWarning:zmq",
+
+  # workaround for deprecated modules
+  "ignore:the imp module is deprecated in favour of importlib:DeprecationWarning",
+  "ignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives"
 ]
 
 [tool.mypy]

I saw Steven Silvester already provided a commit for the imp module.

SnarkBoojum avatar May 11 '22 16:05 SnarkBoojum

Our test suite is passing with the existing config, what versions are you using and which libraries are failing raising imp and distutils warnings?

blink1073 avatar May 12 '22 00:05 blink1073

We have ipykernel 6.9.2, and that seems to be the common trigger.

SnarkBoojum avatar May 12 '22 06:05 SnarkBoojum

Yeah, that would do it. I'm happy to accept a PR, or you can maintain that patch.

blink1073 avatar May 12 '22 14:05 blink1073

Update: I've just built jupyter_client 7.4.9 on Debian with ipykernel 6.17.0, and this patch is no longer necessary. I'm guessing it's something to do with the newer ipykernel, but I haven't checked.

juliangilbey avatar Jan 15 '23 11:01 juliangilbey

Yes, that is correct. Thanks @juliangilbey!

blink1073 avatar Jan 15 '23 15:01 blink1073