Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing nbclient in Python 3.13 raises a DeprecationWarning #318

Open
Andy-Grigg opened this issue Oct 10, 2024 · 1 comment
Open

Importing nbclient in Python 3.13 raises a DeprecationWarning #318

Andy-Grigg opened this issue Oct 10, 2024 · 1 comment

Comments

@Andy-Grigg
Copy link

Simple reproduction: Run python -X dev -c "import nbclient" and see the following printed:

C:\venv\Lib\site-packages\nbclient\jsonutil.py:29: DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
and fails to parse leap day. The default behavior will change in Python 3.15
to either always raise an exception or to use a different default year (TBD).
To avoid trouble, add a specific year to the input & format.
See https://github.com/python/cpython/issues/70647.
  datetime.strptime("1", "%d")

Looking at the code, the actual date being parsed in the line datetime.strptime("1", "%d") doesn't seem to matter, so the fix is probably as simple as replacing "1" with a real date.

See jupyter/jupyter_client#1027 for the equivalent issue and fix in jupyter_client.

@Andy-Grigg
Copy link
Author

I believe this will be fixed by #315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant