Hello community,

here is the log from the commit of package python-humanfriendly for 
openSUSE:Factory checked in at 2020-02-15 22:25:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-humanfriendly (Old)
 and      /work/SRC/openSUSE:Factory/.python-humanfriendly.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-humanfriendly"

Sat Feb 15 22:25:23 2020 rev:12 rq:774497 version:6.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-humanfriendly/python-humanfriendly.changes    
    2019-12-11 12:15:25.852506370 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-humanfriendly.new.26092/python-humanfriendly.changes
     2020-02-15 22:25:48.951322557 +0100
@@ -1,0 +2,62 @@
+Sat Feb 15 08:48:24 CET 2020 - Matej Cepl <[email protected]>
+
+- Update to 6.1:
+  - Added a :pypy:`...` role for easy linking to packages on the
+    Python Package Index, for details refer to
+    :func:`humanfriendly.sphinx.pypi_role()`.
+  - Wasted quite a bit of time debugging a MacOS failure on
+    Travis CI caused by a broken man`pip` installation, fixed by
+    using get-pip.py to bootstrap an installation that actually
+    works wink.
+  - Enable :class:`~humanfriendly.testing.MockedProgram` to
+    customize the shell script code of mocked programs. This was
+    added to make it easy to mock a program that is expected to
+    generate specific output (I'm planning to use this in the
+    :pypi:`linux-utils` test suite).
+  - Defined __all__ for all public modules that previously lacked
+    "export control" and decided to bump the major version number
+    as a precaution:
+    - These changes should not have any impact on backwards
+      compatibility, unless I forgot entries, in which case
+      callers can get :exc:`~exceptions.ImportError`
+      exceptions...
+    - Imports of public modules were previously exported
+      (implicitly) and this pollutes code completion suggestions
+      which in turn can encourage bad practices (not importing
+      things using their "canonical" name).
+    - I started developing the humanfriendly package years before
+      I learned about the value of defining __all__ and so some
+      modules lacked a definition until now. I decided that now
+      was as good a time as any to add those definitions
+      innocent.
+  - Simplified the headings in docs/api.rst so that only the
+    module names remain. This was done because Sphinx doesn't
+    support nested links in HTML output and thus generated really
+    weird "Table of Contents" listings.
+  - Fixed the reStructuredText references in the documentation of
+    :func:`~humanfriendly.prompts.prompt_for_choice()`. This
+    function is imported from :mod:`humanfriendly.prompts` to
+    :mod:`humanfriendly` (for backwards compatibility) where it
+    can't use relative references to refer to the other functions
+    in the :mod:`humanfriendly.prompts` module.
+  - Embedded quite a few Python API references into recent
+    changelog entries, just because I could (I heart what
+    hyperlinks can do for the usability of technical
+    documentation, it gives a lot more context).
+  - Added custom :man:`...` role for easy linking to Linux manual
+    pages to the :mod:`humanfriendly.sphinx` module.
+  - Changed rendering of pretty tables to expand tab characters
+    to spaces: Until now pretty tables did not take the variable
+    width of tab characters into account which resulted in tables
+    whose "line drawing characters" were visually misaligned.
+    Tabs are now expanded to spaces using str.expandtabs().
+  - Stop testing on Python 2.6 and drop official support. The
+    world (including Travis CI) has moved on and preserving
+    Python 2.6 compatibility was clearly starting to drag the
+    project down...
+  - I decided to bump the major version number because each of
+    these changes can be considered backwards incompatible in one
+    way or another and version numbers are cheap anyway so there
+    stuck_out_tongue.
+
+-------------------------------------------------------------------

Old:
----
  humanfriendly-4.18.tar.gz

New:
----
  humanfriendly-6.1.tar.gz

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

Other differences:
------------------
++++++ python-humanfriendly.spec ++++++
--- /var/tmp/diff_new_pack.YMwhWM/_old  2020-02-15 22:25:49.531322871 +0100
+++ /var/tmp/diff_new_pack.YMwhWM/_new  2020-02-15 22:25:49.531322871 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
 %endif
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-humanfriendly%{psuffix}
-Version:        4.18
+Version:        6.1
 Release:        0
 Summary:        Human friendly input/output for text interfaces using Python
 License:        MIT
@@ -42,6 +42,7 @@
 %if %{with test}
 BuildRequires:  %{python_module capturer >= 2.1}
 BuildRequires:  %{python_module coloredlogs >= 2}
+BuildRequires:  %{python_module docutils}
 BuildRequires:  %{python_module pytest >= 3.0.7}
 BuildRequires:  %{python_module pytest-cov >= 2.4.0}
 BuildRequires:  %{pythons}

++++++ humanfriendly-4.18.tar.gz -> humanfriendly-6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/CHANGELOG.rst 
new/humanfriendly-6.1/CHANGELOG.rst
--- old/humanfriendly-4.18/CHANGELOG.rst        2019-02-21 21:22:00.000000000 
+0100
+++ new/humanfriendly-6.1/CHANGELOG.rst 2020-02-10 22:22:15.000000000 +0100
@@ -11,10 +11,93 @@
 .. _Keep a Changelog: http://keepachangelog.com/
 .. _semantic versioning: http://semver.org/
 
+`Release 6.1`_ (2020-02-10)
+---------------------------
+
+- Added a ``:pypy:`…``` role for easy linking to packages on the Python Package
+  Index, for details refer to :func:`humanfriendly.sphinx.pypi_role()`.
+
+- Wasted quite a bit of time debugging a MacOS failure on Travis CI caused by a
+  broken :man:`pip` installation, fixed by using ``get-pip.py`` to bootstrap an
+  installation that actually works 😉.
+
+.. _Release 6.1: 
https://github.com/xolox/python-humanfriendly/compare/6.0...6.1
+
+`Release 6.0`_ (2020-02-09)
+---------------------------
+
+**Noteworthy changes:**
+
+- Enable :class:`~humanfriendly.testing.MockedProgram` to customize the shell
+  script code of mocked programs. This was added to make it easy to mock a
+  program that is expected to generate specific output (I'm planning to use
+  this in the :pypi:`linux-utils` test suite).
+
+- Defined ``__all__`` for all public modules that previously lacked "export
+  control" and decided to bump the major version number as a precaution:
+
+  - These changes should not have any impact on backwards compatibility,
+    unless I forgot entries, in which case callers can get
+    :exc:`~exceptions.ImportError` exceptions...
+
+  - Imports of public modules were previously exported (implicitly) and this
+    pollutes code completion suggestions which in turn can encourage bad
+    practices (not importing things using their "canonical" name).
+
+  - I started developing the ``humanfriendly`` package years before I learned
+    about the value of defining ``__all__`` and so some modules lacked a
+    definition until now. I decided that now was as good a time as any
+    to add those definitions 😇.
+
+**Miscellaneous changes:**
+
+- Simplified the headings in ``docs/api.rst`` so that only the module names
+  remain. This was done because Sphinx doesn't support nested links in HTML
+  output and thus generated really weird "Table of Contents" listings.
+
+- Fixed the reStructuredText references in the documentation of
+  :func:`~humanfriendly.prompts.prompt_for_choice()`. This function is imported
+  from :mod:`humanfriendly.prompts` to :mod:`humanfriendly` (for backwards
+  compatibility) where it can't use relative references to refer to the other
+  functions in the :mod:`humanfriendly.prompts` module.
+
+- Changed the ``Makefile`` to default to Python 3 for development, make sure
+  ``flake8`` is always up-to-date and silence the few targets whose commands
+  were not already silenced.
+
+- Embedded quite a few Python API references into recent changelog entries,
+  just because I could (I ❤️  what hyperlinks can do for the usability of
+  technical documentation, it gives a lot more context).
+
+.. _Release 6.0: 
https://github.com/xolox/python-humanfriendly/compare/5.0...6.0
+
+`Release 5.0`_ (2020-02-06)
+---------------------------
+
+- Added custom ``:man:`…``` role for easy linking to Linux manual pages to
+  the :mod:`humanfriendly.sphinx` module.
+
+- Changed rendering of pretty tables to expand tab characters to spaces:
+
+  Until now pretty tables did not take the variable width of tab characters
+  into account which resulted in tables whose "line drawing characters" were
+  visually misaligned. Tabs are now expanded to spaces using
+  ``str.expandtabs()``.
+
+- Stop testing on Python 2.6 and drop official support. The world (including
+  Travis CI) has moved on and preserving Python 2.6 compatibility was clearly
+  starting to drag the project down...
+
+I decided to bump the major version number because each of these changes can be
+considered backwards incompatible in one way or another and version numbers are
+cheap anyway so there 😛.
+
+.. _Release 5.0: 
https://github.com/xolox/python-humanfriendly/compare/4.18...5.0
+
 `Release 4.18`_ (2019-02-21)
 ----------------------------
 
-- Added ``humanfriendly.text.generate_slug()`` function.
+- Added :func:`humanfriendly.text.generate_slug()` function.
 
 - Fixed "invalid escape sequence" DeprecationWarning (pointed out by Python >= 
3.6).
 
@@ -56,17 +139,19 @@
 
 More HTML to ANSI improvements:
 
-- Added ``humanfriendly.text.compact_empty_lines()`` function.
-- Enable optional ``html_to_ansi(data[, callback])`` argument.
-- Added a code sample and screenshot to the ``HTMLConverter`` documentation.
+- Added :func:`humanfriendly.text.compact_empty_lines()` function.
+- Enable optional ``callback`` argument to
+  :func:`humanfriendly.terminal.html_to_ansi()`.
+- Added a code sample and screenshot to the
+  :class:`humanfriendly.terminal.HTMLConverter` documentation.
 - Emit vertical whitespace for block tags like ``<div>``, ``<p>`` and ``<pre>``
   and post-process the generated output in ``__call__()`` to compact empty 
lines.
 - Don't pre-process preformatted text using the user defined text callback.
 - Improve robustness against malformed HTML (previously an ``IndexError`` would
   be raised when a closing ``</a>`` tag was encountered without a corresponding
   opening ``<a>`` tag).
-- Emit an ANSI reset code when ``HTMLConverter.close()`` is called and a style
-  is still active (improves robustness against malformed HTML).
+- Emit an ANSI reset code when 
:func:`humanfriendly.terminal.HTMLConverter.close()`
+  is called and a style is still active (improves robustness against malformed 
HTML).
 
 .. _Release 4.16: 
https://github.com/xolox/python-humanfriendly/compare/4.15.1...4.16
 
@@ -85,8 +170,9 @@
 `Release 4.15`_ (2018-07-14)
 ----------------------------
 
-Added the ``ansi_to_html()`` function which is a shortcut for the
-``HTMLConverter`` class that's based on ``html.parser.HTMLParser``.
+Added the :func:`humanfriendly.terminal.ansi_to_html()` function which is a
+shortcut for the :class:`humanfriendly.terminal.HTMLConverter` class that's
+based on ``html.parser.HTMLParser``.
 
 This new functionality converts HTML with simple text formatting tags like
 ``<b>`` for bold, ``<i>`` for italic, ``<u>`` for underline, ``<span>`` for
@@ -136,7 +222,9 @@
 `Release 4.12`_ (2018-04-26)
 ----------------------------
 
-- Make ``format_timespan()`` accept ``datetime.timedelta`` objects (fixes 
`#27`_).
+- Make :func:`humanfriendly.format_timespan()` accept
+  :class:`datetime.timedelta` objects (fixes `#27`_).
+
 - Add ``license`` key to ``setup.py`` script (pointed out to me in `coloredlogs
   pull request #53 <https://github.com/xolox/python-coloredlogs/pull/53>`_).
 
@@ -168,23 +256,25 @@
 `Release 4.10`_ (2018-03-31)
 ----------------------------
 
-Added the ``Timer.sleep()`` method to sleep "no more than" the given number of 
seconds.
+Added the :func:`humanfriendly.Timer.sleep()` method to sleep "no more than"
+the given number of seconds.
 
 .. _Release 4.10: 
https://github.com/xolox/python-humanfriendly/compare/4.9...4.10
 
 `Release 4.9`_ (2018-03-28)
 ---------------------------
 
-Added the ``format_rst_table()`` function to render RST (reStructuredText) 
tables.
+Added the :func:`humanfriendly.tables.format_rst_table()` function to render
+RST (reStructuredText) tables.
 
 .. _Release 4.9: 
https://github.com/xolox/python-humanfriendly/compare/4.8...4.9
 
 `Release 4.8`_ (2018-01-20)
 ---------------------------
 
-Added the ``coerce_pattern()`` function. I previously created this for
-vcs-repo-mgr_ and now need the same thing in qpass_ so I'm putting it in
-humanfriendly :-) because it kind of fits with the other coercion functions.
+Added the :func:`humanfriendly.coerce_pattern()` function. I previously created
+this for vcs-repo-mgr_ and now need the same thing in qpass_ so I'm putting it
+in humanfriendly :-) because it kind of fits with the other coercion functions.
 
 .. _Release 4.8: 
https://github.com/xolox/python-humanfriendly/compare/4.7...4.8
 .. _vcs-repo-mgr: https://vcs-repo-mgr.readthedocs.io/
@@ -193,8 +283,12 @@
 `Release 4.7`_ (2018-01-14)
 ---------------------------
 
-- Added support for background colors and 256 color mode (related to `issue 35 
on the coloredlogs issue tracker 
<https://github.com/xolox/python-coloredlogs/issues/35>`_).
-- Added tests for ``output()``, ``message()`` and ``warning()``.
+- Added support for background colors and 256 color mode (related to `issue 35
+  on the coloredlogs issue tracker 
<https://github.com/xolox/python-coloredlogs/issues/35>`_).
+
+- Added tests for :func:`~humanfriendly.terminal.output()`,
+  :func:`~humanfriendly.terminal.message()` and
+  :func:`~humanfriendly.terminal.warning()`.
 
 .. _Release 4.7: 
https://github.com/xolox/python-humanfriendly/compare/4.6...4.7
 
@@ -243,35 +337,37 @@
 `Release 4.4`_ (2017-07-16)
 ---------------------------
 
-Added the ``make_dirs()`` and ``touch()`` functions to the 
``humanfriendly.testing`` module.
+Added the :func:`~humanfriendly.testing.make_dirs()` and
+:func:`~humanfriendly.testing.touch()` functions.
 
 .. _Release 4.4: 
https://github.com/xolox/python-humanfriendly/compare/4.3...4.4
 
 `Release 4.3`_ (2017-07-10)
 ---------------------------
 
-Don't log duplicate output in ``run_cli()``.
+Don't log duplicate output in :func:`~humanfriendly.testing.run_cli()`.
 
 .. _Release 4.3: 
https://github.com/xolox/python-humanfriendly/compare/4.2...4.3
 
 `Release 4.2`_ (2017-07-10)
 ---------------------------
 
-Automatically reconfigure logging in ``run_cli()``.
+Automatically reconfigure logging in :func:`~humanfriendly.testing.run_cli()`.
 
 .. _Release 4.2: 
https://github.com/xolox/python-humanfriendly/compare/4.1...4.2
 
 `Release 4.1`_ (2017-07-10)
 ---------------------------
 
-Improve ``run_cli()`` to always log standard error as well.
+Improve :func:`~humanfriendly.testing.run_cli()` to always log standard error
+as well.
 
 .. _Release 4.1: 
https://github.com/xolox/python-humanfriendly/compare/4.0...4.1
 
 `Release 4.0`_ (2017-07-10)
 ---------------------------
 
-Backwards incompatible improvements to ``humanfriendly.testing.run_cli()``.
+Backwards incompatible improvements to 
:func:`~humanfriendly.testing.run_cli()`.
 
 I just wasted quite a bit of time debugging a Python 3.6 incompatibility in
 deb-pkg-tools (see build 251688788_) which was obscured by my naive
@@ -299,7 +395,8 @@
 `Release 3.6.1`_ (2017-06-24)
 -----------------------------
 
-Improved the robustness of the ``PatchedAttribute`` and ``PatchedItem`` 
classes.
+Improved the robustness of the :class:`~humanfriendly.testing.PatchedAttribute`
+and :class:`~humanfriendly.testing.PatchedItem` classes.
 
 .. _Release 3.6.1: 
https://github.com/xolox/python-humanfriendly/compare/3.6...3.6.1
 
@@ -314,7 +411,7 @@
 `Release 3.5`_ (2017-06-24)
 ---------------------------
 
-Added ``TestCase.assertRaises()`` enhancements.
+Added :func:`~humanfriendly.testing.TestCase.assertRaises()` enhancements.
 
 .. _Release 3.5: 
https://github.com/xolox/python-humanfriendly/compare/3.4.1...3.5
 
@@ -335,9 +432,9 @@
 `Release 3.3`_ (2017-06-24)
 ---------------------------
 
-- Added the ``humanfriendly.text.random_string()`` function.
-- Added the ``humanfriendly.testing`` module with unittest helpers.
-- Define ``humanfriendly.text.__all__``.
+- Added the :func:`humanfriendly.text.random_string()` function.
+- Added the :mod:`humanfriendly.testing` module with unittest helpers.
+- Define :data:`humanfriendly.text.__all__`.
 
 .. _Release 3.3: 
https://github.com/xolox/python-humanfriendly/compare/3.2...3.3
 
@@ -385,7 +482,7 @@
 ---------------------------
 
 Make ``usage()`` and ``show_pager()`` more user friendly by changing how
-``less`` as a default pager is invoked (with specific options).
+:man:`less` as a default pager is invoked (with specific options).
 
 .. _Release 2.4: 
https://github.com/xolox/python-humanfriendly/compare/2.3.2...2.4
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/LICENSE.txt 
new/humanfriendly-6.1/LICENSE.txt
--- old/humanfriendly-4.18/LICENSE.txt  2018-01-04 13:06:45.000000000 +0100
+++ new/humanfriendly-6.1/LICENSE.txt   2020-02-06 01:08:58.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2018 Peter Odding
+Copyright (c) 2020 Peter Odding
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/PKG-INFO 
new/humanfriendly-6.1/PKG-INFO
--- old/humanfriendly-4.18/PKG-INFO     2019-02-21 21:22:20.000000000 +0100
+++ new/humanfriendly-6.1/PKG-INFO      2020-02-10 22:22:42.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: humanfriendly
-Version: 4.18
+Version: 6.1
 Summary: Human friendly output for text interfaces using Python
 Home-page: https://humanfriendly.readthedocs.io
 Author: Peter Odding
@@ -31,9 +31,9 @@
           friendly rendering of usage messages and querying the terminal for 
its
           size.
         
-        The `humanfriendly` package is currently tested on Python 2.6, 2.7, 
3.4, 3.5,
-        3.6, 3.7 and PyPy (2.7) on Linux and Mac OS X. While the intention is 
to
-        support Windows as well, you may encounter some rough edges.
+        The `humanfriendly` package is currently tested on Python 2.7, 3.4, 
3.5, 3.6,
+        3.7 and PyPy (2.7) on Linux and Mac OS X. While the intention is to 
support
+        Windows as well, you may encounter some rough edges.
         
         .. contents::
            :local:
@@ -144,7 +144,7 @@
         
         This software is licensed under the `MIT license`_.
         
-        © 2018 Peter Odding.
+        © 2020 Peter Odding.
         
         .. External references:
         .. _#4: https://github.com/xolox/python-humanfriendly/issues/4
@@ -169,7 +169,6 @@
 Classifier: Natural Language :: English
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/README.rst 
new/humanfriendly-6.1/README.rst
--- old/humanfriendly-4.18/README.rst   2018-10-20 07:21:01.000000000 +0200
+++ new/humanfriendly-6.1/README.rst    2020-02-06 01:08:58.000000000 +0100
@@ -23,9 +23,9 @@
   friendly rendering of usage messages and querying the terminal for its
   size.
 
-The `humanfriendly` package is currently tested on Python 2.6, 2.7, 3.4, 3.5,
-3.6, 3.7 and PyPy (2.7) on Linux and Mac OS X. While the intention is to
-support Windows as well, you may encounter some rough edges.
+The `humanfriendly` package is currently tested on Python 2.7, 3.4, 3.5, 3.6,
+3.7 and PyPy (2.7) on Linux and Mac OS X. While the intention is to support
+Windows as well, you may encounter some rough edges.
 
 .. contents::
    :local:
@@ -136,7 +136,7 @@
 
 This software is licensed under the `MIT license`_.
 
-© 2018 Peter Odding.
+© 2020 Peter Odding.
 
 .. External references:
 .. _#4: https://github.com/xolox/python-humanfriendly/issues/4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/constraints.txt 
new/humanfriendly-6.1/constraints.txt
--- old/humanfriendly-4.18/constraints.txt      2019-02-21 21:22:00.000000000 
+0100
+++ new/humanfriendly-6.1/constraints.txt       1970-01-01 01:00:00.000000000 
+0100
@@ -1,36 +0,0 @@
-# This is a pip constraints file that is used to preserve Python 2.6
-# compatibility (on Travis CI). Why I'm still doing that in 2018 is
-# a good question, maybe simply to prove that I can :-P.
-
-# flake8 3.0.0 drops explicit support for Python 2.6:
-# http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
-flake8 < 3.0.0 ; python_version < '2.7'
-
-# flake8-docstrings 1.0.0 switches from pep257 to pydocstyle and I haven't been
-# able to find a combination of versions of flake8-docstrings and pydocstyle
-# that actually works on Python 2.6. Here's the changelog:
-# https://gitlab.com/pycqa/flake8-docstrings/blob/master/HISTORY.rst
-flake8-docstrings < 1.0.0 ; python_version < '2.7'
-
-# pyflakes 2.0.0 drops Python 2.6 compatibility:
-# https://github.com/PyCQA/pyflakes/blob/master/NEWS.txt
-pyflakes < 2.0.0 ; python_version < '2.7'
-
-# pytest 3.3 drops Python 2.6 compatibility:
-# https://docs.pytest.org/en/latest/changelog.html#pytest-3-3-0-2017-11-23
-pytest < 3.3 ; python_version < '2.7'
-
-# pytest-cov 2.6.0 drops Python 3.4 compatibility:
-# https://pytest-cov.readthedocs.io/en/latest/changelog.html
-pytest-cov < 2.6.0 ; python_version < '3.5'
-
-# attrs 16.0.0 (used by pytest) drops Python 2.6 compatibility:
-# http://www.attrs.org/en/stable/changelog.html
-attrs < 16.0.0 ; python_version < '2.7'
-
-# pycparser < 2.19 drops Python 2.6 compatibility:
-# https://github.com/eliben/pycparser/blob/master/CHANGES
-pycparser < 2.19 ; python_version < '2.7'
-
-# idna 2.8 drops Python 2.6 compatibility (not documented).
-idna < 2.8 ; python_version < '2.7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/docs/api.rst 
new/humanfriendly-6.1/docs/api.rst
--- old/humanfriendly-4.18/docs/api.rst 2018-10-20 07:21:01.000000000 +0200
+++ new/humanfriendly-6.1/docs/api.rst  2020-02-09 16:35:00.000000000 +0100
@@ -28,68 +28,68 @@
 package in your project, make sure to at least pin the major version number in
 order to avoid unexpected surprises.
 
-The :mod:`humanfriendly` module
--------------------------------
+:mod:`humanfriendly`
+--------------------
 
 .. automodule:: humanfriendly
    :members:
 
-The :mod:`humanfriendly.cli` module
------------------------------------
+:mod:`humanfriendly.cli`
+------------------------
 
 .. automodule:: humanfriendly.cli
    :members:
 
-The :mod:`humanfriendly.compat` module
---------------------------------------
+:mod:`humanfriendly.compat`
+---------------------------
 
 .. automodule:: humanfriendly.compat
    :members:
 
-The :mod:`humanfriendly.decorators` module
-------------------------------------------
+:mod:`humanfriendly.decorators`
+-------------------------------
 
 .. automodule:: humanfriendly.decorators
    :members:
 
-The :mod:`humanfriendly.prompts` module
----------------------------------------
+:mod:`humanfriendly.prompts`
+----------------------------
 
 .. automodule:: humanfriendly.prompts
    :members:
 
-The :mod:`humanfriendly.sphinx` module
---------------------------------------
+:mod:`humanfriendly.sphinx`
+---------------------------
 
 .. automodule:: humanfriendly.sphinx
    :members:
 
-The :mod:`humanfriendly.tables` module
---------------------------------------
+:mod:`humanfriendly.tables`
+---------------------------
 
 .. automodule:: humanfriendly.tables
    :members:
 
-The :mod:`humanfriendly.terminal` module
-----------------------------------------
+:mod:`humanfriendly.terminal`
+-----------------------------
 
 .. automodule:: humanfriendly.terminal
    :members:
 
-The :mod:`humanfriendly.testing` module
----------------------------------------
+:mod:`humanfriendly.testing`
+----------------------------
 
 .. automodule:: humanfriendly.testing
    :members:
 
-The :mod:`humanfriendly.text` module
-------------------------------------
+:mod:`humanfriendly.text`
+-------------------------
 
 .. automodule:: humanfriendly.text
    :members:
 
-The :mod:`humanfriendly.usage` module
--------------------------------------
+:mod:`humanfriendly.usage`
+--------------------------
 
 .. automodule:: humanfriendly.usage
    :members:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/docs/conf.py 
new/humanfriendly-6.1/docs/conf.py
--- old/humanfriendly-4.18/docs/conf.py 2018-01-04 13:06:45.000000000 +0100
+++ new/humanfriendly-6.1/docs/conf.py  2020-02-06 01:08:58.000000000 +0100
@@ -31,8 +31,8 @@
 master_doc = 'index'
 
 # General information about the project.
-project = u'humanfriendly'
-copyright = u'2018, Peter Odding'
+project = 'humanfriendly'
+copyright = '2020, Peter Odding'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/__init__.py 
new/humanfriendly-6.1/humanfriendly/__init__.py
--- old/humanfriendly-4.18/humanfriendly/__init__.py    2019-02-21 
21:22:00.000000000 +0100
+++ new/humanfriendly-6.1/humanfriendly/__init__.py     2020-02-10 
22:22:15.000000000 +0100
@@ -1,7 +1,7 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: February 21, 2019
+# Last Change: February 10, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """The main module of the `humanfriendly` package."""
@@ -22,25 +22,78 @@
 # using characters like dashes and vertical bars to emulate borders. Since then
 # support for other tables has been added and the name of format_table() has
 # changed. The following import statement preserves backwards compatibility.
-from humanfriendly.tables import format_pretty_table as format_table  # NOQA
+from humanfriendly.tables import format_pretty_table as format_table
 
 # In humanfriendly 1.30 the following text manipulation functions were moved
 # out into a separate module to enable their usage in other modules of the
 # humanfriendly package (without causing circular imports).
-from humanfriendly.text import (  # NOQA
-    compact, concatenate, dedent, format, is_empty_line,
-    pluralize, tokenize, trim_empty_lines,
+from humanfriendly.text import (
+    compact,
+    concatenate,
+    dedent,
+    format,
+    is_empty_line,
+    pluralize,
+    tokenize,
+    trim_empty_lines,
 )
 
 # In humanfriendly 1.38 the prompt_for_choice() function was moved out into a
 # separate module because several variants of interactive prompts were added.
-from humanfriendly.prompts import prompt_for_choice  # NOQA
+from humanfriendly.prompts import prompt_for_choice
 
 # Compatibility with Python 2 and 3.
 from humanfriendly.compat import is_string, monotonic
 
+# Public identifiers that require documentation.
+__all__ = (
+    # Variables imported from other modules.
+    'compact',
+    'concatenate',
+    'dedent',
+    'format',
+    'format_table',
+    'is_empty_line',
+    'pluralize',
+    'prompt_for_choice',
+    'tokenize',
+    'trim_empty_lines',
+    # Variables defined in this module.
+    'AutomaticSpinner',
+    'CombinedUnit',
+    'InvalidDate',
+    'InvalidLength',
+    'InvalidSize',
+    'InvalidTimespan',
+    'SizeUnit',
+    'Spinner',
+    'Timer',
+    '__version__',
+    'coerce_boolean',
+    'coerce_pattern',
+    'coerce_seconds',
+    'disk_size_units',
+    'erase_line_code',
+    'format_length',
+    'format_number',
+    'format_path',
+    'format_size',
+    'format_timespan',
+    'hide_cursor_code',
+    'length_size_units',
+    'minimum_spinner_interval',
+    'parse_date',
+    'parse_length',
+    'parse_path',
+    'parse_size',
+    'parse_timespan',
+    'round_number',
+    'show_cursor_code',
+    'time_units',
+)
+
 # Semi-standard module versioning.
-__version__ = '4.18'
+__version__ = '6.1'
 
 # Spinners are redrawn at most this many seconds.
 minimum_spinner_interval = 0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/cli.py 
new/humanfriendly-6.1/humanfriendly/cli.py
--- old/humanfriendly-4.18/humanfriendly/cli.py 2018-05-10 11:56:00.000000000 
+0200
+++ new/humanfriendly-6.1/humanfriendly/cli.py  2020-02-09 16:35:00.000000000 
+0100
@@ -1,7 +1,7 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: January 14, 2018
+# Last Change: February 9, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
@@ -108,6 +108,21 @@
     warning,
 )
 
+# Public identifiers that require documentation.
+__all__ = (
+    'demonstrate_256_colors',
+    'demonstrate_ansi_formatting',
+    'main',
+    'print_formatted_length',
+    'print_formatted_number',
+    'print_formatted_size',
+    'print_formatted_table',
+    'print_formatted_timespan',
+    'print_parsed_length',
+    'print_parsed_size',
+    'run_command',
+)
+
 
 def main():
     """Command line interface for the ``humanfriendly`` program."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/prompts.py 
new/humanfriendly-6.1/humanfriendly/prompts.py
--- old/humanfriendly-4.18/humanfriendly/prompts.py     2017-06-29 
00:08:23.000000000 +0200
+++ new/humanfriendly-6.1/humanfriendly/prompts.py      2020-02-09 
16:35:00.000000000 +0100
@@ -3,7 +3,7 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: June 24, 2017
+# Last Change: February 9, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
@@ -31,6 +31,19 @@
 )
 from humanfriendly.text import format, concatenate
 
+# Public identifiers that require documentation.
+__all__ = (
+    'MAX_ATTEMPTS',
+    'TooManyInvalidReplies',
+    'logger',
+    'prepare_friendly_prompts',
+    'prepare_prompt_text',
+    'prompt_for_choice',
+    'prompt_for_confirmation',
+    'prompt_for_input',
+    'retry_limit',
+)
+
 MAX_ATTEMPTS = 10
 """The number of times an interactive prompt is shown on invalid input (an 
integer)."""
 
@@ -111,11 +124,14 @@
     :param choices: A sequence of strings with available options.
     :param default: The default choice if the user simply presses Enter
                     (expected to be a string, defaults to :data:`None`).
-    :param padding: Refer to the documentation of :func:`prompt_for_input()`.
+    :param padding: Refer to the documentation of
+                    :func:`~humanfriendly.prompts.prompt_for_input()`.
     :returns: The string corresponding to the user's choice.
     :raises: - :exc:`~exceptions.ValueError` if `choices` is an empty sequence.
-             - Any exceptions raised by :func:`retry_limit()`.
-             - Any exceptions raised by :func:`prompt_for_input()`.
+             - Any exceptions raised by
+               :func:`~humanfriendly.prompts.retry_limit()`.
+             - Any exceptions raised by
+               :func:`~humanfriendly.prompts.prompt_for_input()`.
 
     When no options are given an exception is raised:
 
@@ -133,12 +149,12 @@
     Here's what the actual prompt looks like by default:
 
     >>> prompt_for_choice(['first option', 'second option'])
-     <BLANKLINE>
+    <BLANKLINE>
       1. first option
       2. second option
-     <BLANKLINE>
+    <BLANKLINE>
      Enter your choice as a number or unique substring (Control-C aborts): 
second
-     <BLANKLINE>
+    <BLANKLINE>
     'second option'
 
     If you don't like the whitespace (empty lines and indentation):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/sphinx.py 
new/humanfriendly-6.1/humanfriendly/sphinx.py
--- old/humanfriendly-4.18/humanfriendly/sphinx.py      2018-04-25 
19:38:07.000000000 +0200
+++ new/humanfriendly-6.1/humanfriendly/sphinx.py       2020-02-10 
22:22:15.000000000 +0100
@@ -1,15 +1,16 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: February 17, 2016
+# Last Change: February 10, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
 Customizations for and integration with the Sphinx_ documentation generator.
 
-The :mod:`humanfriendly.sphinx` module uses the `Sphinx extension API`_ to
-customize the process of generating Sphinx based Python documentation.
-The most relevant functions to take a look at are :func:`setup()`,
+The :mod:`humanfriendly.sphinx` module uses the `Sphinx extension API`_
+to customize the process of generating Sphinx based Python documentation.
+The most relevant functions to take a look at for users of this module are
+:func:`setup()`, :func:`enable_man_role()`, :func:`enable_pypi_role()`,
 :func:`enable_special_methods()` and :func:`enable_usage_formatting()`.
 
 .. _Sphinx: http://www.sphinx-doc.org/
@@ -20,13 +21,129 @@
 import logging
 import types
 
+# External dependencies (if Sphinx is installed docutils will be installed).
+import docutils.nodes
+import docutils.utils
+
 # Modules included in our package.
 from humanfriendly.usage import USAGE_MARKER, render_usage
 
+# Public identifiers that require documentation.
+__all__ = (
+    'enable_man_role',
+    'enable_pypi_role',
+    'enable_special_methods',
+    'enable_usage_formatting',
+    'logger',
+    'man_role',
+    'pypi_role',
+    'setup',
+    'special_methods_callback',
+    'usage_message_callback',
+)
+
 # Initialize a logger for this module.
 logger = logging.getLogger(__name__)
 
 
+def enable_man_role(app):
+    """
+    Enable the ``:man:`` role for linking to Debian Linux manual pages.
+
+    :param app: The Sphinx application object.
+
+    This function registers the :func:`man_role()` function to handle the
+    ``:man:`` role.
+    """
+    app.add_role("man", man_role)
+
+
+def enable_pypi_role(app):
+    """
+    Enable the ``:pypi:`` role for linking to the Python Package Index.
+
+    :param app: The Sphinx application object.
+
+    This function registers the :func:`pypi_role()` function to handle the
+    ``:pypi:`` role.
+    """
+    app.add_role("pypi", pypi_role)
+
+
+def enable_special_methods(app):
+    """
+    Enable documenting "special methods" using the autodoc_ extension.
+
+    :param app: The Sphinx application object.
+
+    This function connects the :func:`special_methods_callback()` function to
+    ``autodoc-skip-member`` events.
+
+    .. _autodoc: http://www.sphinx-doc.org/en/stable/ext/autodoc.html
+    """
+    app.connect("autodoc-skip-member", special_methods_callback)
+
+
+def enable_usage_formatting(app):
+    """
+    Reformat human friendly usage messages to reStructuredText_.
+
+    :param app: The Sphinx application object (as given to ``setup()``).
+
+    This function connects the :func:`usage_message_callback()` function to
+    ``autodoc-process-docstring`` events.
+
+    .. _reStructuredText: https://en.wikipedia.org/wiki/ReStructuredText
+    """
+    app.connect("autodoc-process-docstring", usage_message_callback)
+
+
+def man_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
+    """
+    Convert a Linux manual topic to a hyperlink.
+
+    Using the ``:man:`` role is very simple, here's an example:
+
+    .. code-block:: rst
+
+        See the :man:`python` documentation.
+
+    This results in the following:
+
+      See the :man:`python` documentation.
+
+    As the example shows you can use the role inline, embedded in sentences of
+    text. In the generated documentation the ``:man:`` text is omitted and a
+    hyperlink pointing to the Debian Linux manual pages is emitted.
+    """
+    man_url = "https://manpages.debian.org/%s"; % text
+    reference = docutils.nodes.reference(rawtext, 
docutils.utils.unescape(text), refuri=man_url, **options)
+    return [reference], []
+
+
+def pypi_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
+    """
+    Generate hyperlinks to the Python Package Index.
+
+    Using the ``:pypi:`` role is very simple, here's an example:
+
+    .. code-block:: rst
+
+        See the :pypi:`humanfriendly` package.
+
+    This results in the following:
+
+      See the :pypi:`humanfriendly` package.
+
+    As the example shows you can use the role inline, embedded in sentences of
+    text. In the generated documentation the ``:pypi:`` text is omitted and a
+    hyperlink pointing to the Python Package Index is emitted.
+    """
+    pypi_url = "https://pypi.org/project/%s/"; % text
+    reference = docutils.nodes.reference(rawtext, 
docutils.utils.unescape(text), refuri=pypi_url, **options)
+    return [reference], []
+
+
 def setup(app):
     """
     Enable all of the provided Sphinx_ customizations.
@@ -49,31 +166,24 @@
        ]
 
     When Sphinx sees the :mod:`humanfriendly.sphinx` name it will import the
-    module and call its :func:`setup()` function.
+    module and call its :func:`setup()` function. This function will then call
+    the following:
 
-    At the time of writing this just calls :func:`enable_special_methods()` and
-    :func:`enable_usage_formatting()`, but of course more functionality may be
-    added at a later stage. If you don't like that idea you may be better of
-    calling the individual functions from your own ``setup()`` function.
+    - :func:`enable_man_role()`
+    - :func:`enable_pypi_role()`
+    - :func:`enable_special_methods()`
+    - :func:`enable_usage_formatting()`
+
+    Of course more functionality may be added at a later stage. If you don't
+    like that idea you may be better of calling the individual functions from
+    your own ``setup()`` function.
     """
+    enable_man_role(app)
+    enable_pypi_role(app)
     enable_special_methods(app)
     enable_usage_formatting(app)
 
 
-def enable_special_methods(app):
-    """
-    Enable documenting "special methods" using the autodoc_ extension.
-
-    :param app: The Sphinx application object.
-
-    This function connects the :func:`special_methods_callback()` function to
-    ``autodoc-skip-member`` events.
-
-    .. _autodoc: http://www.sphinx-doc.org/en/stable/ext/autodoc.html
-    """
-    app.connect('autodoc-skip-member', special_methods_callback)
-
-
 def special_methods_callback(app, what, name, obj, skip, options):
     """
     Enable documenting "special methods" using the autodoc_ extension.
@@ -93,26 +203,12 @@
     The parameters expected by this function are those defined for Sphinx event
     callback functions (i.e. I'm not going to document them here :-).
     """
-    if getattr(obj, '__doc__', None) and isinstance(obj, (types.FunctionType, 
types.MethodType)):
+    if getattr(obj, "__doc__", None) and isinstance(obj, (types.FunctionType, 
types.MethodType)):
         return False
     else:
         return skip
 
 
-def enable_usage_formatting(app):
-    """
-    Reformat human friendly usage messages to reStructuredText_.
-
-    :param app: The Sphinx application object (as given to ``setup()``).
-
-    This function connects the :func:`usage_message_callback()` function to
-    ``autodoc-process-docstring`` events.
-
-    .. _reStructuredText: https://en.wikipedia.org/wiki/ReStructuredText
-    """
-    app.connect('autodoc-process-docstring', usage_message_callback)
-
-
 def usage_message_callback(app, what, name, obj, options, lines):
     """
     Reformat human friendly usage messages to reStructuredText_.
@@ -135,7 +231,7 @@
         # Make sure we only modify docstrings containing a usage message.
         if lines[0].startswith(USAGE_MARKER):
             # Convert the usage message to reStructuredText.
-            text = render_usage('\n'.join(lines))
+            text = render_usage("\n".join(lines))
             # Clear the existing line buffer.
             while lines:
                 lines.pop()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/tables.py 
new/humanfriendly-6.1/humanfriendly/tables.py
--- old/humanfriendly-4.18/humanfriendly/tables.py      2018-03-28 
23:18:34.000000000 +0200
+++ new/humanfriendly-6.1/humanfriendly/tables.py       2020-02-06 
01:08:58.000000000 +0100
@@ -1,7 +1,7 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: March 25, 2018
+# Last Change: February 6, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
@@ -152,7 +152,7 @@
       .. image:: images/pretty-table.png
     """
     # Normalize the input because we'll have to iterate it more than once.
-    data = [normalize_columns(r) for r in data]
+    data = [normalize_columns(r, expandtabs=True) for r in data]
     if column_names is not None:
         column_names = normalize_columns(column_names)
         if column_names:
@@ -326,8 +326,14 @@
     return '\n'.join('  '.join(r) for r in data)
 
 
-def normalize_columns(row):
-    return [coerce_string(c) for c in row]
+def normalize_columns(row, expandtabs=False):
+    results = []
+    for value in row:
+        text = coerce_string(value)
+        if expandtabs:
+            text = text.expandtabs()
+        results.append(text)
+    return results
 
 
 def highlight_column_name(name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/terminal.py 
new/humanfriendly-6.1/humanfriendly/terminal.py
--- old/humanfriendly-4.18/humanfriendly/terminal.py    2018-08-02 
19:35:18.000000000 +0200
+++ new/humanfriendly-6.1/humanfriendly/terminal.py     2020-02-09 
16:35:00.000000000 +0100
@@ -1,7 +1,7 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: August 2, 2018
+# Last Change: February 9, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
@@ -42,6 +42,42 @@
 from humanfriendly.text import compact_empty_lines, concatenate, format
 from humanfriendly.usage import find_meta_variables, format_usage  # NOQA
 
+# Public identifiers that require documentation.
+__all__ = (
+    'ANSI_COLOR_CODES',
+    'ANSI_CSI',
+    'ANSI_ERASE_LINE',
+    'ANSI_RESET',
+    'ANSI_SGR',
+    'ANSI_TEXT_STYLES',
+    'CLEAN_OUTPUT_PATTERN',
+    'DEFAULT_COLUMNS',
+    'DEFAULT_ENCODING',
+    'DEFAULT_LINES',
+    'HIGHLIGHT_COLOR',
+    'HTMLConverter',
+    'ansi_strip',
+    'ansi_style',
+    'ansi_width',
+    'ansi_wrap',
+    'auto_encode',
+    'clean_terminal_output',
+    'connected_to_terminal',
+    'find_terminal_size',
+    'find_terminal_size_using_ioctl',
+    'find_terminal_size_using_stty',
+    'get_pager_command',
+    'html_to_ansi',
+    'message',
+    'output',
+    'readline_strip',
+    'readline_wrap',
+    'show_pager',
+    'terminal_supports_colors',
+    'usage',
+    'warning',
+)
+
 ANSI_CSI = '\x1b['
 """The ANSI "Control Sequence Introducer" (a string)."""
 
@@ -357,13 +393,13 @@
     (0x0D) and line feed (0x0A) characters and the ANSI 'erase line' escape
     sequence on interactive terminals. It's intended to clean up command output
     that was originally meant to be rendered on an interactive terminal and
-    that has been captured using e.g. the script_ program [#]_ or the
+    that has been captured using e.g. the :man:`script` program [#]_ or the
     :mod:`pty` module [#]_.
 
     .. [#] My coloredlogs_ package supports the ``coloredlogs --to-html``
-           command which uses script_ to fool a subprocess into thinking that
-           it's connected to an interactive terminal (in order to get it to
-           emit ANSI escape sequences).
+           command which uses :man:`script` to fool a subprocess into thinking
+           that it's connected to an interactive terminal (in order to get it
+           to emit ANSI escape sequences).
 
     .. [#] My capturer_ package uses the :mod:`pty` module to fool the current
            process and subprocesses into thinking they are connected to an
@@ -386,7 +422,6 @@
 
     .. _capturer: https://pypi.python.org/pypi/capturer
     .. _coloredlogs: https://pypi.python.org/pypi/coloredlogs
-    .. _script: http://man7.org/linux/man-pages/man1/script.1.html
     """
     cleaned_lines = []
     current_line = ''
@@ -617,21 +652,20 @@
 
     If the given text contains ANSI escape sequences the command ``less
     --RAW-CONTROL-CHARS`` is used, otherwise the environment variable
-    ``$PAGER`` is used (if ``$PAGER`` isn't set less_ is used).
-
-    When the selected pager is less_, the following options are used to make
-    the experience more user friendly:
-
-    - ``--quit-if-one-screen`` causes less_ to automatically exit if the entire
-      text can be displayed on the first screen. This makes the use of a pager
-      transparent for smaller texts (because the operator doesn't have to quit
-      the pager).
+    ``$PAGER`` is used (if ``$PAGER`` isn't set :man:`less` is used).
 
-    - ``--no-init`` prevents less_ from clearing the screen when it exits. This
-      ensures that the operator gets a chance to review the text (for example a
-      usage message) after quitting the pager, while composing the next 
command.
+    When the selected pager is :man:`less`, the following options are used to
+    make the experience more user friendly:
 
-    .. _less: http://man7.org/linux/man-pages/man1/less.1.html
+    - ``--quit-if-one-screen`` causes :man:`less` to automatically exit if the
+      entire text can be displayed on the first screen. This makes the use of a
+      pager transparent for smaller texts (because the operator doesn't have to
+      quit the pager).
+
+    - ``--no-init`` prevents :man:`less` from clearing the screen when it
+      exits. This ensures that the operator gets a chance to review the text
+      (for example a usage message) after quitting the pager, while composing
+      the next command.
     """
     # Compose the pager command.
     if text and ANSI_CSI in text:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/testing.py 
new/humanfriendly-6.1/humanfriendly/testing.py
--- old/humanfriendly-4.18/humanfriendly/testing.py     2017-08-07 
22:55:14.000000000 +0200
+++ new/humanfriendly-6.1/humanfriendly/testing.py      2020-02-09 
16:35:00.000000000 +0100
@@ -1,7 +1,7 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: July 16, 2017
+# Last Change: February 9, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
@@ -206,7 +206,7 @@
 
 def touch(filename):
     """
-    The equivalent of the UNIX ``touch`` program in Python.
+    The equivalent of the UNIX :man:`touch` program in Python.
 
     :param filename: The pathname of the file to touch (a string).
 
@@ -464,17 +464,21 @@
     This class extends the functionality of :class:`CustomSearchPath`.
     """
 
-    def __init__(self, name, returncode=0):
+    def __init__(self, name, returncode=0, script=None):
         """
         Initialize a :class:`MockedProgram` object.
 
         :param name: The name of the program (a string).
         :param returncode: The return code that the program should emit (a
                            number, defaults to zero).
+        :param script: Shell script code to include in the mocked program (a
+                       string or :data:`None`). This can be used to mock a
+                       program that is expected to generate specific output.
         """
         # Initialize our own instance variables.
         self.program_name = name
         self.program_returncode = returncode
+        self.program_script = script
         self.program_signal_file = None
         # Initialize our superclasses.
         super(MockedProgram, self).__init__()
@@ -492,6 +496,8 @@
         with open(pathname, 'w') as handle:
             handle.write('#!/bin/sh\n')
             handle.write('echo > %s\n' % pipes.quote(self.program_signal_file))
+            if self.program_script:
+                handle.write('%s\n' % self.program_script.strip())
             handle.write('exit %i\n' % self.program_returncode)
         os.chmod(pathname, 0o755)
         return directory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/tests.py 
new/humanfriendly-6.1/humanfriendly/tests.py
--- old/humanfriendly-4.18/humanfriendly/tests.py       2019-02-21 
21:22:00.000000000 +0100
+++ new/humanfriendly-6.1/humanfriendly/tests.py        2020-02-10 
22:22:15.000000000 +0100
@@ -4,7 +4,7 @@
 # Tests for the `humanfriendly' package.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: February 21, 2019
+# Last Change: February 10, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """Test suite for the `humanfriendly` package."""
@@ -33,6 +33,8 @@
     prompt_for_input,
 )
 from humanfriendly.sphinx import (
+    man_role,
+    pypi_role,
     setup,
     special_methods_callback,
     usage_message_callback,
@@ -136,10 +138,20 @@
     def test_mocked_program(self):
         """Test :class:`humanfriendly.testing.MockedProgram`."""
         name = random_string()
-        with MockedProgram(name=name, returncode=42) as directory:
+        script = dedent('''
+            # This goes to stdout.
+            tr a-z A-Z
+            # This goes to stderr.
+            echo Fake warning >&2
+        ''')
+        with MockedProgram(name=name, returncode=42, script=script) as 
directory:
             assert os.path.isdir(directory)
             assert os.path.isfile(os.path.join(directory, name))
-            assert subprocess.call(name) == 42
+            program = subprocess.Popen(name, stdin=subprocess.PIPE, 
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+            stdout, stderr = program.communicate(input=b'hello world\n')
+            assert program.returncode == 42
+            assert stdout == b'HELLO WORLD\n'
+            assert stderr == b'Fake warning\n'
 
     def test_temporary_directory(self):
         """Test :class:`humanfriendly.testing.TemporaryDirectory`."""
@@ -1237,6 +1249,7 @@
 
             def __init__(self):
                 self.callbacks = {}
+                self.roles = {}
 
             def __documented_special_method__(self):
                 """Documented unofficial special method."""
@@ -1246,6 +1259,9 @@
                 # Intentionally not documented :-).
                 pass
 
+            def add_role(self, name, callback):
+                self.roles[name] = callback
+
             def connect(self, event, callback):
                 self.callbacks.setdefault(event, []).append(callback)
 
@@ -1256,6 +1272,8 @@
         # Test event callback registration.
         fake_app = FakeApp()
         setup(fake_app)
+        assert man_role == fake_app.roles['man']
+        assert pypi_role == fake_app.roles['pypi']
         assert special_methods_callback in 
fake_app.callbacks['autodoc-skip-member']
         assert usage_message_callback in 
fake_app.callbacks['autodoc-process-docstring']
         # Test that `special methods' which are documented aren't skipped.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly/text.py 
new/humanfriendly-6.1/humanfriendly/text.py
--- old/humanfriendly-4.18/humanfriendly/text.py        2019-02-21 
21:22:00.000000000 +0100
+++ new/humanfriendly-6.1/humanfriendly/text.py 2020-02-09 16:35:00.000000000 
+0100
@@ -1,7 +1,7 @@
 # Human friendly input/output in Python.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: February 21, 2019
+# Last Change: February 9, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
@@ -34,6 +34,7 @@
     'concatenate',
     'dedent',
     'format',
+    'generate_slug',
     'is_empty_line',
     'join_lines',
     'pluralize',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/humanfriendly.egg-info/PKG-INFO 
new/humanfriendly-6.1/humanfriendly.egg-info/PKG-INFO
--- old/humanfriendly-4.18/humanfriendly.egg-info/PKG-INFO      2019-02-21 
21:22:20.000000000 +0100
+++ new/humanfriendly-6.1/humanfriendly.egg-info/PKG-INFO       2020-02-10 
22:22:42.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: humanfriendly
-Version: 4.18
+Version: 6.1
 Summary: Human friendly output for text interfaces using Python
 Home-page: https://humanfriendly.readthedocs.io
 Author: Peter Odding
@@ -31,9 +31,9 @@
           friendly rendering of usage messages and querying the terminal for 
its
           size.
         
-        The `humanfriendly` package is currently tested on Python 2.6, 2.7, 
3.4, 3.5,
-        3.6, 3.7 and PyPy (2.7) on Linux and Mac OS X. While the intention is 
to
-        support Windows as well, you may encounter some rough edges.
+        The `humanfriendly` package is currently tested on Python 2.7, 3.4, 
3.5, 3.6,
+        3.7 and PyPy (2.7) on Linux and Mac OS X. While the intention is to 
support
+        Windows as well, you may encounter some rough edges.
         
         .. contents::
            :local:
@@ -144,7 +144,7 @@
         
         This software is licensed under the `MIT license`_.
         
-        © 2018 Peter Odding.
+        © 2020 Peter Odding.
         
         .. External references:
         .. _#4: https://github.com/xolox/python-humanfriendly/issues/4
@@ -169,7 +169,6 @@
 Classifier: Natural Language :: English
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/humanfriendly-4.18/humanfriendly.egg-info/SOURCES.txt 
new/humanfriendly-6.1/humanfriendly.egg-info/SOURCES.txt
--- old/humanfriendly-4.18/humanfriendly.egg-info/SOURCES.txt   2019-02-21 
21:22:20.000000000 +0100
+++ new/humanfriendly-6.1/humanfriendly.egg-info/SOURCES.txt    2020-02-10 
22:22:42.000000000 +0100
@@ -2,7 +2,6 @@
 LICENSE.txt
 MANIFEST.in
 README.rst
-constraints.txt
 requirements-checks.txt
 requirements-tests.txt
 requirements-travis.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/requirements-tests.txt 
new/humanfriendly-6.1/requirements-tests.txt
--- old/humanfriendly-4.18/requirements-tests.txt       2018-10-20 
07:21:01.000000000 +0200
+++ new/humanfriendly-6.1/requirements-tests.txt        2020-02-06 
01:08:58.000000000 +0100
@@ -1,5 +1,6 @@
 # Test suite requirements.
 capturer >= 2.1
 coloredlogs >= 2.0
+docutils >= 0.15
 pytest >= 3.0.7
 pytest-cov >= 2.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/humanfriendly-4.18/setup.py 
new/humanfriendly-6.1/setup.py
--- old/humanfriendly-4.18/setup.py     2018-10-20 07:21:01.000000000 +0200
+++ new/humanfriendly-6.1/setup.py      2020-02-06 01:08:58.000000000 +0100
@@ -3,7 +3,7 @@
 # Setup script for the `humanfriendly' package.
 #
 # Author: Peter Odding <[email protected]>
-# Last Change: October 20, 2018
+# Last Change: February 6, 2020
 # URL: https://humanfriendly.readthedocs.io
 
 """
@@ -130,7 +130,6 @@
         'Natural Language :: English',
         'Programming Language :: Python',
         'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.4',


Reply via email to