-
Notifications
You must be signed in to change notification settings - Fork 0
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
Modify https://github.com/jupyter-server/jupyter_server/pull/1367 #1
Modify https://github.com/jupyter-server/jupyter_server/pull/1367 #1
Conversation
) | ||
validate_model(model, expect_content=content, expect_md5=md5) | ||
except TypeError: | ||
# Fallback for ContentsManager not handling the require_hash argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good fallback method. I had thought about using inspect.signature
and I just want to get your opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about doing that once. But as the handler are instantiated for each request, I think the try/except is faster than signature inspection.
Co-authored-by: Frédéric Collonval <fcollonval@gmail.com>
This modifies jupyter-server#1367 in order to:
ContentsManager
as contents manager are expected to update to the latest API supporting hashMixin
classes backward compatible as they may be reused downstream_read_file
(it only read files)_get_hash
)hash_algorithm
except ifhash
is set@Wh1isper feel free to cherry-pick my commits to your branch. I would strongly suggest removing the downstream test against
jupytext
because we have already very limited maintenance capability.