Hello community,

here is the log from the commit of package python-pudb for openSUSE:Factory 
checked in at 2019-05-17 23:43:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pudb (Old)
 and      /work/SRC/openSUSE:Factory/.python-pudb.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pudb"

Fri May 17 23:43:40 2019 rev:3 rq:703565 version:2019.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pudb/python-pudb.changes  2018-07-28 
12:44:46.540921603 +0200
+++ /work/SRC/openSUSE:Factory/.python-pudb.new.5148/python-pudb.changes        
2019-05-17 23:43:41.965895144 +0200
@@ -1,0 +2,11 @@
+Thu May 16 21:13:12 UTC 2019 - [email protected]
+
+- Update to 2019.1:
+  * Allow 'space' as a key to expand variables
+  * Have a persistent setting on variable visibility
+  * Enable/partially automate opening the debugger in another
+    terminal
+  * Make sidebar scrollable with j/k
+  * Bug fixes
+
+-------------------------------------------------------------------

Old:
----
  pudb-2018.1.tar.gz

New:
----
  pudb-2019.1.tar.gz

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

Other differences:
------------------
++++++ python-pudb.spec ++++++
--- /var/tmp/diff_new_pack.YCKoTD/_old  2019-05-17 23:43:43.121894509 +0200
+++ /var/tmp/diff_new_pack.YCKoTD/_new  2019-05-17 23:43:43.121894509 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pudb
 #
-# 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
@@ -21,12 +21,12 @@
 %define py_maj_ver %(c=%{python})
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pudb
-Version:        2018.1
+Version:        2019.1
 Release:        0
 Summary:        A full-screen, console-based Python debugger
 License:        MIT
 Group:          Development/Tools/Debuggers
-URL:            http://mathema.tician.de/software/pudb
+Url:            http://mathema.tician.de/software/pudb
 Source0:        
https://files.pythonhosted.org/packages/source/p/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
 BuildRequires:  %{python_module pytest-mock}
 BuildRequires:  %{python_module pytest-runner}

++++++ pudb-2018.1.tar.gz -> pudb-2019.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/PKG-INFO new/pudb-2019.1/PKG-INFO
--- old/pudb-2018.1/PKG-INFO    2018-05-24 13:26:27.000000000 +0200
+++ new/pudb-2019.1/PKG-INFO    2019-04-25 22:41:48.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pudb
-Version: 2018.1
+Version: 2019.1
 Summary: A full-screen, console-based Python debugger
 Home-page: https://github.com/inducer/pudb
 Author: Andreas Kloeckner
@@ -51,6 +51,8 @@
         * PuDB places special emphasis on exception handling. A post-mortem 
mode makes
           it easy to retrace a crashing program's last steps.
         
+        * Ability to control the debugger from a separate terminal.
+        
         * IPython integration (see `wiki <http://wiki.tiker.net/PuDB>`_)
         
         * Should work with Python 2.6 and newer, including Python 3.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/README.rst new/pudb-2019.1/README.rst
--- old/pudb-2018.1/README.rst  2017-04-06 19:16:31.000000000 +0200
+++ new/pudb-2019.1/README.rst  2018-10-02 06:28:12.000000000 +0200
@@ -43,6 +43,8 @@
 * PuDB places special emphasis on exception handling. A post-mortem mode makes
   it easy to retrace a crashing program's last steps.
 
+* Ability to control the debugger from a separate terminal.
+
 * IPython integration (see `wiki <http://wiki.tiker.net/PuDB>`_)
 
 * Should work with Python 2.6 and newer, including Python 3.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/debug_me.py new/pudb-2019.1/debug_me.py
--- old/pudb-2018.1/debug_me.py 2018-01-14 03:28:23.000000000 +0100
+++ new/pudb-2019.1/debug_me.py 2019-01-23 16:29:46.000000000 +0100
@@ -7,6 +7,8 @@
 mc = MyClass(15, MyClass(12, None))
 
 
+from pudb import set_trace; set_trace()
+
 def simple_func(x):
     x += 1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/__init__.py 
new/pudb-2019.1/pudb/__init__.py
--- old/pudb-2018.1/pudb/__init__.py    2018-05-24 13:22:02.000000000 +0200
+++ new/pudb-2019.1/pudb/__init__.py    2019-04-25 22:34:36.000000000 +0200
@@ -26,7 +26,7 @@
 """
 
 
-NUM_VERSION = (2018, 1)
+NUM_VERSION = (2019, 1)
 VERSION = ".".join(str(nv) for nv in NUM_VERSION)
 __version__ = VERSION
 
@@ -70,8 +70,35 @@
 CURRENT_DEBUGGER = []
 
 
+def _tty_override():
+    import os
+    return os.environ.get('PUDB_TTY')
+
+
+def _open_tty(tty_path):
+    import io
+    import os
+    import sys
+    if sys.version_info[0] == 2:
+        tty_file = open(tty_path, 'r+b', buffering=0)
+        term_size = None
+    else:
+        tty_file = io.TextIOWrapper(open(tty_path, 'r+b', buffering=0))
+        term_size = os.get_terminal_size(tty_file.fileno())
+
+    return tty_file, term_size
+
+
 def _get_debugger(**kwargs):
     if not CURRENT_DEBUGGER:
+        tty_path = _tty_override()
+        if tty_path and ('stdin' not in kwargs or 'stdout' not in kwargs):
+            tty_file, term_size = _open_tty(tty_path)
+
+            kwargs.setdefault('stdin', tty_file)
+            kwargs.setdefault('stdout', tty_file)
+            kwargs.setdefault('term_size', term_size)
+
         from pudb.debugger import Debugger
         dbg = Debugger(**kwargs)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/debugger.py 
new/pudb-2019.1/pudb/debugger.py
--- old/pudb-2018.1/pudb/debugger.py    2018-05-24 13:25:55.000000000 +0200
+++ new/pudb-2019.1/pudb/debugger.py    2019-04-25 22:39:06.000000000 +0200
@@ -44,7 +44,7 @@
 CONFIG = load_config()
 save_config(CONFIG)
 
-HELP_TEXT = """\
+HELP_TEXT = r"""\
 Welcome to PuDB, the Python Urwid debugger.
 -------------------------------------------
 
@@ -106,7 +106,7 @@
     [/] - grow/shrink relative size of active sidebar box
 
 Keys in variables list:
-    \ - expand/collapse
+    \/space - expand/collapse
     t/r/s/c - show type/repr/str/custom for this variable
     h - toggle highlighting
     @ - toggle repetition at top
@@ -159,8 +159,10 @@
 # {{{ debugger interface
 
 class Debugger(bdb.Bdb):
-    def __init__(self, stdin=None, stdout=None, term_size=None, 
steal_output=False):
-        bdb.Bdb.__init__(self)
+    def __init__(self, stdin=None, stdout=None, term_size=None, 
steal_output=False,
+            **kwargs):
+        # Pass remaining kwargs to python debugger framework
+        bdb.Bdb.__init__(self, **kwargs)
         self.ui = DebuggerUI(self, stdin=stdin, stdout=stdout, 
term_size=term_size)
         self.steal_output = steal_output
 
@@ -431,11 +433,19 @@
             self.interaction(frame, exc_tuple)
 
     def _runscript(self, filename):
-        # Start with fresh empty copy of globals and locals and tell the script
-        # that it's being run as __main__ to avoid scripts being able to access
-        # the debugger's namespace.
-        globals_ = {"__name__": "__main__", "__file__": filename}
-        locals_ = globals_
+        # Provide separation from current __main__, which is likely
+        # pudb.__main__ run.  Preserving its namespace is not important, and
+        # having the script share it ensures that, e.g., pickle can find
+        # types defined there:
+        # https://github.com/inducer/pudb/issues/331
+
+        import __main__
+        __main__.__dict__.clear()
+        __main__.__dict__.update({
+            "__name__": "__main__",
+            "__file__": filename,
+            "__builtins__": __builtins__,
+            })
 
         # When bdb sets tracing, a number of call and line events happens
         # BEFORE debugger even reaches user's code (and the exact sequence of
@@ -454,7 +464,8 @@
         from pudb import set_interrupt_handler
         set_interrupt_handler()
 
-        self.run(statement, globals=globals_, locals=locals_)
+        # Implicitly runs in the namespace of __main__.
+        self.run(statement)
 
 # }}}
 
@@ -614,10 +625,8 @@
     def __eq__(self, other):
         return (
                 type(self) == type(other)
-                and
-                self.function_name == other.function_name
-                and
-                self.code is other.code)
+                and self.function_name == other.function_name
+                and self.code is other.code)
 
     def identifier(self):
         return "<source code of function %s>" % self.function_name
@@ -776,7 +785,7 @@
             iinfo = self.get_frame_var_info(read_only=False) \
                     .get_inspect_info(var.id_path, read_only=False)
 
-            if key == "\\":
+            if key == "\\" or key == ' ':
                 iinfo.show_detail = not iinfo.show_detail
             elif key == "t":
                 iinfo.display_type = "type"
@@ -861,10 +870,10 @@
                     "Show methods", iinfo.show_methods)
 
             lb = urwid.ListBox(urwid.SimpleListWalker(
-                id_segment +
-                rb_grp_show + [urwid.Text("")] +
-                rb_grp_access + [urwid.Text("")] +
-                [
+                id_segment
+                + rb_grp_show + [urwid.Text("")]
+                + rb_grp_access + [urwid.Text("")]
+                + [
                     wrap_checkbox,
                     expanded_checkbox,
                     highlighted_checkbox,
@@ -928,6 +937,7 @@
                 self.update_var_view()
 
         self.var_list.listen("\\", change_var_state)
+        self.var_list.listen(" ", change_var_state)
         self.var_list.listen("t", change_var_state)
         self.var_list.listen("r", change_var_state)
         self.var_list.listen("s", change_var_state)
@@ -944,6 +954,9 @@
         self.var_list.listen("[", partial(change_rhs_box, 'variables', 0, -1))
         self.var_list.listen("]", partial(change_rhs_box, 'variables', 0, 1))
 
+        self.var_list.listen("j", self.rhs_scroll_down)
+        self.var_list.listen("k", self.rhs_scroll_up)
+
         # }}}
 
         # {{{ stack listeners
@@ -969,6 +982,9 @@
         self.stack_list.listen("[", partial(change_rhs_box, 'stack', 1, -1))
         self.stack_list.listen("]", partial(change_rhs_box, 'stack', 1, 1))
 
+        self.stack_list.listen("j", self.rhs_scroll_down)
+        self.stack_list.listen("k", self.rhs_scroll_up)
+
         # }}}
 
         # {{{ breakpoint listeners
@@ -1091,6 +1107,8 @@
         self.bp_list.listen("[", partial(change_rhs_box, 'breakpoints', 2, -1))
         self.bp_list.listen("]", partial(change_rhs_box, 'breakpoints', 2, 1))
 
+        self.bp_list.listen("j", self.rhs_scroll_down)
+        self.bp_list.listen("k", self.rhs_scroll_up)
         # }}}
 
         # {{{ source listeners
@@ -1296,6 +1314,8 @@
             def mod_exists(mod):
                 if not hasattr(mod, "__file__"):
                     return False
+                if mod.__file__ is None:
+                    return False
                 filename = mod.__file__
 
                 base, ext = splitext(filename)
@@ -1565,11 +1585,15 @@
             sys.stdin = None
             sys.stderr = sys.stdout = StringIO()
             try:
-                # Don't use cmdline_get_namespace() here, it breaks things in
-                # Python 2 (issue #166).
-                eval(compile(cmd, "<pudb command line>", 'single'),
-                        self.debugger.curframe.f_globals,
-                        self.debugger.curframe.f_locals)
+                # Don't use cmdline_get_namespace() here in Python 2, as it
+                # breaks things (issue #166).
+                if PY3:
+                    eval(compile(cmd, "<pudb command line>", 'single'),
+                         cmdline_get_namespace())
+                else:
+                    eval(compile(cmd, "<pudb command line>", 'single'),
+                         self.debugger.curframe.f_globals,
+                         self.debugger.curframe.f_locals)
             except Exception:
                 tp, val, tb = sys.exc_info()
 
@@ -1884,11 +1908,9 @@
                 CONFIG["display"] == "curses"
                 or (
                     CONFIG["display"] == "auto"
-                    and
-                    not (
+                    and not (
                         os.environ.get("TERM", "").startswith("xterm")
-                        or
-                        os.environ.get("TERM", "").startswith("rxvt")
+                        or os.environ.get("TERM", "").startswith("rxvt")
                     )))
 
         if (want_curses_display
@@ -1939,6 +1961,13 @@
     # }}}
 
     # {{{ UI helpers
+    def rhs_scroll_down(self, w, size, key):
+        if key == 'j' and CONFIG['jk_sidebar_scroll']:
+            w.keypress(size, "down")
+
+    def rhs_scroll_up(self, w, size, key):
+        if key == 'k' and CONFIG['jk_sidebar_scroll']:
+            w.keypress(size, "up")
 
     def translate_ui_stack_index(self, index):
         # note: self-inverse
@@ -2134,7 +2163,7 @@
                 self.message("Package 'pygments' not found. "
                         "Syntax highlighting disabled.")
 
-        WELCOME_LEVEL = "e034"  # noqa
+        WELCOME_LEVEL = "e035"  # noqa
         if CONFIG["seen_welcome"] < WELCOME_LEVEL:
             CONFIG["seen_welcome"] = WELCOME_LEVEL
             from pudb import VERSION
@@ -2151,6 +2180,14 @@
                     "(invoked by hitting '?' after this message) should get 
you "
                     "on your way.\n"
 
+                    "\nChanges in version 2019.1:\n\n"
+                    "- Allow 'space' as a key to expand variables (Enrico 
Troeger)\n"
+                    "- Have a persistent setting on variable visibility 
(Enrico Troeger)\n"
+                    "- Enable/partially automate opening the debugger in 
another \n"
+                    "  terminal (Anton Barkovsky)\n"
+                    "- Make sidebar scrollable with j/k (Clayton Craft)\n"
+                    "- Bug fixes.\n"
+
                     "\nChanges in version 2018.1:\n\n"
                     "- Bug fixes.\n"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/ipython.py 
new/pudb-2019.1/pudb/ipython.py
--- old/pudb-2018.1/pudb/ipython.py     2017-03-31 18:29:42.000000000 +0200
+++ new/pudb-2019.1/pudb/ipython.py     2019-04-19 02:10:06.000000000 +0200
@@ -41,7 +41,7 @@
 
 def debugger(self, force=False):
     """Call the PuDB debugger."""
-    from IPython.utils.warn import error
+    from logging import error
     if not (force or self.call_pdb):
         return
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/lowlevel.py 
new/pudb-2019.1/pudb/lowlevel.py
--- old/pudb-2018.1/pudb/lowlevel.py    2017-10-29 13:42:11.000000000 +0100
+++ new/pudb-2019.1/pudb/lowlevel.py    2018-10-26 16:32:27.000000000 +0200
@@ -26,7 +26,7 @@
 """
 
 
-from pudb.py3compat import PY3
+from pudb.py3compat import PY3, text_type
 
 
 # {{{ breakpoint validity
@@ -116,17 +116,15 @@
 # the main idea stolen from Python 3.1's tokenize.py, by Ka-Ping Yee
 
 import re
-cookie_re = re.compile("^\s*#.*coding[:=]\s*([-\w.]+)")
+cookie_re = re.compile(br"^\s*#.*coding[:=]\s*([-\w.]+)")
 from codecs import lookup, BOM_UTF8
-if PY3:
-    BOM_UTF8 = BOM_UTF8.decode()
 
 
-def detect_encoding(lines):
+def detect_encoding(line_iter):
     """
     The detect_encoding() function is used to detect the encoding that should
-    be used to decode a Python source file. It requires one argment, lines,
-    iterable lines stream.
+    be used to decode a Python source file. It requires one argment, line_iter,
+    an iterator on the lines to be read.
 
     It will read a maximum of two lines, and return the encoding used
     (as a string) and a list of any lines (left as bytes) it has read
@@ -140,11 +138,10 @@
     If no encoding is specified, then the default of 'utf-8' will be returned.
     """
     bom_found = False
-    line_iterator = iter(lines)
 
     def read_or_stop():
         try:
-            return next(line_iterator)
+            return next(line_iter)
         except StopIteration:
             return ''
 
@@ -160,7 +157,7 @@
         matches = cookie_re.findall(line_string)
         if not matches:
             return None
-        encoding = matches[0]
+        encoding = matches[0].decode()
         try:
             codec = lookup(encoding)
         except LookupError:
@@ -173,6 +170,9 @@
         return encoding
 
     first = read_or_stop()
+    if isinstance(first, text_type):
+        return None, [first]
+
     if first.startswith(BOM_UTF8):
         bom_found = True
         first = first[3:]
@@ -195,13 +195,17 @@
 
 
 def decode_lines(lines):
-    source_enc, _ = detect_encoding(lines)
+    line_iter = iter(lines)
+    source_enc, detection_read_lines = detect_encoding(line_iter)
+
+    from itertools import chain
 
-    for line in lines:
-        if hasattr(line, "decode"):
+    for line in chain(detection_read_lines, line_iter):
+        if hasattr(line, "decode") and source_enc is not None:
             yield line.decode(source_enc)
         else:
             yield line
+
 # }}}
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/settings.py 
new/pudb-2019.1/pudb/settings.py
--- old/pudb-2018.1/pudb/settings.py    2017-10-29 13:42:54.000000000 +0100
+++ new/pudb-2019.1/pudb/settings.py    2019-03-12 07:18:45.000000000 +0100
@@ -106,11 +106,14 @@
     conf_dict.setdefault("custom_shell", "")
 
     conf_dict.setdefault("wrap_variables", True)
+    conf_dict.setdefault("default_variables_access_level", "public")
 
     conf_dict.setdefault("display", "auto")
 
     conf_dict.setdefault("prompt_on_quit", True)
 
+    conf_dict.setdefault("jk_sidebar_scroll", False)
+
     def normalize_bool_inplace(name):
         try:
             if conf_dict[name].lower() in ["0", "false", "off"]:
@@ -123,6 +126,7 @@
     normalize_bool_inplace("line_numbers")
     normalize_bool_inplace("wrap_variables")
     normalize_bool_inplace("prompt_on_quit")
+    normalize_bool_inplace("jk_sidebar_scroll")
 
     return conf_dict
 
@@ -158,11 +162,14 @@
 
     def _update_line_numbers():
         for sl in ui.source:
-                sl._invalidate()
+            sl._invalidate()
 
     def _update_prompt_on_quit():
         pass
 
+    def _update_jk_sidebar_scroll():
+        pass
+
     def _update_current_stack_frame():
         ui.update_stack()
 
@@ -171,6 +178,9 @@
         pudb.var_view.custom_stringifier_dict = {}
         ui.update_var_view()
 
+    def _update_default_variables_access_level():
+        ui.update_var_view()
+
     def _update_wrap_variables():
         ui.update_var_view()
 
@@ -198,6 +208,11 @@
             conf_dict.update(new_conf_dict)
             _update_prompt_on_quit()
 
+        elif option == "jk_sidebar_scroll":
+            new_conf_dict["jk_sidebar_scroll"] = not check_box.get_state()
+            conf_dict.update(new_conf_dict)
+            _update_jk_sidebar_scroll()
+
         elif option == "current_stack_frame":
             # only activate if the new state of the radio button is 'on'
             if new_state:
@@ -213,6 +228,13 @@
 
                 conf_dict.update(stringifier=newvalue)
                 _update_stringifier()
+
+        elif option == "default_variables_access_level":
+            # only activate if the new state of the radio button is 'on'
+            if new_state:
+                conf_dict.update(default_variables_access_level=newvalue)
+                _update_default_variables_access_level()
+
         elif option == "wrap_variables":
             new_conf_dict["wrap_variables"] = not check_box.get_state()
             conf_dict.update(new_conf_dict)
@@ -233,6 +255,11 @@
             bool(conf_dict["prompt_on_quit"]), on_state_change=_update_config,
                 user_data=("prompt_on_quit", None))
 
+    cb_jk_sidebar_scroll = urwid.CheckBox("Use j/k keys for scrolling in "
+                                          "sidebar",
+            bool(conf_dict["jk_sidebar_scroll"]), 
on_state_change=_update_config,
+                user_data=("jk_sidebar_scroll", None))
+
     # {{{ shells
 
     shell_info = urwid.Text("This is the shell that will be "
@@ -340,6 +367,26 @@
 
     # }}}
 
+    # {{{ variables access level
+
+    default_variables_access_level_opts = ["public", "private", "all"]
+    default_variables_access_level_rb_group = []
+    default_variables_access_level_info = urwid.Text(
+            "Set the default attribute visibility "
+            "of variables in the variables list.\n"
+            "\nNote that you can change this option on "
+            "a per-variable basis by selecting the "
+            "variable and pressing '*'.")
+    default_variables_access_level_rbs = [
+            urwid.RadioButton(default_variables_access_level_rb_group, name,
+                conf_dict["default_variables_access_level"] == name,
+                on_state_change=_update_config,
+                user_data=("default_variables_access_level", name))
+            for name in default_variables_access_level_opts
+            ]
+
+    # }}}
+
     # {{{ wrap variables
 
     cb_wrap_variables = urwid.CheckBox("Wrap variables",
@@ -382,6 +429,9 @@
             + [urwid.AttrMap(urwid.Text("\nPrompt on quit:\n"), "group head")]
             + [cb_prompt_on_quit]
 
+            + [urwid.AttrMap(urwid.Text("\nKeys:\n"), "group head")]
+            + [cb_jk_sidebar_scroll]
+
             + [urwid.AttrMap(urwid.Text("\nShell:\n"), "group head")]
             + [shell_info]
             + shell_rbs
@@ -397,6 +447,11 @@
             + [stringifier_info]
             + stringifier_rbs
 
+            + [urwid.AttrMap(urwid.Text("\nVariables Attribute Visibility:\n"),
+                "group head")]
+            + [default_variables_access_level_info]
+            + default_variables_access_level_rbs
+
             + [urwid.AttrMap(urwid.Text("\nWrap Variables:\n"), "group head")]
             + [cb_wrap_variables]
             + [wrap_variables_info]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/source_view.py 
new/pudb-2019.1/pudb/source_view.py
--- old/pudb-2018.1/pudb/source_view.py 2017-10-29 13:41:09.000000000 +0100
+++ new/pudb-2019.1/pudb/source_view.py 2018-10-26 16:32:27.000000000 +0200
@@ -347,8 +347,8 @@
                 self.state = ParseState.found_open_paren
                 self.paren_level = 1
         else:
-            if ((token is self.t.Name) or
-                    (token is self.t.Name.Builtin.Pseudo and s == 'self')):
+            if ((token is self.t.Name)
+                    or (token is self.t.Name.Builtin.Pseudo and s == 'self')):
                 return self.t.Token.Argument
             elif token is self.t.Punctuation and s == ')':
                 self.paren_level -= 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/ui_tools.py 
new/pudb-2019.1/pudb/ui_tools.py
--- old/pudb-2018.1/pudb/ui_tools.py    2018-05-24 13:19:29.000000000 +0200
+++ new/pudb-2019.1/pudb/ui_tools.py    2018-05-24 13:33:32.000000000 +0200
@@ -15,6 +15,7 @@
     """
     return calc_width(txt, 0, len(txt))
 
+
 def make_canvas(txt, attr, maxcol, fill_attr=None):
     processed_txt = []
     processed_attr = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb/var_view.py 
new/pudb-2019.1/pudb/var_view.py
--- old/pudb-2018.1/pudb/var_view.py    2018-05-24 13:19:29.000000000 +0200
+++ new/pudb-2019.1/pudb/var_view.py    2019-01-23 16:29:46.000000000 +0100
@@ -45,7 +45,6 @@
 else:
     ELLIPSIS = unicode('…', 'utf-8')  # noqa: F821
 
-from pudb.debugger import CONFIG
 from pudb.ui_tools import text_width
 # }}}
 
@@ -68,11 +67,14 @@
 
 class InspectInfo(object):
     def __init__(self):
+        # Do not globalize: cyclic import
+        from pudb.debugger import CONFIG
+
         self.show_detail = False
         self.display_type = CONFIG["stringifier"]
         self.highlighted = False
         self.repeated_at_top = False
-        self.access_level = "public"
+        self.access_level = CONFIG["default_variables_access_level"]
         self.show_methods = False
         self.wrap = CONFIG["wrap_variables"]
 
@@ -119,6 +121,9 @@
         self.attr_prefix = attr_prefix or "var"
         self.watch_expr = watch_expr
         if iinfo is None:
+            # Do not globalize: cyclic import
+            from pudb.debugger import CONFIG
+
             self.wrap = CONFIG["wrap_variables"]
         else:
             self.wrap = iinfo.wrap
@@ -167,7 +172,8 @@
         if self.wrap:
             text = self._get_text(size)
 
-            extralabel_full, extralabel_rem = 
divmod(text_width(var_label[maxcol:]), maxcol)
+            extralabel_full, extralabel_rem = divmod(
+                    text_width(var_label[maxcol:]), maxcol)
             totallen = sum([text_width(i) for i in text])
             labellen = (
                     len(self.prefix)  # Padding of first line
@@ -190,6 +196,8 @@
 
             return make_canvas(text, attr, maxcol, apfx+"value")
 
+        lprefix = len(self.prefix)
+
         if self.value_str is not None:
             if self.var_label is not None:
                 if len(self.prefix) + text_width(self.var_label) > 
self.SIZE_LIMIT:
@@ -197,13 +205,15 @@
                     text = [self.prefix + self.var_label,
                             self.prefix+"  " + self.value_str]
 
-                    attr = [[(apfx+"label", 
len(self.prefix)+text_width(self.var_label))],
-                            [(apfx+"value", 
len(self.prefix)+2+text_width(self.value_str))]]
+                    attr = [
+                        [(apfx+"label", lprefix+text_width(self.var_label))],
+                        [(apfx+"value", lprefix+2+text_width(self.value_str))]
+                        ]
                 else:
                     text = [self.prefix + self.var_label + ": " + 
self.value_str]
 
                     attr = [[
-                            (apfx+"label", 
len(self.prefix)+text_width(self.var_label)+2),
+                            (apfx+"label", 
lprefix+text_width(self.var_label)+2),
                             (apfx+"value", text_width(self.value_str)),
                             ]]
             else:
@@ -216,7 +226,7 @@
         else:
             text = [self.prefix + self.var_label]
 
-            attr = [[(apfx+"label", len(self.prefix) + 
text_width(self.var_label)), ]]
+            attr = [[(apfx+"label", lprefix + text_width(self.var_label)), ]]
 
         # Ellipses to show text was cut off
         #encoding = urwid.util.detected_encoding
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb.egg-info/PKG-INFO 
new/pudb-2019.1/pudb.egg-info/PKG-INFO
--- old/pudb-2018.1/pudb.egg-info/PKG-INFO      2018-05-24 13:26:27.000000000 
+0200
+++ new/pudb-2019.1/pudb.egg-info/PKG-INFO      2019-04-25 22:41:48.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pudb
-Version: 2018.1
+Version: 2019.1
 Summary: A full-screen, console-based Python debugger
 Home-page: https://github.com/inducer/pudb
 Author: Andreas Kloeckner
@@ -51,6 +51,8 @@
         * PuDB places special emphasis on exception handling. A post-mortem 
mode makes
           it easy to retrace a crashing program's last steps.
         
+        * Ability to control the debugger from a separate terminal.
+        
         * IPython integration (see `wiki <http://wiki.tiker.net/PuDB>`_)
         
         * Should work with Python 2.6 and newer, including Python 3.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/pudb.egg-info/requires.txt 
new/pudb-2019.1/pudb.egg-info/requires.txt
--- old/pudb-2018.1/pudb.egg-info/requires.txt  2018-05-24 13:26:27.000000000 
+0200
+++ new/pudb-2019.1/pudb.egg-info/requires.txt  2019-04-25 22:41:48.000000000 
+0200
@@ -1,2 +1,2 @@
-urwid>=1.1.1
 pygments>=1.0
+urwid>=1.1.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/setup.cfg new/pudb-2019.1/setup.cfg
--- old/pudb-2018.1/setup.cfg   2018-05-24 13:26:27.000000000 +0200
+++ new/pudb-2019.1/setup.cfg   2019-04-25 22:41:48.000000000 +0200
@@ -8,5 +8,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pudb-2018.1/test/test_lowlevel.py 
new/pudb-2019.1/test/test_lowlevel.py
--- old/pudb-2018.1/test/test_lowlevel.py       2017-04-19 18:42:44.000000000 
+0200
+++ new/pudb-2019.1/test/test_lowlevel.py       2018-10-02 06:28:53.000000000 
+0200
@@ -4,28 +4,31 @@
 
 
 def test_detect_encoding_nocookie():
-    lines = ['Test Проверка']
-    encoding, _ = detect_encoding(lines)
+    lines = [u'Test Проверка']
+    lines = [l.encode('utf-8') for l in lines]
+    encoding, _ = detect_encoding(iter(lines))
     assert encoding == 'utf-8'
 
 
 def test_detect_encoding_cookie():
     lines = [
-        '# coding=utf-8',
-        'Test',
-        'Проверка'
+        u'# coding=utf-8',
+        u'Test',
+        u'Проверка'
     ]
-    encoding, _ = detect_encoding(lines)
+    lines = [l.encode('utf-8') for l in lines]
+    encoding, _ = detect_encoding(iter(lines))
     assert encoding == 'utf-8'
 
 
 def test_decode_lines():
-    lines = [
-        '# coding=utf-8',
-        'Test',
-        'Проверка',
+    unicode_lines = [
+        u'# coding=utf-8',
+        u'Test',
+        u'Проверка',
     ]
+    lines = [l.encode('utf-8') for l in unicode_lines]
     if PY3:
-        assert lines == list(decode_lines(lines))
+        assert unicode_lines == list(decode_lines(iter(lines)))
     else:
-        assert [l.decode('utf-8') for l in lines] == list(decode_lines(lines))
+        assert [l.decode('utf-8') for l in lines] == 
list(decode_lines(iter(lines)))


Reply via email to