This is a great question. Let's break down this DeprecationWarning step by step.
TL;DR: What's Happening?
This is not an error that will stop your program. It's a friendly warning from Python about a future change. A library that jupyter-server uses is parsing a date without specifying the year (e.g., "September 26" instead of "September 26, 2024"). This is ambiguous, especially for leap days like "February 29".
Your Action: The best thing to do is update your packages. The library developers are likely already aware of this and have fixed it in a newer version.
Detailed Explanation
1. What is a DeprecationWarning?
A DeprecationWarning is Python's way of saying: "Heads up! The way some code is working right now is considered old-fashioned or potentially problematic. It still works for now, but in a future version of Python (in this case, 3.15), it will either be removed or will behave differently and might cause an error."
It's a notice for developers (in this case, the developers of jupyter-server or its dependencies) to update their code.
2. The Core of the Problem: Ambiguous Dates
The warning message is very specific:
Parsing dates involving a day of month without a year specified is ambiguious and fails to parse leap day.
Imagine you ask Python to parse the date "February 29".
- Is that February 29, 2024? (Valid, it's a leap year)
- Is that February 29, 2023? (Invalid, not a leap year)
Without a year, Python has to guess, and this guesswork can lead to bugs. To prevent this, the Python core developers have decided that in Python 3.15, this ambiguity will no longer be allowed. Code will be required to provide a year.
3. Why are YOU seeing this?
You are not doing anything wrong. The warning is triggered by the line:
from jupyter_server.serverapp import main
When you run the jupyter-server command, it executes a script that imports its main application. Somewhere deep inside the jupyter_server library (or another library that it depends on), there is code that performs this kind of ambiguous date parsing.
You are seeing this message because you are using a newer version of Python (3.13 in your py313 environment) which is designed to alert you to these upcoming changes. Someone on Python 3.10 might not see this warning at all for the same version of jupyter-server.
What Should You Do?
You have a few options, ordered from best to worst.
Option 1: (Best) Update Your Packages
This is the most common and recommended solution. The developers of jupyter-server and its dependencies are very likely aware of this and have already fixed it in a more recent release.
Since you are using micromamba, run the following command to update jupyter-server and related packages:
micromamba update jupyter-server jupyterlab
# Or more broadly, to update everything in the environment:
# micromamba update --all
If you installed it with pip, you would use:
pip install --upgrade jupyter-server jupyterlab
After updating, try running jupyter-server again. The warning will likely be gone.
Option 2: Ignore It (For Now)
Since this is a warning, not an error, your Jupyter server is most likely running perfectly fine. If updating doesn't fix it (perhaps a fix isn't released yet), it's generally safe to ignore this specific warning. It will not become a real error until you upgrade to Python 3.15 in the future, by which time the libraries will almost certainly be fixed.
Option 3: (Advanced) Suppress the Warning
This is generally not recommended because it can hide other important warnings, but it's useful to know how. You can tell Python to ignore deprecation warnings when you run your command.
You can do this by setting an environment variable:
PYTHONWARNINGS="ignore:DeprecationWarning" jupyter-server
Or by passing a flag to the python interpreter if you were running a script directly (less applicable here, but for context):
python -W ignore:DeprecationWarning your_script.py
Again, only do this if the warning is genuinely disruptive and you're confident it's not causing any real issues. Updating is the proper fix.