Hello community,
here is the log from the commit of package python-jupyter_console for
openSUSE:Factory checked in at 2017-10-03 23:16:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter_console (Old)
and /work/SRC/openSUSE:Factory/.python-jupyter_console.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter_console"
Tue Oct 3 23:16:59 2017 rev:5 rq:527436 version:5.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-jupyter_console/python-jupyter_console-doc.changes
2017-05-17 17:12:33.802062300 +0200
+++
/work/SRC/openSUSE:Factory/.python-jupyter_console.new/python-jupyter_console-doc.changes
2017-10-03 23:17:00.748719969 +0200
@@ -1,0 +2,12 @@
+Tue Sep 19 19:51:19 UTC 2017 - [email protected]
+
+- Update to 5.2.0
+ * When using a kernel that the console did not start, exiting with Ctrl-D now
+ leaves it running.
+ * Added Ctrl-\\ shortcut to quit the console.
+ * Input prompt numbers are now updated when another frontend has executed
+ code in the same kernel.
+ * Fix setting next input with newer versions of prompt_toolkit.
+ * Ensure history entries are unicode, not bytes, on Python 2.
+
+-------------------------------------------------------------------
python-jupyter_console.changes: same change
Old:
----
jupyter_console-5.1.0.tar.gz
New:
----
jupyter_console-5.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jupyter_console-doc.spec ++++++
--- /var/tmp/diff_new_pack.L6M1jp/_old 2017-10-03 23:17:01.372632163 +0200
+++ /var/tmp/diff_new_pack.L6M1jp/_new 2017-10-03 23:17:01.376631600 +0200
@@ -29,7 +29,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jupyter_console-doc
-Version: 5.1.0
+Version: 5.2.0
Release: 0
Summary: Documentation for python-jupyter_console
License: BSD-3-Clause
@@ -48,6 +48,7 @@
# Documentation requirements
%if %{with pdf} || %{with html}
BuildRequires: python3-Sphinx
+BuildRequires: python3-sphinxcontrib-github-alt
%endif
%if %{with pdf}
BuildRequires: python3-Sphinx-latex
++++++ python-jupyter_console.spec ++++++
--- /var/tmp/diff_new_pack.L6M1jp/_old 2017-10-03 23:17:01.408627098 +0200
+++ /var/tmp/diff_new_pack.L6M1jp/_new 2017-10-03 23:17:01.412626534 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jupyter_console
-Version: 5.1.0
+Version: 5.2.0
Release: 0
Summary: Jupyter terminal console
License: BSD-3-Clause
@@ -29,13 +29,10 @@
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module jupyter_client}
-BuildRequires: %{python_module jupyter_ipykernel}
-BuildRequires: %{python_module jupyter_ipython}
Requires: python-jupyter_client
Requires: python-jupyter_ipykernel
Requires: python-jupyter_ipython
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Recommends: python-prompt_toolkit >= 1.0.0
BuildArch: noarch
%python_subpackages
++++++ jupyter_console-5.1.0.tar.gz -> jupyter_console-5.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.1.0/PKG-INFO
new/jupyter_console-5.2.0/PKG-INFO
--- old/jupyter_console-5.1.0/PKG-INFO 2017-02-03 16:43:54.000000000 +0100
+++ new/jupyter_console-5.2.0/PKG-INFO 2017-08-21 12:37:54.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: jupyter_console
-Version: 5.1.0
+Version: 5.2.0
Summary: Jupyter terminal console
Home-page: https://jupyter.org
Author: Jupyter Development Team
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.1.0/docs/changelog.rst
new/jupyter_console-5.2.0/docs/changelog.rst
--- old/jupyter_console-5.1.0/docs/changelog.rst 2017-02-03
16:36:12.000000000 +0100
+++ new/jupyter_console-5.2.0/docs/changelog.rst 2017-08-21
12:27:33.000000000 +0200
@@ -3,6 +3,17 @@
A summary of changes in Jupyter console releases.
+5.2
+---
+
+- When using a kernel that the console did not start, exiting with Ctrl-D now
+ leaves it running. :ghpull:`127`
+- Added Ctrl-\\ shortcut to quit the console. :ghpull:`130`
+- Input prompt numbers are now updated when another frontend has executed
+ code in the same kernel. :ghpull:`119`
+- Fix setting next input with newer versions of prompt_toolkit. :ghpull:`123`
+- Ensure history entries are unicode, not bytes, on Python 2. :ghpull:`122`
+
5.1
---
@@ -24,20 +35,21 @@
Interactive Shell architecture
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- disinherit shell class from IPython Interactive Shell `#68
<https://github.com/jupyter/jupyter_console/pull/68>`_
- This separates jupyter_console's ZMQTerminalInteractiveShell from IPython's
TerminalInteractiveShell and InteractiveShell classes.
-- update SIGINT handler to not use the old interactive API shell `#80
<https://github.com/jupyter/jupyter_console/pull/80>`_
+- Disinherit shell class from IPython Interactive Shell (:ghpull:`68`).
+ This separates jupyter_console's ``ZMQTerminalInteractiveShell`` from
+ IPython's ``TerminalInteractiveShell`` and ``InteractiveShell`` classes.
+- Update SIGINT handler to not use the old interactive API shell. :ghpull:`80`
Image Handling improvement
^^^^^^^^^^^^^^^^^^^^^^^^^^
-- use PIL as default image handler `#79
<https://github.com/jupyter/jupyter_console/pull/79>`_
-- better indication of whether image data was handled `#77
<https://github.com/jupyter/jupyter_console/pull/77>`_
+- use PIL as default image handler :ghpull:`79`
+- better indication of whether image data was handled :ghpull:`77`
Prompts improvement
^^^^^^^^^^^^^^^^^^^
-- use prompt_toolkit 1.0 `#74
<https://github.com/jupyter/jupyter_console/pull/74>`_
-- don't use prompt_manager `#75
<https://github.com/jupyter/jupyter_console/pull/75>`_
-- remove ``colors_force`` flag that have no effects: `#88
<https://github.com/jupyter/jupyter_console/pull/88>`_
+- use prompt_toolkit 1.0 :ghpull:`74`
+- don't use prompt_manager :ghpull:`75`
+- remove ``colors_force`` flag that have no effects: :ghpull:`88`
4.1
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.1.0/docs/conf.py
new/jupyter_console-5.2.0/docs/conf.py
--- old/jupyter_console-5.1.0/docs/conf.py 2016-10-22 18:24:16.000000000
+0200
+++ new/jupyter_console-5.2.0/docs/conf.py 2017-08-21 12:27:33.000000000
+0200
@@ -44,8 +44,11 @@
# ones.
extensions = [
'sphinx.ext.intersphinx',
+ 'sphinxcontrib_github_alt',
]
+github_project_url = "https://github.com/jupyter/jupyter_console"
+
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.1.0/docs/requirements.txt
new/jupyter_console-5.2.0/docs/requirements.txt
--- old/jupyter_console-5.1.0/docs/requirements.txt 2016-09-17
10:09:23.000000000 +0200
+++ new/jupyter_console-5.2.0/docs/requirements.txt 2017-08-21
12:27:33.000000000 +0200
@@ -3,3 +3,4 @@
jupyter_core
jupyter_client
sphinx
+sphinxcontrib_github_alt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.1.0/jupyter_console/_version.py
new/jupyter_console-5.2.0/jupyter_console/_version.py
--- old/jupyter_console-5.1.0/jupyter_console/_version.py 2017-02-03
16:40:10.000000000 +0100
+++ new/jupyter_console-5.2.0/jupyter_console/_version.py 2017-08-21
12:32:57.000000000 +0200
@@ -5,6 +5,6 @@
See PEP 440 https://www.python.org/dev/peps/pep-0440/
"""
-version_info = (5, 1, 0)
+version_info = (5, 2, 0)
__version__ = '.'.join(map(str, version_info[:3])) + ''.join(version_info[3:])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.1.0/jupyter_console/ptshell.py
new/jupyter_console-5.2.0/jupyter_console/ptshell.py
--- old/jupyter_console-5.1.0/jupyter_console/ptshell.py 2017-02-03
16:38:05.000000000 +0100
+++ new/jupyter_console-5.2.0/jupyter_console/ptshell.py 2017-08-17
14:55:43.000000000 +0200
@@ -30,6 +30,7 @@
from . import __version__
from prompt_toolkit.completion import Completer, Completion
+from prompt_toolkit.document import Document
from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode
from prompt_toolkit.filters import HasFocus, HasSelection, ViInsertMode,
EmacsInsertMode
from prompt_toolkit.history import InMemoryHistory
@@ -122,6 +123,7 @@
_execution_state = Unicode('')
_pending_clearoutput = False
_eventloop = None
+ own_kernel = False # Changed by ZMQTerminalIPythonApp
editing_mode = Unicode('emacs', config=True,
help="Shortcut style to use at the prompt. 'vi' or 'emacs'.",
@@ -358,6 +360,10 @@
b.newline()
return
+ # Pressing enter flushes any pending display. This also ensures
+ # the displayed execution_count is correct.
+ self.handle_iopub()
+
more, indent = self.check_complete(d.text)
if (not more) and b.accept_action.is_returnable:
@@ -369,13 +375,17 @@
def _(event):
event.current_buffer.reset()
+ @kbmanager.registry.add_binding(Keys.ControlBackslash,
filter=HasFocus(DEFAULT_BUFFER))
+ def _(event):
+ raise EOFError
+
# Pre-populate history from IPython's history database
history = InMemoryHistory()
last_cell = u""
for _, _, cell in
self.history_manager.get_tail(self.history_load_length,
include_latest=True):
# Ignore blank lines and consecutive duplicates
- cell = cell.rstrip()
+ cell = cast_unicode_py2(cell.rstrip())
if cell and (cell != last_cell):
history.append(cell)
@@ -460,11 +470,19 @@
def pre_prompt(self):
if self.next_input:
- b = self.pt_cli.application.buffer
- b.text = cast_unicode_py2(self.next_input)
+ # We can't set the buffer here, because it will be reset just after
+ # this. Adding a callable to pre_run_callables does what we need
+ # after the buffer is reset.
+ s = cast_unicode_py2(self.next_input)
+ def set_doc():
+ self.pt_cli.application.buffer.document = Document(s)
+ if hasattr(self.pt_cli, 'pre_run_callables'):
+ self.pt_cli.pre_run_callables.append(set_doc)
+ else:
+ # Older version of prompt_toolkit; it's OK to set the document
+ # directly here.
+ set_doc()
self.next_input = None
- # Move the cursor to the end
- b.cursor_position += b.document.get_end_of_document_position()
def interact(self, display_banner=None):
while self.keep_running:
@@ -482,7 +500,7 @@
self.run_cell(code, store_history=True)
def mainloop(self):
- self.keepkernel = False
+ self.keepkernel = not self.own_kernel
# An extra layer of protection in case someone mashing Ctrl-C breaks
# out of our internal code.
while True:
@@ -663,6 +681,10 @@
msg_type = sub_msg['header']['msg_type']
parent = sub_msg["parent_header"]
+ # Update execution_count in case it changed in another session
+ if msg_type == "execute_input":
+ self.execution_count =
int(sub_msg["content"]["execution_count"]) + 1
+
if self.include_output(sub_msg):
if msg_type == 'status':
self._execution_state =
sub_msg["content"]["execution_state"]