File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
jupyter_server/prometheus Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1616
1717
1818if (
19- notebook_version_info is not None
20- and notebook_version_info < (7 ,)
19+ notebook_version_info is not None # No notebook package found
20+ and notebook_version_info < (7 ,) # Notebook package found, is version 6
21+ # Notebook package found, but its version is the same as jupyter_server
22+ # version. This means some package (lookin at you, nbclassic) has shimmed
23+ # the notebook package to instead be imports from the jupyter_server package.
24+ # In such cases, notebook.prometheus.metrics is actually *this file*, so
25+ # trying to import it will cause a circular import. So we don't.
2126 and notebook_version_info != server_version_info
2227):
23- print ("yes, we think we have an unshimmed notebook package" )
24- print (notebook_version_info )
2528 # Jupyter Notebook v6 also defined these metrics. Re-defining them results in a ValueError,
2629 # so we simply re-export them if we are co-existing with the notebook v6 package.
2730 # See https://github.com/jupyter/jupyter_server/issues/209
You can’t perform that action at this time.
0 commit comments