Skip to content

Commit

Permalink
Revert "More clearly specify how we look for v6 notebook packages"
Browse files Browse the repository at this point in the history
This commit caused the *notebook* downstream version check
to fail, which makes sense?

This reverts commit 40029a7.
  • Loading branch information
yuvipanda committed Oct 29, 2024
1 parent 40029a7 commit 3a4ceca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions jupyter_server/prometheus/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@

try:
from notebook._version import version_info as notebook_version_info
v6_notebook_present = notebook_version_info != server_version_info
except ImportError:
# notebook._version is not present, so notebook v6 can not be present
v6_notebook_present = False
notebook_version_info = None


if v6_notebook_present:
if notebook_version_info is not None and notebook_version_info < (7,) and notebook_version_info != server_version_info:
print("yes, we think we have an unshimmed notebook package")
print(notebook_version_info)
print(server_version_info)
# Jupyter Notebook v6 also defined these metrics. Re-defining them results in a ValueError,
# so we simply re-export them if we are co-existing with the notebook v6 package.
# See https://github.com/jupyter/jupyter_server/issues/209
Expand Down

0 comments on commit 3a4ceca

Please sign in to comment.