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:
Brian E. Granger 2011-08-24 10:16:21 -07:00
parent 706819d81c
commit fa8ab6f37d

View File

@ -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