mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Replace references to unicode and basestring
This commit is contained in:
parent
d4532983f4
commit
4a14ed7e22
@ -34,6 +34,7 @@ except ImportError:
|
||||
|
||||
from IPython.config import Application
|
||||
from IPython.utils.path import filefind
|
||||
from IPython.utils.py3compat import string_types
|
||||
|
||||
# UF_HIDDEN is a stat flag not defined in the stat module.
|
||||
# It is used by BSD to indicate hidden files.
|
||||
@ -307,7 +308,7 @@ class FileFindHandler(web.StaticFileHandler):
|
||||
_static_paths = {}
|
||||
|
||||
def initialize(self, path, default_filename=None):
|
||||
if isinstance(path, basestring):
|
||||
if isinstance(path, string_types):
|
||||
path = [path]
|
||||
|
||||
self.root = tuple(
|
||||
|
@ -22,6 +22,7 @@ import sqlite3
|
||||
from tornado import web
|
||||
|
||||
from IPython.config.configurable import LoggingConfigurable
|
||||
from IPython.utils.py3compat import unicode_type
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Classes
|
||||
@ -66,7 +67,7 @@ class SessionManager(LoggingConfigurable):
|
||||
|
||||
def new_session_id(self):
|
||||
"Create a uuid for a new session"
|
||||
return unicode(uuid.uuid4())
|
||||
return unicode_type(uuid.uuid4())
|
||||
|
||||
def create_session(self, name=None, path=None, kernel_id=None, ws_url=None):
|
||||
"""Creates a session and returns its model"""
|
||||
|
Loading…
Reference in New Issue
Block a user