diff -Nru python-urwidtrees-1.0.1.1/debian/changelog python-urwidtrees-1.0.3.dev0/debian/changelog --- python-urwidtrees-1.0.1.1/debian/changelog 2019-07-27 00:33:35.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/debian/changelog 2020-07-05 16:14:38.000000000 +0000 @@ -1,3 +1,16 @@ +python-urwidtrees (1.0.3.dev0-1) unstable; urgency=medium + + * Team Upload. + * New upstream version 1.0.3.dev0 (Closes: #963317) + * Update Build-Deps + * Bump compat version to 13 + * Bump standards version to 4.5.0 + * Add upstream/metadata + * Add "Rules-Requires-Root:no" + * Harden dependency on python3-urwid + + -- Nilesh Patra Sun, 05 Jul 2020 16:14:38 +0000 + python-urwidtrees (1.0.1.1-2) unstable; urgency=medium * Team upload. diff -Nru python-urwidtrees-1.0.1.1/debian/control python-urwidtrees-1.0.3.dev0/debian/control --- python-urwidtrees-1.0.1.1/debian/control 2019-07-27 00:33:35.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/debian/control 2020-07-05 16:14:38.000000000 +0000 @@ -3,14 +3,17 @@ Priority: optional Maintainer: Debian Python Modules Team Uploaders: ChangZhuo Chen (陳昌倬) , -Build-Depends: debhelper-compat (= 9), +Build-Depends: debhelper-compat (= 13), dh-python, python3-all, - python3-urwid, -Standards-Version: 3.9.7 + python3-urwid (>= 2.1.0-4), + python3-setuptools +Standards-Version: 4.5.0 Homepage: https://github.com/pazz/urwidtrees Vcs-Browser: https://salsa.debian.org/python-team/modules/python-urwidtrees Vcs-Git: https://salsa.debian.org/python-team/modules/python-urwidtrees.git +Rules-Requires-Root: no +Testsuite: autopkgtest-pkg-python Package: python3-urwidtrees Architecture: all diff -Nru python-urwidtrees-1.0.1.1/debian/upstream/metadata python-urwidtrees-1.0.3.dev0/debian/upstream/metadata --- python-urwidtrees-1.0.1.1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/debian/upstream/metadata 2020-07-05 15:51:27.000000000 +0000 @@ -0,0 +1,7 @@ +--- +Archive: GitHub +Bug-Database: https://github.com/pazz/urwidtrees/issues +Bug-Submit: https://github.com/pazz/urwidtrees/issues/new +Changelog: https://github.com/pazz/urwidtrees/tags +Repository: https://github.com/pazz/urwidtrees.git +Repository-Browse: https://github.com/pazz/urwidtrees diff -Nru python-urwidtrees-1.0.1.1/PKG-INFO python-urwidtrees-1.0.3.dev0/PKG-INFO --- python-urwidtrees-1.0.1.1/PKG-INFO 2015-07-14 08:33:27.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/PKG-INFO 2016-12-28 10:43:14.000000000 +0000 @@ -1,11 +1,10 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.0 Name: urwidtrees -Version: 1.0.1.1 +Version: 1.0.3.dev0 Summary: Tree widgets for urwid Home-page: https://github.com/pazz/urwidtrees Author: Patrick Totzke Author-email: patricktotzke@gmail.com -License: Copyright (C) 2015 Patrick Totzke +License: Licensed under the GNU GPL v3+. Description: UNKNOWN Platform: UNKNOWN -Requires: urwid (>=1.1.0) diff -Nru python-urwidtrees-1.0.1.1/setup.cfg python-urwidtrees-1.0.3.dev0/setup.cfg --- python-urwidtrees-1.0.1.1/setup.cfg 1970-01-01 00:00:00.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/setup.cfg 2016-12-28 10:43:14.000000000 +0000 @@ -0,0 +1,5 @@ +[egg_info] +tag_build = +tag_date = 0 +tag_svn_revision = 0 + diff -Nru python-urwidtrees-1.0.1.1/setup.py python-urwidtrees-1.0.3.dev0/setup.py --- python-urwidtrees-1.0.1.1/setup.py 2015-07-14 08:32:30.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/setup.py 2016-12-28 10:41:48.000000000 +0000 @@ -1,16 +1,23 @@ #!/usr/bin/env python +from setuptools import setup -from distutils.core import setup -import urwidtrees.version as v +# this loads the version string into __version__ +with open('urwidtrees/version.py') as f: + exec(f.read()) - -setup(name='urwidtrees', - version=v.__version__, - description=v.__description__, - author=v.__author__, - author_email=v.__author_email__, - url=v.__url__, - license=v.__copyright__, - packages=['urwidtrees'], - requires=['urwid (>=1.1.0)'], - ) +setup( + name='urwidtrees', + version=__version__, + description="Tree widgets for urwid", + author="Patrick Totzke", + author_email="patricktotzke@gmail.com", + url="https://github.com/pazz/urwidtrees", + license="Licensed under the GNU GPL v3+.", + packages=['urwidtrees'], + install_requires=['urwid>=1.1.0', 'mock'], + extras_require={ + 'docs': [ + 'mock', + ], + }, +) diff -Nru python-urwidtrees-1.0.1.1/urwidtrees/decoration.py python-urwidtrees-1.0.3.dev0/urwidtrees/decoration.py --- python-urwidtrees-1.0.1.1/urwidtrees/decoration.py 2015-07-08 15:53:18.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees/decoration.py 2016-12-28 10:40:35.000000000 +0000 @@ -1,14 +1,12 @@ # Copyright (C) 2013 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. -from .tree import Tree, SimpleTree import urwid -import logging -NO_SPACE_MSG = 'too little space for requested decoration' +from .tree import Tree, SimpleTree -class TreeDecorationError(Exception): - pass +class NoSpaceError(Exception): + """too little space for requested decoration""" class DecoratedTree(Tree): @@ -216,7 +214,6 @@ DecoratedTree.__init__(self, tree) def decorate(self, pos, widget, is_first=True): - line = None indent = self._tree.depth(pos) * self._indent cols = [(indent, urwid.SolidFill(' ')), widget] # construct a Columns, defining all spacer as Box widgets @@ -248,7 +245,7 @@ builds a list element for given position in the tree. It consists of the original widget taken from the Tree and some decoration columns depending on the existence of parent and sibling - positions. The result is a urwid.Culumns widget. + positions. The result is a urwid.Columns widget. """ void = urwid.SolidFill(' ') line = None @@ -267,7 +264,7 @@ # stop if indent is too small for this decoration if firstindent_width > available_space: - raise TreeDecorationError(NO_SPACE_MSG) + raise NoSpaceError() # add icon only for non-leafs is_leaf = self._tree.is_leaf(pos) @@ -400,7 +397,7 @@ if connector is not None: width = connector.pack()[0] if width > available_width: - raise TreeDecorationError(NO_SPACE_MSG) + raise NoSpaceError() available_width -= width if self._tree.next_sibling_position(pos) is not None: barw = urwid.SolidFill(self._arrow_vbar_char) @@ -416,7 +413,7 @@ awidth, at = self._construct_arrow_tip(pos) if at is not None: if awidth > available_width: - raise TreeDecorationError(NO_SPACE_MSG) + raise NoSpaceError() available_width -= awidth at_spacer = urwid.Pile([('pack', at), void]) cols.append((awidth, at_spacer)) @@ -435,7 +432,7 @@ builds a list element for given position in the tree. It consists of the original widget taken from the Tree and some decoration columns depending on the existence of parent and sibling - positions. The result is a urwid.Culumns widget. + positions. The result is a urwid.Columns widget. """ line = None if pos is not None: diff -Nru python-urwidtrees-1.0.1.1/urwidtrees/__init__.py python-urwidtrees-1.0.3.dev0/urwidtrees/__init__.py --- python-urwidtrees-1.0.1.1/urwidtrees/__init__.py 2015-07-14 08:31:41.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees/__init__.py 2016-12-28 10:41:59.000000000 +0000 @@ -1,10 +1,8 @@ -from .version import (__productname__, __version__, __copyright__, - __author_email__, __author__, __description__, - __url__, __license__) - from .tree import Tree, SimpleTree from .decoration import DecoratedTree, CollapsibleTree from .decoration import IndentedTree, CollapsibleIndentedTree from .decoration import ArrowTree, CollapsibleArrowTree from .nested import NestedTree from .widgets import TreeBox + +from .version import __version__ diff -Nru python-urwidtrees-1.0.1.1/urwidtrees/nested.py python-urwidtrees-1.0.3.dev0/urwidtrees/nested.py --- python-urwidtrees-1.0.1.1/urwidtrees/nested.py 2015-07-08 15:53:18.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees/nested.py 2016-12-28 10:40:35.000000000 +0000 @@ -68,6 +68,8 @@ # DecoratedTree API def _get_decorated_entry(self, tree, pos, widget=None, is_first=True): entry = tree[pos[0]] + if entry is None: + return None if len(pos) > 1 and isinstance(entry, Tree): subtree = entry entry = self._get_decorated_entry( diff -Nru python-urwidtrees-1.0.1.1/urwidtrees/tree.py python-urwidtrees-1.0.3.dev0/urwidtrees/tree.py --- python-urwidtrees-1.0.1.1/urwidtrees/tree.py 2015-07-08 15:53:18.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees/tree.py 2016-12-28 10:40:35.000000000 +0000 @@ -1,8 +1,6 @@ # Copyright (C) 2013 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. -import logging - class Tree(object): """ @@ -54,7 +52,8 @@ candidate = self._next_of_kin(parent) return candidate - def _last_in_direction(self, starting_pos, direction): + @staticmethod + def _last_in_direction(starting_pos, direction): """ move in the tree in given direction and return the last position. @@ -144,7 +143,7 @@ # End of high-level helper implementation. The following need to be # overwritten by subclasses #################################################################### - def parent_position(self, pos): + def parent_position(pos): """returns the position of the parent node of the node at `pos` or `None` if none exists.""" return None @@ -221,11 +220,11 @@ def __getitem__(self, pos): return self._get_node(self._treelist, pos) - def parent_position(self, pos): + @staticmethod + def parent_position(pos): parent = None - if pos is not None: - if len(pos) > 1: - parent = pos[:-1] + if pos is not None and len(pos) > 1: + parent = pos[:-1] return parent def first_child_position(self, pos): @@ -243,10 +242,12 @@ def next_sibling_position(self, pos): return self._confirm_pos(pos[:-1] + (pos[-1] + 1,)) - def prev_sibling_position(self, pos): + @staticmethod + def prev_sibling_position(pos): return pos[:-1] + (pos[-1] - 1,) if (pos[-1] > 0) else None # optimizations - def depth(self, pos): + @staticmethod + def depth(pos): """more performant implementation due to specific structure of pos""" return len(pos) - 1 diff -Nru python-urwidtrees-1.0.1.1/urwidtrees/version.py python-urwidtrees-1.0.3.dev0/urwidtrees/version.py --- python-urwidtrees-1.0.1.1/urwidtrees/version.py 2015-07-14 08:33:15.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees/version.py 2016-12-28 10:40:47.000000000 +0000 @@ -1,8 +1 @@ -__productname__ = 'urwidtrees' -__version__ = '1.0.1.1' -__copyright__ = "Copyright (C) 2015 Patrick Totzke" -__author__ = "Patrick Totzke" -__author_email__ = "patricktotzke@gmail.com" -__description__ = "Tree widgets for urwid" -__url__ = "https://github.com/pazz/urwidtrees" -__license__ = "Licensed under the GNU GPL v3+." +__version__ = '1.0.3.dev' diff -Nru python-urwidtrees-1.0.1.1/urwidtrees/widgets.py python-urwidtrees-1.0.3.dev0/urwidtrees/widgets.py --- python-urwidtrees-1.0.1.1/urwidtrees/widgets.py 2015-07-08 16:05:27.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees/widgets.py 2016-12-28 10:40:35.000000000 +0000 @@ -2,9 +2,9 @@ # This file is released under the GNU GPL, version 3 or a later revision. import urwid -import logging from urwid import WidgetWrap, ListBox from urwid import signals + from .decoration import DecoratedTree, CollapseMixin from .nested import NestedTree try: diff -Nru python-urwidtrees-1.0.1.1/urwidtrees.egg-info/dependency_links.txt python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/dependency_links.txt --- python-urwidtrees-1.0.1.1/urwidtrees.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/dependency_links.txt 2016-12-28 10:43:14.000000000 +0000 @@ -0,0 +1 @@ + diff -Nru python-urwidtrees-1.0.1.1/urwidtrees.egg-info/PKG-INFO python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/PKG-INFO --- python-urwidtrees-1.0.1.1/urwidtrees.egg-info/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/PKG-INFO 2016-12-28 10:43:14.000000000 +0000 @@ -0,0 +1,10 @@ +Metadata-Version: 1.0 +Name: urwidtrees +Version: 1.0.3.dev0 +Summary: Tree widgets for urwid +Home-page: https://github.com/pazz/urwidtrees +Author: Patrick Totzke +Author-email: patricktotzke@gmail.com +License: Licensed under the GNU GPL v3+. +Description: UNKNOWN +Platform: UNKNOWN diff -Nru python-urwidtrees-1.0.1.1/urwidtrees.egg-info/requires.txt python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/requires.txt --- python-urwidtrees-1.0.1.1/urwidtrees.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/requires.txt 2016-12-28 10:43:14.000000000 +0000 @@ -0,0 +1,5 @@ +urwid>=1.1.0 +mock + +[docs] +mock diff -Nru python-urwidtrees-1.0.1.1/urwidtrees.egg-info/SOURCES.txt python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/SOURCES.txt --- python-urwidtrees-1.0.1.1/urwidtrees.egg-info/SOURCES.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/SOURCES.txt 2016-12-28 10:43:14.000000000 +0000 @@ -0,0 +1,13 @@ +setup.py +urwidtrees/__init__.py +urwidtrees/decoration.py +urwidtrees/lru_cache.py +urwidtrees/nested.py +urwidtrees/tree.py +urwidtrees/version.py +urwidtrees/widgets.py +urwidtrees.egg-info/PKG-INFO +urwidtrees.egg-info/SOURCES.txt +urwidtrees.egg-info/dependency_links.txt +urwidtrees.egg-info/requires.txt +urwidtrees.egg-info/top_level.txt \ No newline at end of file diff -Nru python-urwidtrees-1.0.1.1/urwidtrees.egg-info/top_level.txt python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/top_level.txt --- python-urwidtrees-1.0.1.1/urwidtrees.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-urwidtrees-1.0.3.dev0/urwidtrees.egg-info/top_level.txt 2016-12-28 10:43:14.000000000 +0000 @@ -0,0 +1 @@ +urwidtrees