Hello community,

here is the log from the commit of package python-ptpython for 
openSUSE:Leap:15.2 checked in at 2020-03-19 11:03:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-ptpython (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-ptpython.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ptpython"

Thu Mar 19 11:03:28 2020 rev:3 rq:776938 version:2.0.4

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-ptpython/python-ptpython.changes        
2020-01-15 15:51:42.727538365 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-ptpython.new.3160/python-ptpython.changes  
    2020-03-19 11:03:29.315883470 +0100
@@ -1,0 +2,17 @@
+Mon Jun  3 17:04:50 UTC 2019 - Todd R <[email protected]>
+
+- Fix jupyter dependencies.
+- Update to 2.0.4
+  * Fixed ptipython.
+  * Fixed config: setting of color depth.
+  * Fixed auto-suggest key bindings.
+  * Fixed Control-D key binding for exiting REPL when (confirm_exit=False).
+  * Correctly focus/unfocus sidebar.
+  * Fixed open_in_editor and suspend key bindings.
+
+-------------------------------------------------------------------
+Mon Feb  4 19:03:04 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Trim conjecture from descriptions.
+
+-------------------------------------------------------------------
@@ -41 +57,0 @@
-

Old:
----
  ptpython-2.0.3.tar.gz

New:
----
  ptpython-2.0.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ptpython.spec ++++++
--- /var/tmp/diff_new_pack.wIqtzX/_old  2020-03-19 11:03:29.627883649 +0100
+++ /var/tmp/diff_new_pack.wIqtzX/_new  2020-03-19 11:03:29.631883651 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ptpython
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-ptpython
-Version:        2.0.3
+Version:        2.0.4
 Release:        0
 Summary:        Python REPL build on top of prompt_toolkit
 License:        ISC
@@ -46,20 +46,16 @@
 %python_subpackages
 
 %description
-Ptpython is an advanced Python REPL. It should work on all
-Python versions from 2.6 up to 3.5 and work cross platform (Linux,
-BSD, OS X and Windows).
+Ptpython is an advanced Python REPL.
 
 %package     -n python3-ptpython-ptipython
 Summary:        Python REPL build on top of prompt_toolkit - IPython support
 Group:          Development/Languages/Python
-Requires:       python3-jupyter_ipython
+Requires:       python3-ipython
 Requires:       python3-ptpython
 
 %description -n python3-ptpython-ptipython
-Ptpython is an advanced Python REPL. It should work on all
-Python versions from 2.6 up to 3.5 and work cross platform (Linux,
-BSD, OS X and Windows).
+Ptpython is an advanced Python REPL.
 
 This package provides IPython support to Ptpython.
 

++++++ ptpython-2.0.3.tar.gz -> ptpython-2.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/CHANGELOG new/ptpython-2.0.4/CHANGELOG
--- old/ptpython-2.0.3/CHANGELOG        2018-10-12 18:59:28.000000000 +0200
+++ new/ptpython-2.0.4/CHANGELOG        2018-10-30 22:34:16.000000000 +0100
@@ -1,6 +1,17 @@
 CHANGELOG
 =========
 
+2.0.4: 2018-10-30
+-----------------
+
+- Fixed ptipython.
+- Fixed config: setting of color depth.
+- Fixed auto-suggest key bindings.
+- Fixed Control-D key binding for exiting REPL when (confirm_exit=False).
+- Correctly focus/unfocus sidebar.
+- Fixed open_in_editor and suspend key bindings.
+
+
 2.0.3: 2018-10-12
 -----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/PKG-INFO new/ptpython-2.0.4/PKG-INFO
--- old/ptpython-2.0.3/PKG-INFO 2018-10-12 19:00:30.000000000 +0200
+++ new/ptpython-2.0.4/PKG-INFO 2018-10-30 22:34:48.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: ptpython
-Version: 2.0.3
+Version: 2.0.4
 Summary: Python REPL build on top of prompt_toolkit
 Home-page: https://github.com/jonathanslenders/ptpython
 Author: Jonathan Slenders
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/examples/ptpython_config/config.py 
new/ptpython-2.0.4/examples/ptpython_config/config.py
--- old/ptpython-2.0.3/examples/ptpython_config/config.py       2018-10-12 
18:33:35.000000000 +0200
+++ new/ptpython-2.0.4/examples/ptpython_config/config.py       2018-10-14 
19:47:35.000000000 +0200
@@ -103,9 +103,12 @@
     # Use this colorscheme for the code.
     repl.use_code_colorscheme('pastie')
 
-    # Enable 24bit True color. (Not all terminals support this. -- maybe check
-    # $TERM before changing.)
-    repl.true_color = False
+    # Set color depth (keep in mind that not all terminals support true color).
+
+    #repl.color_depth = 'DEPTH_1_BIT'  # Monochrome.
+    #repl.color_depth = 'DEPTH_4_BIT'  # ANSI colors only.
+    repl.color_depth = 'DEPTH_8_BIT'  # The default, 256 colors.
+    #repl.color_depth = 'DEPTH_24_BIT'  # True color.
 
     # Syntax.
     repl.enable_syntax_highlighting = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/ptpython/ipython.py 
new/ptpython-2.0.4/ptpython/ipython.py
--- old/ptpython-2.0.3/ptpython/ipython.py      2018-06-02 21:17:45.000000000 
+0200
+++ new/ptpython-2.0.4/ptpython/ipython.py      2018-10-30 22:31:27.000000000 
+0100
@@ -11,13 +11,15 @@
 from __future__ import unicode_literals, print_function
 
 from prompt_toolkit.completion import Completion, Completer
-from prompt_toolkit.contrib.completers import PathCompleter, WordCompleter, 
SystemCompleter
+from prompt_toolkit.completion import PathCompleter, WordCompleter
+from prompt_toolkit.contrib.completers import SystemCompleter
 from prompt_toolkit.contrib.regular_languages.compiler import compile
 from prompt_toolkit.contrib.regular_languages.completion import 
GrammarCompleter
 from prompt_toolkit.contrib.regular_languages.lexer import GrammarLexer
 from prompt_toolkit.document import Document
-from prompt_toolkit.interface import CommandLineInterface
-from prompt_toolkit.layout.lexers import PygmentsLexer, SimpleLexer
+from prompt_toolkit.formatted_text import PygmentsTokens
+from prompt_toolkit.lexers import PygmentsLexer, SimpleLexer
+from prompt_toolkit.styles import Style
 
 from .python_input import PythonInput, PythonValidator, PythonCompleter
 from .style import default_ui_style
@@ -37,39 +39,16 @@
 
 class IPythonPrompt(PromptStyle):
     """
-    PromptStyle that uses the templates, as set by IPython.
-    Usually, something like "In [1]:".
-    """
-    def __init__(self, prompt_manager):
-        self.prompt_manager = prompt_manager
-
-    def in_prompt(self):
-        text = self.prompt_manager.render('in', color=False, just=False)
-        return [('class:in', text)]
-
-    def in2_prompt(self, width):
-        text = self.prompt_manager.render('in2', color=False, just=False)
-        return [('class:in', text.rjust(width))]
-
-    def out_tokens(self):
-        # This function is currently not used by IPython. But for completeness,
-        # it would look like this.
-        text = self.prompt_manager.render('out', color=False, just=False)
-        return [('class:out', text)]
-
-
-class IPython5Prompt(PromptStyle):
-    """
     Style for IPython >5.0, use the prompt_toolkit tokens directly.
     """
     def __init__(self, prompts):
         self.prompts = prompts
 
     def in_prompt(self):
-        return self.prompts.in_prompt_tokens()
+        return PygmentsTokens(self.prompts.in_prompt_tokens())
 
     def in2_prompt(self, width):
-        return self.prompts.continuation_prompt_tokens()
+        return PygmentsTokens(self.prompts.continuation_prompt_tokens())
 
     def out_prompt(self):
         return []
@@ -183,29 +162,21 @@
         super(IPythonInput, self).__init__(*a, **kw)
         self.ipython_shell = ipython_shell
 
-        # Prompt for IPython < 5.0
-        if hasattr(ipython_shell, 'prompt_manager'):
-            self.all_prompt_styles['ipython'] = 
IPythonPrompt(ipython_shell.prompt_manager)
-            self.prompt_style = 'ipython'
-
-        # Prompt for IPython >=5.0:
-        if hasattr(ipython_shell, 'prompts'):
-            self.all_prompt_styles['ipython'] = 
IPython5Prompt(ipython_shell.prompts)
-            self.prompt_style = 'ipython'
-
+        self.all_prompt_styles['ipython'] = 
IPythonPrompt(ipython_shell.prompts)
+        self.prompt_style = 'ipython'
 
         # UI style for IPython. Add tokens that are used by IPython>5.0
         style_dict = {}
         style_dict.update(default_ui_style)
         style_dict.update({
-            'prompt':        '#009900',
-            'prompt-num':     '#00ff00 bold',
-            'out-prompt':     '#990000',
-            'out-prompt-num':  '#ff0000 bold',
+            'pygments.prompt':        '#009900',
+            'pygments.prompt-num':     '#00ff00 bold',
+            'pygments.out-prompt':     '#990000',
+            'pygments.out-prompt-num':  '#ff0000 bold',
         })
 
         self.ui_styles = {
-            'default': style_dict,
+            'default': Style.from_dict(style_dict),
         }
         self.use_ui_colorscheme('default')
 
@@ -223,43 +194,33 @@
         configure = kw.pop('configure', None)
         title = kw.pop('title', None)
 
+        # Don't ask IPython to confirm for exit. We have our own exit prompt.
+        self.confirm_exit = False
+
         super(InteractiveShellEmbed, self).__init__(*a, **kw)
 
         def get_globals():
             return self.user_ns
 
-        ipython_input = IPythonInput(
+        python_input = IPythonInput(
             self,
             get_globals=get_globals, vi_mode=vi_mode,
             history_filename=history_filename)
 
         if title:
-            ipython_input.terminal_title = title
+            python_input.terminal_title = title
 
         if configure:
-            configure(ipython_input)
-            ipython_input.prompt_style = 'ipython'  # Don't take from config.
+            configure(python_input)
+            python_input.prompt_style = 'ipython'  # Don't take from config.
 
-        self._cli = CommandLineInterface(
-            application=ipython_input.create_application())
+        self.python_input = python_input
 
     def prompt_for_code(self):
-        # IPython 5.0 calls `prompt_for_code` instead of `raw_input`.
-        return self.raw_input(self)
-
-    def raw_input(self, prompt=''):
-        print('')
         try:
-            string = self._cli.run(reset_current_buffer=True).text
-
-            # In case of multiline input, make sure to append a newline to the 
input,
-            # otherwise, IPython will ask again for more input in some cases.
-            if '\n' in string:
-                return string + '\n\n'
-            else:
-                return string
-        except EOFError:
-            self.ask_exit()
+            return self.python_input.app.run()
+        except KeyboardInterrupt:
+            self.python_input.default_buffer.document = Document()
             return ''
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/ptpython/key_bindings.py 
new/ptpython-2.0.4/ptpython/key_bindings.py
--- old/ptpython-2.0.3/ptpython/key_bindings.py 2018-09-30 20:35:18.000000000 
+0200
+++ new/ptpython-2.0.4/ptpython/key_bindings.py 2018-10-30 22:25:27.000000000 
+0100
@@ -47,12 +47,24 @@
         """
         event.app.renderer.clear()
 
+    @handle('c-z')
+    def _(event):
+        """
+        Suspend.
+        """
+        if python_input.enable_system_bindings:
+            event.app.suspend_to_background()
+
     @handle('f2')
     def _(event):
         """
         Show/hide sidebar.
         """
         python_input.show_sidebar = not python_input.show_sidebar
+        if python_input.show_sidebar:
+            event.app.layout.focus(python_input.ptpython_layout.sidebar)
+        else:
+            event.app.layout.focus_last()
 
     @handle('f3')
     def _(event):
@@ -144,15 +156,16 @@
     @handle('c-d', filter=~sidebar_visible &
             has_focus(python_input.default_buffer) &
             Condition(lambda:
-                # Only when the `confirm_exit` flag is set.
-                python_input.confirm_exit and
-                # And the current buffer is empty.
+                # The current buffer is empty.
                 not get_app().current_buffer.text))
     def _(event):
         """
         Override Control-D exit, to ask for confirmation.
         """
-        python_input.show_exit_confirmation = True
+        if python_input.confirm_exit:
+            python_input.show_exit_confirmation = True
+        else:
+            event.app.exit(exception=EOFError)
 
     @handle('c-c', filter=has_focus(python_input.default_buffer))
     def _(event):
@@ -210,6 +223,7 @@
     def _(event):
         " Hide sidebar. "
         python_input.show_sidebar = False
+        event.app.layout.focus_last()
 
     return bindings
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/ptpython/layout.py 
new/ptpython-2.0.4/ptpython/layout.py
--- old/ptpython-2.0.3/ptpython/layout.py       2018-06-02 21:17:45.000000000 
+0200
+++ new/ptpython-2.0.4/ptpython/layout.py       2018-10-30 22:25:27.000000000 
+0100
@@ -6,7 +6,7 @@
 from prompt_toolkit.application import get_app
 from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
 from prompt_toolkit.filters import is_done, has_completions, 
renderer_height_is_known, has_focus, Condition
-from prompt_toolkit.formatted_text.utils import fragment_list_width
+from prompt_toolkit.formatted_text import fragment_list_width, 
to_formatted_text
 from prompt_toolkit.key_binding.vi_state import InputMode
 from prompt_toolkit.layout.containers import Window, HSplit, VSplit, 
FloatContainer, Float, ConditionalContainer, ScrollOffsets
 from prompt_toolkit.layout.controls import BufferControl, FormattedTextControl
@@ -28,7 +28,7 @@
 import sys
 
 __all__ = (
-    'create_layout',
+    'PtPythonLayout',
     'CompletionVisualisation',
 )
 
@@ -275,7 +275,7 @@
             return python_input.all_prompt_styles[python_input.prompt_style]
 
         def get_prompt():
-            return get_prompt_style().in_prompt()
+            return to_formatted_text(get_prompt_style().in_prompt())
 
         def get_continuation(width, line_number, is_soft_wrap):
             if python_input.show_line_numbers and not is_soft_wrap:
@@ -480,139 +480,143 @@
         filter=visible)
 
 
-def create_layout(python_input,
-                  lexer=PythonLexer,
-                  extra_body=None, extra_toolbars=None,
-                  extra_buffer_processors=None, input_buffer_height=None):
-    D = Dimension
-    extra_body = [extra_body] if extra_body else []
-    extra_toolbars = extra_toolbars or []
-    extra_buffer_processors = extra_buffer_processors or []
-    input_buffer_height = input_buffer_height or D(min=6)
-
-    search_toolbar = SearchToolbar(python_input.search_buffer)
-
-    def create_python_input_window():
-        def menu_position():
-            """
-            When there is no autocompletion menu to be shown, and we have a 
signature,
-            set the pop-up position at `bracket_start`.
-            """
-            b = python_input.default_buffer
-
-            if b.complete_state is None and python_input.signatures:
-                row, col = python_input.signatures[0].bracket_start
-                index = b.document.translate_row_col_to_index(row - 1, col)
-                return index
-
-        return Window(
-            BufferControl(
-                buffer=python_input.default_buffer,
-                search_buffer_control=search_toolbar.control,
-                lexer=lexer,
-                include_default_input_processors=False,
-                input_processors=[
-                    ConditionalProcessor(
-                        processor=HighlightIncrementalSearchProcessor(),
-                        filter=has_focus(SEARCH_BUFFER) | 
has_focus(search_toolbar.control),
-                    ),
-                    HighlightSelectionProcessor(),
-                    DisplayMultipleCursors(),
-                    # Show matching parentheses, but only while editing.
-                    ConditionalProcessor(
-                        
processor=HighlightMatchingBracketProcessor(chars='[](){}'),
-                        filter=has_focus(DEFAULT_BUFFER) & ~is_done &
-                            Condition(lambda: 
python_input.highlight_matching_parenthesis)),
-                    ConditionalProcessor(
-                        processor=AppendAutoSuggestion(),
-                        filter=~is_done)
-                ] + extra_buffer_processors,
-                menu_position=menu_position,
-
-                # Make sure that we always see the result of an 
reverse-i-search:
-                preview_search=True,
-            ),
-            left_margins=[PythonPromptMargin(python_input)],
-            # Scroll offsets. The 1 at the bottom is important to make sure the
-            # cursor is never below the "Press [Meta+Enter]" message which is 
a float.
-            scroll_offsets=ScrollOffsets(bottom=1, left=4, right=4),
-            # As long as we're editing, prefer a minimal height of 6.
-            height=(lambda: (
-                None if get_app().is_done or 
python_input.show_exit_confirmation
-                        else input_buffer_height)),
-            wrap_lines=Condition(lambda: python_input.wrap_lines),
-        )
-
-    root_container = HSplit([
-        VSplit([
-            HSplit([
-                FloatContainer(
-                    content=HSplit(
-                        [create_python_input_window()] + extra_body
-                    ),
-                    floats=[
-                        Float(xcursor=True,
-                              ycursor=True,
-                              content=ConditionalContainer(
-                                  content=CompletionsMenu(
-                                      scroll_offset=(
-                                          lambda: 
python_input.completion_menu_scroll_offset),
-                                      max_height=12),
-                                  filter=show_completions_menu(python_input))),
-                        Float(xcursor=True,
-                              ycursor=True,
-                              content=ConditionalContainer(
-                                  content=MultiColumnCompletionsMenu(),
-                                  
filter=show_multi_column_completions_menu(python_input))),
-                        Float(xcursor=True,
-                              ycursor=True,
-                              content=signature_toolbar(python_input)),
-                        Float(left=2,
-                              bottom=1,
-                              content=exit_confirmation(python_input)),
-                        Float(bottom=0, right=0, height=1,
-                              content=meta_enter_message(python_input),
-                              hide_when_covering_content=True),
-                        Float(bottom=1, left=1, right=0, 
content=python_sidebar_help(python_input)),
-                    ]),
-                ArgToolbar(),
-                search_toolbar,
-                SystemToolbar(),
-                ValidationToolbar(),
-                ConditionalContainer(
-                    content=CompletionsToolbar(),
-                    filter=show_completions_toolbar(python_input)),
-
-                # Docstring region.
-                ConditionalContainer(
-                    content=Window(
-                        height=D.exact(1),
-                        char='\u2500',
-                        style='class:separator'),
-                    filter=HasSignature(python_input) & 
ShowDocstring(python_input) & ~is_done),
-                ConditionalContainer(
-                    content=Window(
-                        BufferControl(
-                            buffer=python_input.docstring_buffer,
-                            lexer=SimpleLexer(style='class:docstring'),
-                            #lexer=PythonLexer,
+class PtPythonLayout(object):
+    def __init__(self, python_input, lexer=PythonLexer, extra_body=None,
+                 extra_toolbars=None, extra_buffer_processors=None,
+                 input_buffer_height=None):
+        D = Dimension
+        extra_body = [extra_body] if extra_body else []
+        extra_toolbars = extra_toolbars or []
+        extra_buffer_processors = extra_buffer_processors or []
+        input_buffer_height = input_buffer_height or D(min=6)
+
+        search_toolbar = SearchToolbar(python_input.search_buffer)
+
+        def create_python_input_window():
+            def menu_position():
+                """
+                When there is no autocompletion menu to be shown, and we have a
+                signature, set the pop-up position at `bracket_start`.
+                """
+                b = python_input.default_buffer
+
+                if b.complete_state is None and python_input.signatures:
+                    row, col = python_input.signatures[0].bracket_start
+                    index = b.document.translate_row_col_to_index(row - 1, col)
+                    return index
+
+            return Window(
+                BufferControl(
+                    buffer=python_input.default_buffer,
+                    search_buffer_control=search_toolbar.control,
+                    lexer=lexer,
+                    include_default_input_processors=False,
+                    input_processors=[
+                        ConditionalProcessor(
+                            processor=HighlightIncrementalSearchProcessor(),
+                            filter=has_focus(SEARCH_BUFFER) | 
has_focus(search_toolbar.control),
                         ),
-                        height=D(max=12)),
-                    filter=HasSignature(python_input) & 
ShowDocstring(python_input) & ~is_done),
-            ]),
-            ConditionalContainer(
-                content=HSplit([
-                    python_sidebar(python_input),
-                    Window(style='class:sidebar,separator', height=1),
-                    python_sidebar_navigation(python_input),
+                        HighlightSelectionProcessor(),
+                        DisplayMultipleCursors(),
+                        # Show matching parentheses, but only while editing.
+                        ConditionalProcessor(
+                            
processor=HighlightMatchingBracketProcessor(chars='[](){}'),
+                            filter=has_focus(DEFAULT_BUFFER) & ~is_done &
+                                Condition(lambda: 
python_input.highlight_matching_parenthesis)),
+                        ConditionalProcessor(
+                            processor=AppendAutoSuggestion(),
+                            filter=~is_done)
+                    ] + extra_buffer_processors,
+                    menu_position=menu_position,
+
+                    # Make sure that we always see the result of an 
reverse-i-search:
+                    preview_search=True,
+                ),
+                left_margins=[PythonPromptMargin(python_input)],
+                # Scroll offsets. The 1 at the bottom is important to make sure
+                # the cursor is never below the "Press [Meta+Enter]" message
+                # which is a float.
+                scroll_offsets=ScrollOffsets(bottom=1, left=4, right=4),
+                # As long as we're editing, prefer a minimal height of 6.
+                height=(lambda: (
+                    None if get_app().is_done or 
python_input.show_exit_confirmation
+                            else input_buffer_height)),
+                wrap_lines=Condition(lambda: python_input.wrap_lines),
+            )
+
+        sidebar = python_sidebar(python_input)
+
+        root_container = HSplit([
+            VSplit([
+                HSplit([
+                    FloatContainer(
+                        content=HSplit(
+                            [create_python_input_window()] + extra_body
+                        ),
+                        floats=[
+                            Float(xcursor=True,
+                                  ycursor=True,
+                                  content=ConditionalContainer(
+                                      content=CompletionsMenu(
+                                          scroll_offset=(
+                                              lambda: 
python_input.completion_menu_scroll_offset),
+                                          max_height=12),
+                                      
filter=show_completions_menu(python_input))),
+                            Float(xcursor=True,
+                                  ycursor=True,
+                                  content=ConditionalContainer(
+                                      content=MultiColumnCompletionsMenu(),
+                                      
filter=show_multi_column_completions_menu(python_input))),
+                            Float(xcursor=True,
+                                  ycursor=True,
+                                  content=signature_toolbar(python_input)),
+                            Float(left=2,
+                                  bottom=1,
+                                  content=exit_confirmation(python_input)),
+                            Float(bottom=0, right=0, height=1,
+                                  content=meta_enter_message(python_input),
+                                  hide_when_covering_content=True),
+                            Float(bottom=1, left=1, right=0, 
content=python_sidebar_help(python_input)),
+                        ]),
+                    ArgToolbar(),
+                    search_toolbar,
+                    SystemToolbar(),
+                    ValidationToolbar(),
+                    ConditionalContainer(
+                        content=CompletionsToolbar(),
+                        filter=show_completions_toolbar(python_input)),
+
+                    # Docstring region.
+                    ConditionalContainer(
+                        content=Window(
+                            height=D.exact(1),
+                            char='\u2500',
+                            style='class:separator'),
+                        filter=HasSignature(python_input) & 
ShowDocstring(python_input) & ~is_done),
+                    ConditionalContainer(
+                        content=Window(
+                            BufferControl(
+                                buffer=python_input.docstring_buffer,
+                                lexer=SimpleLexer(style='class:docstring'),
+                                #lexer=PythonLexer,
+                            ),
+                            height=D(max=12)),
+                        filter=HasSignature(python_input) & 
ShowDocstring(python_input) & ~is_done),
                 ]),
-                filter=ShowSidebar(python_input) & ~is_done)
-        ]),
-    ] + extra_toolbars + [
-        VSplit([
-            status_bar(python_input),
-            show_sidebar_button_info(python_input),
+                ConditionalContainer(
+                    content=HSplit([
+                        sidebar,
+                        Window(style='class:sidebar,separator', height=1),
+                        python_sidebar_navigation(python_input),
+                    ]),
+                    filter=ShowSidebar(python_input) & ~is_done)
+            ]),
+        ] + extra_toolbars + [
+            VSplit([
+                status_bar(python_input),
+                show_sidebar_button_info(python_input),
+            ])
         ])
-    ])
 
-    return Layout(root_container)
+        self.layout = Layout(root_container)
+        self.sidebar = sidebar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/ptpython/python_input.py 
new/ptpython-2.0.4/ptpython/python_input.py
--- old/ptpython-2.0.3/ptpython/python_input.py 2018-10-12 18:33:35.000000000 
+0200
+++ new/ptpython-2.0.4/ptpython/python_input.py 2018-10-30 22:30:40.000000000 
+0100
@@ -8,6 +8,8 @@
 from prompt_toolkit.application.run_in_terminal import 
run_coroutine_in_terminal
 from prompt_toolkit.auto_suggest import AutoSuggestFromHistory, 
ConditionalAutoSuggest, ThreadedAutoSuggest
 from prompt_toolkit.buffer import Buffer
+from prompt_toolkit.key_binding.bindings.auto_suggest import 
load_auto_suggest_bindings
+from prompt_toolkit.key_binding.bindings.open_in_editor import 
load_open_in_editor_bindings
 from prompt_toolkit.completion import ThreadedCompleter
 from prompt_toolkit.document import Document
 from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode
@@ -27,7 +29,7 @@
 from .completer import PythonCompleter
 from .history_browser import History
 from .key_bindings import load_python_bindings, load_sidebar_bindings, 
load_confirm_exit_bindings
-from .layout import create_layout, CompletionVisualisation
+from .layout import PtPythonLayout, CompletionVisualisation
 from .prompt_style import IPythonPrompt, ClassicPrompt
 from .style import get_all_code_styles, get_all_ui_styles, generate_style
 from .utils import get_jedi_script_from_document
@@ -259,6 +261,14 @@
                 lambda: self.min_brightness,
                 lambda: self.max_brightness),
         ])
+        self.ptpython_layout = PtPythonLayout(
+            self,
+            lexer=DynamicLexer(
+                lambda: self._lexer if self.enable_syntax_highlighting else 
SimpleLexer()),
+            input_buffer_height=self._input_buffer_height,
+            extra_buffer_processors=self._extra_buffer_processors,
+            extra_body=self._extra_layout_body,
+            extra_toolbars=self._extra_toolbars)
 
         self.app = self._create_application()
 
@@ -549,18 +559,15 @@
         return Application(
             input=self.input,
             output=self.output,
-            layout=create_layout(
-                self,
-                lexer=DynamicLexer(
-                    lambda: self._lexer if self.enable_syntax_highlighting 
else SimpleLexer()),
-                input_buffer_height=self._input_buffer_height,
-                extra_buffer_processors=self._extra_buffer_processors,
-                extra_body=self._extra_layout_body,
-                extra_toolbars=self._extra_toolbars),
+            layout=self.ptpython_layout.layout,
             key_bindings=merge_key_bindings([
                 load_python_bindings(self),
+                load_auto_suggest_bindings(),
                 load_sidebar_bindings(self),
                 load_confirm_exit_bindings(self),
+                ConditionalKeyBindings(
+                    load_open_in_editor_bindings(),
+                    Condition(lambda: self.enable_open_in_editor)),
                 # Extra key bindings should not be active when the sidebar is 
visible.
                 ConditionalKeyBindings(
                     self.extra_key_bindings,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/ptpython.egg-info/PKG-INFO 
new/ptpython-2.0.4/ptpython.egg-info/PKG-INFO
--- old/ptpython-2.0.3/ptpython.egg-info/PKG-INFO       2018-10-12 
19:00:29.000000000 +0200
+++ new/ptpython-2.0.4/ptpython.egg-info/PKG-INFO       2018-10-30 
22:34:48.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: ptpython
-Version: 2.0.3
+Version: 2.0.4
 Summary: Python REPL build on top of prompt_toolkit
 Home-page: https://github.com/jonathanslenders/ptpython
 Author: Jonathan Slenders
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-2.0.3/setup.py new/ptpython-2.0.4/setup.py
--- old/ptpython-2.0.3/setup.py 2018-10-12 18:59:57.000000000 +0200
+++ new/ptpython-2.0.4/setup.py 2018-10-30 22:32:45.000000000 +0100
@@ -14,7 +14,7 @@
 setup(
     name='ptpython',
     author='Jonathan Slenders',
-    version='2.0.3',
+    version='2.0.4',
     url='https://github.com/jonathanslenders/ptpython',
     description='Python REPL build on top of prompt_toolkit',
     long_description=long_description,


Reply via email to