mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Update imports for Python 3
2to3 fixer imports (+ manual changes)
This commit is contained in:
parent
4a14ed7e22
commit
51040fb768
@ -16,7 +16,10 @@ Authors:
|
||||
# Imports
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
import Cookie
|
||||
try:
|
||||
from http.cookies import SimpleCookie # Py 3
|
||||
except ImportError:
|
||||
from Cookie import SimpleCookie # Py 2
|
||||
import logging
|
||||
from tornado import web
|
||||
from tornado import websocket
|
||||
@ -102,7 +105,7 @@ class AuthenticatedZMQStreamHandler(ZMQStreamHandler, IPythonHandler):
|
||||
logging.error("First ws message didn't have the form 'identity:[cookie]' - %r", msg)
|
||||
|
||||
try:
|
||||
self.request._cookies = Cookie.SimpleCookie(msg)
|
||||
self.request._cookies = SimpleCookie(msg)
|
||||
except:
|
||||
self.log.warn("couldn't parse cookie string: %s",msg, exc_info=True)
|
||||
|
||||
|
@ -15,7 +15,7 @@ from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
from StringIO import StringIO
|
||||
from io import StringIO
|
||||
from subprocess import Popen, PIPE
|
||||
import unittest
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user