diff -Nru blessings-1.6/blessings/__init__.py blessings-1.7/blessings/__init__.py --- blessings-1.6/blessings/__init__.py 2014-10-01 03:33:59.000000000 +0000 +++ blessings-1.7/blessings/__init__.py 2018-06-21 13:52:52.000000000 +0000 @@ -5,6 +5,7 @@ import curses from curses import setupterm, tigetnum, tigetstr, tparm from fcntl import ioctl +from six import text_type, string_types try: from io import UnsupportedOperation as IOUnsupportedOperation @@ -14,7 +15,6 @@ ``io.UnsupportedOperation`` in Python 2""" from os import isatty, environ -from platform import python_version_tuple import struct import sys from termios import TIOCGWINSZ @@ -23,13 +23,6 @@ __all__ = ['Terminal'] -if ('3', '0', '0') <= python_version_tuple() < ('3', '2', '2+'): # Good till - # 3.2.10 - # Python 3.x < 3.2.3 has a bug in which tparm() erroneously takes a string. - raise ImportError('Blessings needs Python 3.2.3 or greater for Python 3 ' - 'support due to http://bugs.python.org/issue10570.') - - class Terminal(object): """An abstraction around terminal capabilities @@ -89,7 +82,7 @@ self._does_styling = ((self.is_a_tty or force_styling) and force_styling is not None) - # The desciptor to direct terminal initialization sequences to. + # The descriptor to direct terminal initialization sequences to. # sys.__stdout__ seems to always have a descriptor of 1, even if output # is redirected. self._init_descriptor = (sys.__stdout__.fileno() @@ -337,6 +330,9 @@ # don't name it after the underlying capability, because we deviate # slightly from its behavior, and we might someday wish to give direct # access to it. + if not self._does_styling: + return 0 + colors = tigetnum('colors') # Returns -1 if no color support, -2 if no # such cap. # self.__dict__['colors'] = ret # Cache it. It's not changing. @@ -425,7 +421,7 @@ 'shadow', 'standout', 'subscript', 'superscript'])) -class ParametrizingString(unicode): +class ParametrizingString(text_type): """A Unicode string which can be called to parametrize it as a terminal capability""" @@ -437,7 +433,7 @@ "normal" capability. """ - new = unicode.__new__(cls, formatting) + new = text_type.__new__(cls, formatting) new._normal = normal return new @@ -466,7 +462,7 @@ except TypeError: # If the first non-int (i.e. incorrect) arg was a string, suggest # something intelligent: - if len(args) == 1 and isinstance(args[0], basestring): + if len(args) == 1 and isinstance(args[0], string_types): raise TypeError( 'A native or nonexistent capability template received ' '%r when it was expecting ints. You probably misspelled a ' @@ -477,12 +473,12 @@ raise -class FormattingString(unicode): +class FormattingString(text_type): """A Unicode string which can be called upon a piece of text to wrap it in formatting""" def __new__(cls, formatting, normal): - new = unicode.__new__(cls, formatting) + new = text_type.__new__(cls, formatting) new._normal = normal return new @@ -497,7 +493,7 @@ return self + text + self._normal -class NullCallableString(unicode): +class NullCallableString(text_type): """A dummy callable Unicode to stand in for ``FormattingString`` and ``ParametrizingString`` @@ -505,7 +501,7 @@ """ def __new__(cls): - new = unicode.__new__(cls, u'') + new = text_type.__new__(cls, u'') return new def __call__(self, *args): diff -Nru blessings-1.6/blessings/tests.py blessings-1.7/blessings/tests.py --- blessings-1.6/blessings/tests.py 2014-10-01 03:33:59.000000000 +0000 +++ blessings-1.7/blessings/tests.py 2018-06-21 13:52:52.000000000 +0000 @@ -9,14 +9,13 @@ xterm-256color exists. """ -from __future__ import with_statement # Make 2.5-compatible from curses import tigetstr, tparm from functools import partial -from StringIO import StringIO import sys from nose import SkipTest from nose.tools import eq_ +from six import StringIO # This tests that __all__ is correct, since we use below everything that should # be imported: @@ -229,22 +228,22 @@ t = TestTerminal() try: t.bold_misspelled('hey') - except TypeError, e: + except TypeError as e: assert 'probably misspelled' in e.args[0] try: t.bold_misspelled(u'hey') # unicode - except TypeError, e: + except TypeError as e: assert 'probably misspelled' in e.args[0] try: t.bold_misspelled(None) # an arbitrary non-string - except TypeError, e: + except TypeError as e: assert 'probably misspelled' not in e.args[0] try: t.bold_misspelled('a', 'b') # >1 string arg - except TypeError, e: + except TypeError as e: assert 'probably misspelled' not in e.args[0] diff -Nru blessings-1.6/blessings.egg-info/PKG-INFO blessings-1.7/blessings.egg-info/PKG-INFO --- blessings-1.6/blessings.egg-info/PKG-INFO 2014-10-01 04:29:12.000000000 +0000 +++ blessings-1.7/blessings.egg-info/PKG-INFO 2018-06-21 13:57:00.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: blessings -Version: 1.6 +Version: 1.7 Summary: A thin, practical wrapper around terminal coloring, styling, and positioning Home-page: https://github.com/erikrose/blessings Author: Erik Rose @@ -28,6 +28,8 @@ print '{t.bold}All your {t.red}bold and red base{t.normal}'.format(t=t) print t.wingo(2) + `Full API Reference `_ + The Pitch ========= @@ -430,7 +432,12 @@ .. _`issue tracker`: https://github.com/erikrose/blessings/issues/ - .. image:: https://secure.travis-ci.org/erikrose/blessings.png + Blessings tests are run automatically by `Travis CI`_. + + .. _`Travis CI`: https://travis-ci.org/erikrose/blessings/ + + .. image:: https://travis-ci.org/erikrose/blessings.svg?branch=master + :target: https://travis-ci.org/erikrose/blessings License @@ -441,6 +448,14 @@ Version History =============== + 1.7 + * Drop support for Python 2.6 and 3.3, which are end-of-lifed. + * Switch from 2to3 to the ``six`` library. + + 1.6.1 + * Don't crash if ``number_of_colors()`` is called when run in a non-terminal + or when ``does_styling`` is otherwise false. + 1.6 * Add ``does_styling`` property. This takes ``force_styling`` into account and should replace most uses of ``is_a_tty``. @@ -533,11 +548,13 @@ Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: POSIX Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.5 -Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Software Development :: User Interfaces Classifier: Topic :: Terminals diff -Nru blessings-1.6/blessings.egg-info/requires.txt blessings-1.7/blessings.egg-info/requires.txt --- blessings-1.6/blessings.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 +++ blessings-1.7/blessings.egg-info/requires.txt 2018-06-21 13:57:00.000000000 +0000 @@ -0,0 +1 @@ +six diff -Nru blessings-1.6/blessings.egg-info/SOURCES.txt blessings-1.7/blessings.egg-info/SOURCES.txt --- blessings-1.6/blessings.egg-info/SOURCES.txt 2014-10-01 04:29:12.000000000 +0000 +++ blessings-1.7/blessings.egg-info/SOURCES.txt 2018-06-21 13:57:01.000000000 +0000 @@ -8,4 +8,5 @@ blessings.egg-info/PKG-INFO blessings.egg-info/SOURCES.txt blessings.egg-info/dependency_links.txt +blessings.egg-info/requires.txt blessings.egg-info/top_level.txt \ No newline at end of file diff -Nru blessings-1.6/debian/changelog blessings-1.7/debian/changelog --- blessings-1.6/debian/changelog 2020-01-04 21:57:03.000000000 +0000 +++ blessings-1.7/debian/changelog 2021-11-07 21:53:27.000000000 +0000 @@ -1,3 +1,35 @@ +blessings (1.7-1) unstable; urgency=medium + + * Team upload + + [ Ondřej Nový ] + * d/control: Update Vcs-* fields with new Debian Python Team Salsa + layout. + + [ Sandro Tosi ] + * Use the new Debian Python Team contact name and address + + [ Debian Janitor ] + * Remove constraints unnecessary since stretch: + + Build-Depends: Drop versioned constraint on debhelper. + * Bump debhelper dependency to >= 7, since that's what is used in + debian/compat. + * Set upstream metadata fields: Bug-Database, Bug-Submit, Name, Repository, + Repository-Browse. + * Remove constraints unnecessary since buster: + + Build-Depends: Drop versioned constraint on debhelper. + + [ Sebastian Ramacher ] + * New upstream version 1.7 + - Replace use_2to3 with six (Closes: #997613) + * debian/control: + - Build-Depend on python3-six + - Bump Standards-Version + - Set RRR: no + * debian/: Bump debhelper compat to 13 + + -- Sebastian Ramacher Sun, 07 Nov 2021 22:53:27 +0100 + blessings (1.6-3) unstable; urgency=medium [ Ondřej Nový ] diff -Nru blessings-1.6/debian/compat blessings-1.7/debian/compat --- blessings-1.6/debian/compat 2020-01-04 21:57:03.000000000 +0000 +++ blessings-1.7/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -7 diff -Nru blessings-1.6/debian/control blessings-1.7/debian/control --- blessings-1.6/debian/control 2020-01-04 21:57:03.000000000 +0000 +++ blessings-1.7/debian/control 2021-11-07 21:50:49.000000000 +0000 @@ -2,16 +2,18 @@ Section: python Priority: optional Maintainer: David Villa Alises -Uploaders: Debian Python Modules Team +Uploaders: Debian Python Team Build-Depends: - python3-setuptools, python3-all, - debhelper (>= 7.0.50), + python3-setuptools, + python3-six, + debhelper-compat (= 13), dh-python -Standards-Version: 3.9.6 +Standards-Version: 4.6.0 Homepage: https://github.com/erikrose/blessings -Vcs-Git: https://salsa.debian.org/python-team/modules/blessings.git -Vcs-Browser: https://salsa.debian.org/python-team/modules/blessings +Vcs-Git: https://salsa.debian.org/python-team/packages/blessings.git +Vcs-Browser: https://salsa.debian.org/python-team/packages/blessings +Rules-Requires-Root: no Package: python3-blessings Architecture: all diff -Nru blessings-1.6/debian/upstream/metadata blessings-1.7/debian/upstream/metadata --- blessings-1.6/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ blessings-1.7/debian/upstream/metadata 2021-11-07 21:38:30.000000000 +0000 @@ -0,0 +1,6 @@ +--- +Name: blessings +Bug-Database: https://github.com/erikrose/blessings/issues +Bug-Submit: https://github.com/erikrose/blessings/issues/new +Repository: https://github.com/erikrose/blessings.git +Repository-Browse: https://github.com/erikrose/blessings diff -Nru blessings-1.6/PKG-INFO blessings-1.7/PKG-INFO --- blessings-1.6/PKG-INFO 2014-10-01 04:29:12.000000000 +0000 +++ blessings-1.7/PKG-INFO 2018-06-21 13:57:01.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: blessings -Version: 1.6 +Version: 1.7 Summary: A thin, practical wrapper around terminal coloring, styling, and positioning Home-page: https://github.com/erikrose/blessings Author: Erik Rose @@ -28,6 +28,8 @@ print '{t.bold}All your {t.red}bold and red base{t.normal}'.format(t=t) print t.wingo(2) + `Full API Reference `_ + The Pitch ========= @@ -430,7 +432,12 @@ .. _`issue tracker`: https://github.com/erikrose/blessings/issues/ - .. image:: https://secure.travis-ci.org/erikrose/blessings.png + Blessings tests are run automatically by `Travis CI`_. + + .. _`Travis CI`: https://travis-ci.org/erikrose/blessings/ + + .. image:: https://travis-ci.org/erikrose/blessings.svg?branch=master + :target: https://travis-ci.org/erikrose/blessings License @@ -441,6 +448,14 @@ Version History =============== + 1.7 + * Drop support for Python 2.6 and 3.3, which are end-of-lifed. + * Switch from 2to3 to the ``six`` library. + + 1.6.1 + * Don't crash if ``number_of_colors()`` is called when run in a non-terminal + or when ``does_styling`` is otherwise false. + 1.6 * Add ``does_styling`` property. This takes ``force_styling`` into account and should replace most uses of ``is_a_tty``. @@ -533,11 +548,13 @@ Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: POSIX Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.5 -Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Software Development :: User Interfaces Classifier: Topic :: Terminals diff -Nru blessings-1.6/README.rst blessings-1.7/README.rst --- blessings-1.6/README.rst 2014-10-01 03:33:59.000000000 +0000 +++ blessings-1.7/README.rst 2018-06-21 13:55:02.000000000 +0000 @@ -20,6 +20,8 @@ print '{t.bold}All your {t.red}bold and red base{t.normal}'.format(t=t) print t.wingo(2) +`Full API Reference `_ + The Pitch ========= @@ -422,7 +424,12 @@ .. _`issue tracker`: https://github.com/erikrose/blessings/issues/ -.. image:: https://secure.travis-ci.org/erikrose/blessings.png +Blessings tests are run automatically by `Travis CI`_. + +.. _`Travis CI`: https://travis-ci.org/erikrose/blessings/ + +.. image:: https://travis-ci.org/erikrose/blessings.svg?branch=master + :target: https://travis-ci.org/erikrose/blessings License @@ -433,6 +440,14 @@ Version History =============== +1.7 + * Drop support for Python 2.6 and 3.3, which are end-of-lifed. + * Switch from 2to3 to the ``six`` library. + +1.6.1 + * Don't crash if ``number_of_colors()`` is called when run in a non-terminal + or when ``does_styling`` is otherwise false. + 1.6 * Add ``does_styling`` property. This takes ``force_styling`` into account and should replace most uses of ``is_a_tty``. diff -Nru blessings-1.6/setup.py blessings-1.7/setup.py --- blessings-1.6/setup.py 2013-10-20 02:35:07.000000000 +0000 +++ blessings-1.7/setup.py 2018-06-21 13:55:12.000000000 +0000 @@ -10,23 +10,21 @@ from setuptools import setup, find_packages -extra_setup = {} -if sys.version_info >= (3,): - extra_setup['use_2to3'] = True - setup( name='blessings', - version='1.6', + version='1.7', description='A thin, practical wrapper around terminal coloring, styling, and positioning', long_description=open('README.rst').read(), author='Erik Rose', author_email='erikrose@grinchcentral.com', license='MIT', packages=find_packages(exclude=['ez_setup']), + install_requires=['six'], tests_require=['nose'], test_suite='nose.collector', url='https://github.com/erikrose/blessings', include_package_data=True, + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', classifiers=[ 'Intended Audience :: Developers', 'Natural Language :: English', @@ -36,15 +34,16 @@ 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.5', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: User Interfaces', 'Topic :: Terminals' ], keywords=['terminal', 'tty', 'curses', 'ncurses', 'formatting', 'style', 'color', 'console'], - **extra_setup ) diff -Nru blessings-1.6/tox.ini blessings-1.7/tox.ini --- blessings-1.6/tox.ini 2013-05-16 05:21:19.000000000 +0000 +++ blessings-1.7/tox.ini 2018-06-21 13:52:52.000000000 +0000 @@ -1,8 +1,8 @@ [tox] -envlist = py25, py26, py27, py32, py33 +envlist = py{27,34,35,36,py} [testenv] commands = nosetests blessings -deps = nose -# So Python 3 runs don't pick up incompatible, un-2to3'd source from the cwd: -changedir = .tox \ No newline at end of file +deps = + nose + six