Replace references to unicode and basestring

This commit is contained in:
Thomas Kluyver 2013-10-23 17:02:19 -07:00
parent d4532983f4
commit 4a14ed7e22
2 changed files with 4 additions and 2 deletions

View File

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

View File

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