Hello community,
here is the log from the commit of package python-prompt_toolkit for
openSUSE:Factory checked in at 2017-09-20 17:13:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-prompt_toolkit (Old)
and /work/SRC/openSUSE:Factory/.python-prompt_toolkit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-prompt_toolkit"
Wed Sep 20 17:13:29 2017 rev:3 rq:527414 version:1.0.15
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-prompt_toolkit/python-prompt_toolkit.changes
2017-05-17 17:14:45.003566287 +0200
+++
/work/SRC/openSUSE:Factory/.python-prompt_toolkit.new/python-prompt_toolkit.changes
2017-09-20 17:13:31.538505368 +0200
@@ -1,0 +2,14 @@
+Tue Sep 19 19:54:26 UTC 2017 - [email protected]
+
+- Update to version 1.0.15
+ + Fixes:
+ * Don't shuffle tasks in the event loop. This fixes an issue where lines
+ printed from background threads were printed in a different order if
+ `patch_stdout=True`.
+ * Only consider the text before the cursor when activating history search.
+ * Pressing escape should accept the search, this is closer to how readline
works.
+ * Enable autowrap again when required.
+ + New features:
+ * Add run_in_terminal option to disable cooked mode.
+
+-------------------------------------------------------------------
Old:
----
prompt_toolkit-1.0.14.tar.gz
New:
----
prompt_toolkit-1.0.15.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-prompt_toolkit.spec ++++++
--- /var/tmp/diff_new_pack.3ZDkpi/_old 2017-09-20 17:13:32.146419793 +0200
+++ /var/tmp/diff_new_pack.3ZDkpi/_new 2017-09-20 17:13:32.150419231 +0200
@@ -17,9 +17,10 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%bcond_without test
%define oldpython python
Name: python-prompt_toolkit
-Version: 1.0.14
+Version: 1.0.15
Release: 0
Summary: Library for building powerful interactive command lines in
Python
License: BSD-3-Clause
@@ -30,13 +31,13 @@
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module Pygments}
-BuildRequires: %{python_module six >= 1.9.0}
+%if %{with test}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wcwidth}
-Requires: python-Pygments
+%endif
Requires: python-six >= 1.9.0
Requires: python-wcwidth
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Recommends: python-Pygments
BuildArch: noarch
%ifpython2
Obsoletes: %{oldpython}-python-prompt-toolkit < %{version}
@@ -58,9 +59,16 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%if %{with test}
+%check
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
+py.test-%{$python_bin_suffix}
+}
+%endif
+
%files %{python_files}
%defattr(-,root,root,-)
-%doc README.rst CHANGELOG
+%doc AUTHORS.rst LICENSE README.rst CHANGELOG
%{python_sitelib}/*
%changelog
++++++ prompt_toolkit-1.0.14.tar.gz -> prompt_toolkit-1.0.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prompt_toolkit-1.0.14/CHANGELOG
new/prompt_toolkit-1.0.15/CHANGELOG
--- old/prompt_toolkit-1.0.14/CHANGELOG 2017-03-26 20:34:55.000000000 +0200
+++ new/prompt_toolkit-1.0.15/CHANGELOG 2017-07-27 12:03:08.000000000 +0200
@@ -1,6 +1,21 @@
CHANGELOG
=========
+1.0.15: 2017-07-27
+------------------
+
+Fixes:
+- Don't shuffle tasks in the event loop. This fixes an issue where lines
+ printed from background threads were printed in a different order if
+ `patch_stdout=True`.
+- Only consider the text before the cursor when activating history search.
+- Pressing escape should accept the search, this is closer to how readline
works.
+- Enable autowrap again when required.
+
+New features:
+- Add run_in_terminal option to disable cooked mode.
+
+
1.0.14: 2017-03-26
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prompt_toolkit-1.0.14/PKG-INFO
new/prompt_toolkit-1.0.15/PKG-INFO
--- old/prompt_toolkit-1.0.14/PKG-INFO 2017-03-26 20:36:28.000000000 +0200
+++ new/prompt_toolkit-1.0.15/PKG-INFO 2017-07-27 12:08:26.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: prompt_toolkit
-Version: 1.0.14
+Version: 1.0.15
Summary: Library for building powerful interactive command lines in Python
Home-page: https://github.com/jonathanslenders/python-prompt-toolkit
Author: Jonathan Slenders
@@ -137,6 +137,7 @@
- `http-prompt <https://github.com/eliangcs/http-prompt>`_: An
interactive command-line HTTP client.
- `coconut <http://coconut-lang.org/>`_: Functional programming in
Python.
- `Ergonomica <https://ergonomica.github.io/>`_: A Bash alternative
written in Python.
+ - `Kube-shell <https://github.com/cloudnativelabs/kube-shell>`_:
Kubernetes shell: An integrated shell for working with the Kubernetes CLI
Full screen applications:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prompt_toolkit-1.0.14/README.rst
new/prompt_toolkit-1.0.15/README.rst
--- old/prompt_toolkit-1.0.14/README.rst 2017-03-08 20:52:07.000000000
+0100
+++ new/prompt_toolkit-1.0.15/README.rst 2017-07-26 17:11:12.000000000
+0200
@@ -129,6 +129,7 @@
- `http-prompt <https://github.com/eliangcs/http-prompt>`_: An interactive
command-line HTTP client.
- `coconut <http://coconut-lang.org/>`_: Functional programming in Python.
- `Ergonomica <https://ergonomica.github.io/>`_: A Bash alternative written in
Python.
+- `Kube-shell <https://github.com/cloudnativelabs/kube-shell>`_: Kubernetes
shell: An integrated shell for working with the Kubernetes CLI
Full screen applications:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prompt_toolkit-1.0.14/prompt_toolkit/__init__.py
new/prompt_toolkit-1.0.15/prompt_toolkit/__init__.py
--- old/prompt_toolkit-1.0.14/prompt_toolkit/__init__.py 2017-03-26
20:35:14.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit/__init__.py 2017-07-27
12:03:23.000000000 +0200
@@ -19,4 +19,4 @@
# Don't forget to update in `docs/conf.py`!
-__version__ = '1.0.14'
+__version__ = '1.0.15'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prompt_toolkit-1.0.14/prompt_toolkit/buffer.py
new/prompt_toolkit-1.0.15/prompt_toolkit/buffer.py
--- old/prompt_toolkit-1.0.14/prompt_toolkit/buffer.py 2017-03-26
19:48:14.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit/buffer.py 2017-07-26
17:11:12.000000000 +0200
@@ -849,7 +849,7 @@
""" Set `history_search_text`. """
if self.enable_history_search():
if self.history_search_text is None:
- self.history_search_text = self.text
+ self.history_search_text = self.document.text_before_cursor
else:
self.history_search_text = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prompt_toolkit-1.0.14/prompt_toolkit/eventloop/posix.py
new/prompt_toolkit-1.0.15/prompt_toolkit/eventloop/posix.py
--- old/prompt_toolkit-1.0.14/prompt_toolkit/eventloop/posix.py 2017-03-26
19:48:14.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit/eventloop/posix.py 2017-07-26
17:11:12.000000000 +0200
@@ -1,7 +1,6 @@
from __future__ import unicode_literals
import fcntl
import os
-import random
import signal
import threading
import time
@@ -153,10 +152,6 @@
if handler:
tasks.append(handler)
- # Handle everything in random order. (To avoid starvation.)
- random.shuffle(tasks)
- random.shuffle(low_priority_tasks)
-
# When there are high priority tasks, run all these.
# Schedule low priority tasks for the next iteration.
if tasks:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prompt_toolkit-1.0.14/prompt_toolkit/interface.py
new/prompt_toolkit-1.0.15/prompt_toolkit/interface.py
--- old/prompt_toolkit-1.0.14/prompt_toolkit/interface.py 2017-03-26
19:48:14.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit/interface.py 2017-07-26
17:11:12.000000000 +0200
@@ -611,7 +611,7 @@
if self.eventloop:
self.eventloop.stop()
- def run_in_terminal(self, func, render_cli_done=False):
+ def run_in_terminal(self, func, render_cli_done=False, cooked_mode=True):
"""
Run function on the terminal above the prompt.
@@ -624,6 +624,8 @@
:param render_cli_done: When True, render the interface in the
'Done' state first, then execute the function. If False,
erase the interface first.
+ :param cooked_mode: When True (the default), switch the input to
+ cooked mode while executing the function.
:returns: the result of `func`.
"""
@@ -637,7 +639,10 @@
self._return_value = None
# Run system command.
- with self.input.cooked_mode():
+ if cooked_mode:
+ with self.input.cooked_mode():
+ result = func()
+ else:
result = func()
# Redraw interface again.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prompt_toolkit-1.0.14/prompt_toolkit/key_binding/bindings/emacs.py
new/prompt_toolkit-1.0.15/prompt_toolkit/key_binding/bindings/emacs.py
--- old/prompt_toolkit-1.0.14/prompt_toolkit/key_binding/bindings/emacs.py
2017-03-26 19:48:14.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit/key_binding/bindings/emacs.py
2017-07-26 17:11:12.000000000 +0200
@@ -375,6 +375,7 @@
event.cli.pop_focus()
@handle(Keys.ControlJ, filter=has_focus)
+ @handle(Keys.Escape, filter=has_focus, eager=True)
def _(event):
"""
When enter pressed in isearch, quit isearch mode. (Multiline
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prompt_toolkit-1.0.14/prompt_toolkit/key_binding/bindings/vi.py
new/prompt_toolkit-1.0.15/prompt_toolkit/key_binding/bindings/vi.py
--- old/prompt_toolkit-1.0.14/prompt_toolkit/key_binding/bindings/vi.py
2017-03-26 19:48:14.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit/key_binding/bindings/vi.py
2017-07-26 17:11:12.000000000 +0200
@@ -1808,6 +1808,7 @@
event.cli.vi_state.input_mode = InputMode.INSERT
@handle(Keys.ControlJ, filter=has_focus)
+ @handle(Keys.Escape, filter=has_focus)
def _(event):
"""
Apply the search. (At the / or ? prompt.)
@@ -1857,7 +1858,6 @@
""" Returns True when the search buffer is empty. """
return cli.buffers[search_buffer_name].text == ''
- @handle(Keys.Escape, filter=has_focus)
@handle(Keys.ControlC, filter=has_focus)
@handle(Keys.ControlH, filter=has_focus &
Condition(search_buffer_is_empty))
@handle(Keys.Backspace, filter=has_focus &
Condition(search_buffer_is_empty))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prompt_toolkit-1.0.14/prompt_toolkit/renderer.py
new/prompt_toolkit-1.0.15/prompt_toolkit/renderer.py
--- old/prompt_toolkit-1.0.14/prompt_toolkit/renderer.py 2017-03-26
19:48:14.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit/renderer.py 2017-07-26
17:11:12.000000000 +0200
@@ -21,7 +21,8 @@
def _output_screen_diff(output, screen, current_pos, previous_screen=None,
last_token=None,
- is_done=False, attrs_for_token=None, size=None,
previous_width=0): # XXX: drop is_done
+ is_done=False, use_alternate_screen=False,
attrs_for_token=None, size=None,
+ previous_width=0): # XXX: drop is_done
"""
Render the diff between this screen and the previous screen.
@@ -108,11 +109,17 @@
write(char.char)
last_token[0] = char.token
- # Disable autowrap
+ # Render for the first time: reset styling.
if not previous_screen:
- output.disable_autowrap()
reset_attributes()
+ # Disable autowrap. (When entering a the alternate screen, or anytime when
+ # we have a prompt. - In the case of a REPL, like IPython, people can have
+ # background threads, and it's hard for debugging if their output is not
+ # wrapped.)
+ if not previous_screen or not use_alternate_screen:
+ output.disable_autowrap()
+
# When the previous screen has a different size, redraw everything anyway.
# Also when we are done. (We meight take up less rows, so clearing is
important.)
if is_done or not previous_screen or previous_width != width: # XXX: also
consider height??
@@ -187,7 +194,7 @@
else:
current_pos = move_cursor(screen.cursor_position)
- if is_done:
+ if is_done or not use_alternate_screen:
output.enable_autowrap()
# Always reset the color attributes. This is important because a background
@@ -437,6 +444,7 @@
self._cursor_pos, self._last_token = _output_screen_diff(
output, screen, self._cursor_pos,
self._last_screen, self._last_token, is_done,
+ use_alternate_screen=self.use_alternate_screen,
attrs_for_token=self._attrs_for_token,
size=size,
previous_width=(self._last_size.columns if self._last_size else 0))
@@ -472,6 +480,7 @@
output.cursor_up(self._cursor_pos.y)
output.erase_down()
output.reset_attributes()
+ output.enable_autowrap()
output.flush()
# Erase title.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prompt_toolkit-1.0.14/prompt_toolkit.egg-info/PKG-INFO
new/prompt_toolkit-1.0.15/prompt_toolkit.egg-info/PKG-INFO
--- old/prompt_toolkit-1.0.14/prompt_toolkit.egg-info/PKG-INFO 2017-03-26
20:36:28.000000000 +0200
+++ new/prompt_toolkit-1.0.15/prompt_toolkit.egg-info/PKG-INFO 2017-07-27
12:08:26.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: prompt-toolkit
-Version: 1.0.14
+Version: 1.0.15
Summary: Library for building powerful interactive command lines in Python
Home-page: https://github.com/jonathanslenders/python-prompt-toolkit
Author: Jonathan Slenders
@@ -137,6 +137,7 @@
- `http-prompt <https://github.com/eliangcs/http-prompt>`_: An
interactive command-line HTTP client.
- `coconut <http://coconut-lang.org/>`_: Functional programming in
Python.
- `Ergonomica <https://ergonomica.github.io/>`_: A Bash alternative
written in Python.
+ - `Kube-shell <https://github.com/cloudnativelabs/kube-shell>`_:
Kubernetes shell: An integrated shell for working with the Kubernetes CLI
Full screen applications: