Merge pull request #8283 from minrk/split-html

move IPython.html to jupyter_notebook
Min RK 11 years ago
commit ac48054958

4
.gitignore vendored

@ -7,8 +7,8 @@ docs/source/api/generated
docs/source/config/options
docs/source/interactive/magics-generated.txt
docs/gh-pages
IPython/html/notebook/static/mathjax
IPython/html/static/style/*.map
jupyter_notebook/notebook/static/mathjax
jupyter_notebook/static/style/*.map
*.py[co]
__pycache__
*.egg-info

@ -175,6 +175,7 @@ shims = {
'kernel': 'ipython_kernel',
'kernel.inprocess': 'ipython_kernel.inprocess',
'config': 'traitlets',
'html': 'jupyter_notebook',
}
# Name -> (include, exclude, dependencies_met)

@ -1,3 +1,3 @@
if __name__ == '__main__':
from IPython.html import notebookapp as app
from jupyter_notebook import notebookapp as app
app.launch_new_instance()

@ -29,9 +29,9 @@ from IPython.utils.sysinfo import get_sys_info
from IPython.config import Application
from IPython.utils.path import filefind
from IPython.utils.py3compat import string_types
from IPython.html.utils import is_hidden, url_path_join, url_escape
from jupyter_notebook.utils import is_hidden, url_path_join, url_escape
from IPython.html.services.security import csp_report_uri
from jupyter_notebook.services.security import csp_report_uri
#-----------------------------------------------------------------------------
# Top-level handlers

@ -90,7 +90,7 @@ WS_PING_INTERVAL = 30000
if os.environ.get('IPYTHON_ALLOW_DRAFT_WEBSOCKETS_FOR_PHANTOMJS', False):
warnings.warn("""Allowing draft76 websocket connections!
This should only be done for testing with phantomjs!""")
from IPython.html import allow76
from jupyter_notebook import allow76
WebSocketHandler = allow76.AllowDraftWebSocketHandler
# draft 76 doesn't support ping
WS_PING_INTERVAL = 0

@ -10,7 +10,7 @@ import base64
from tornado import web
from IPython.html.base.handlers import IPythonHandler
from jupyter_notebook.base.handlers import IPythonHandler
class FilesHandler(IPythonHandler):
"""serve files via ContentsManager"""

@ -8,8 +8,8 @@ import shutil
import requests
from IPython.html.utils import url_path_join
from IPython.html.tests.launchnotebook import NotebookTestBase, assert_http_error
from jupyter_notebook.utils import url_path_join
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
from IPython.nbformat import write
from IPython.nbformat.v4 import (
new_notebook, new_markdown_cell, new_code_cell, new_output,

@ -49,7 +49,7 @@ from tornado import httpserver
from tornado import web
from tornado.log import LogFormatter, app_log, access_log, gen_log
from IPython.html import (
from jupyter_notebook import (
DEFAULT_STATIC_FILES_PATH,
DEFAULT_TEMPLATE_PATH_LIST,
)
@ -116,7 +116,7 @@ def random_ports(port, n):
def load_handlers(name):
"""Load the (URL pattern, handler) tuples for each component."""
name = 'IPython.html.' + name
name = 'jupyter_notebook.' + name
mod = __import__(name, fromlist=['default_handlers'])
return mod.default_handlers
@ -576,7 +576,7 @@ class NotebookApp(BaseIPythonApplication):
extra_template_paths = List(Unicode, config=True,
help="""Extra paths to search for serving jinja templates.
Can be used to override templates from IPython.html.templates."""
Can be used to override templates from jupyter_notebook.templates."""
)
def _extra_template_paths_default(self):
return []

@ -5,8 +5,8 @@ import json
import requests
from IPython.html.utils import url_path_join
from IPython.html.tests.launchnotebook import NotebookTestBase
from jupyter_notebook.utils import url_path_join
from jupyter_notebook.tests.launchnotebook import NotebookTestBase
class ConfigAPI(object):

@ -15,7 +15,7 @@ import tempfile
from tornado.web import HTTPError
from IPython.html.utils import (
from jupyter_notebook.utils import (
to_api_path,
to_os_path,
)

@ -20,7 +20,7 @@ from IPython.utils.importstring import import_item
from IPython.utils.traitlets import Any, Unicode, Bool, TraitError
from IPython.utils.py3compat import getcwd, string_types
from IPython.utils import tz
from IPython.html.utils import (
from jupyter_notebook.utils import (
is_hidden,
to_api_path,
)

@ -7,10 +7,10 @@ import json
from tornado import gen, web
from IPython.html.utils import url_path_join, url_escape
from jupyter_notebook.utils import url_path_join, url_escape
from jupyter_client.jsonutil import date_default
from IPython.html.base.handlers import (
from jupyter_notebook.base.handlers import (
IPythonHandler, json_errors, path_regex,
)

@ -16,8 +16,8 @@ import requests
from ..filecheckpoints import GenericFileCheckpoints
from IPython.config import Config
from IPython.html.utils import url_path_join, url_escape, to_os_path
from IPython.html.tests.launchnotebook import NotebookTestBase, assert_http_error
from jupyter_notebook.utils import url_path_join, url_escape, to_os_path
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
from IPython.nbformat import read, write, from_dict
from IPython.nbformat.v4 import (
new_notebook, new_markdown_cell,

@ -11,7 +11,7 @@ from tornado.ioloop import IOLoop
from jupyter_client.jsonutil import date_default
from IPython.utils.py3compat import cast_unicode
from IPython.html.utils import url_path_join, url_escape
from jupyter_notebook.utils import url_path_join, url_escape
from ...base.handlers import IPythonHandler, json_errors
from ...base.zmqhandlers import AuthenticatedZMQStreamHandler, deserialize_binary_message

@ -14,7 +14,7 @@ from tornado import web
from IPython.kernel.multikernelmanager import MultiKernelManager
from IPython.utils.traitlets import List, Unicode, TraitError
from IPython.html.utils import to_os_path
from jupyter_notebook.utils import to_os_path
from IPython.utils.py3compat import getcwd

@ -5,8 +5,8 @@ import requests
from jupyter_client.kernelspec import NATIVE_KERNEL_NAME
from IPython.html.utils import url_path_join
from IPython.html.tests.launchnotebook import NotebookTestBase, assert_http_error
from jupyter_notebook.utils import url_path_join
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
class KernelAPI(object):
"""Wrapper for kernel REST API requests"""

@ -12,8 +12,8 @@ pjoin = os.path.join
import requests
from IPython.kernel.kernelspec import NATIVE_KERNEL_NAME
from IPython.html.utils import url_path_join
from IPython.html.tests.launchnotebook import NotebookTestBase, assert_http_error
from jupyter_notebook.utils import url_path_join
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
# Copied from IPython.kernel.tests.test_kernelspec so updating that doesn't
# break these tests

@ -1,7 +1,7 @@
import requests
from IPython.html.utils import url_path_join
from IPython.html.tests.launchnotebook import NotebookTestBase
from jupyter_notebook.utils import url_path_join
from jupyter_notebook.tests.launchnotebook import NotebookTestBase
class NbconvertAPI(object):
"""Wrapper for nbconvert API calls."""

@ -9,7 +9,7 @@ from tornado import web
from ...base.handlers import IPythonHandler, json_errors
from jupyter_client.jsonutil import date_default
from IPython.html.utils import url_path_join, url_escape
from jupyter_notebook.utils import url_path_join, url_escape
from IPython.kernel.kernelspec import NoSuchKernel

@ -15,8 +15,8 @@ from IPython.utils.traitlets import Instance
class SessionManager(LoggingConfigurable):
kernel_manager = Instance('IPython.html.services.kernels.kernelmanager.MappingKernelManager')
contents_manager = Instance('IPython.html.services.contents.manager.ContentsManager')
kernel_manager = Instance('jupyter_notebook.services.kernels.kernelmanager.MappingKernelManager')
contents_manager = Instance('jupyter_notebook.services.contents.manager.ContentsManager')
# Session database initialized below
_cursor = None

@ -5,8 +5,8 @@ from unittest import TestCase
from tornado import web
from ..sessionmanager import SessionManager
from IPython.html.services.kernels.kernelmanager import MappingKernelManager
from IPython.html.services.contents.manager import ContentsManager
from jupyter_notebook.services.kernels.kernelmanager import MappingKernelManager
from jupyter_notebook.services.contents.manager import ContentsManager
class DummyKernel(object):
def __init__(self, kernel_name='python'):

@ -10,8 +10,8 @@ import time
pjoin = os.path.join
from IPython.html.utils import url_path_join
from IPython.html.tests.launchnotebook import NotebookTestBase, assert_http_error
from jupyter_notebook.utils import url_path_join
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
from IPython.nbformat.v4 import new_notebook
from IPython.nbformat import write

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save