mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Going back to using uuid.uuid4() for notebook ids.
We were having problems with notebook renaming when using uuid5, as there are many places in the code where we assume that the notebook id is unique and unchanging as long as the notebook server runs.
This commit is contained in:
parent
706819d81c
commit
fa8ab6f37d
@ -70,8 +70,7 @@ class NotebookManager(LoggingConfigurable):
|
||||
|
||||
def new_notebook_id(self, name):
|
||||
"""Generate a new notebook_id for a name and store its mappings."""
|
||||
notebook_id = unicode(uuid.uuid5(uuid.NAMESPACE_URL,
|
||||
'file://'+self.get_path_by_name(name).encode('utf-8')))
|
||||
notebook_id = unicode(uuid.uuid4())
|
||||
self.mapping[notebook_id] = name
|
||||
self.rev_mapping[name] = notebook_id
|
||||
return notebook_id
|
||||
|
Loading…
Reference in New Issue
Block a user