Humanfriendly

Latest version: v10.0

Safety actively analyzes 629678 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 23

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 😉.

.. _Release 6.1: https://github.com/xolox/python-humanfriendly/compare/6.0...6.1

6.0

---------------------------

**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

5.0

---------------------------

- 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

4.18

----------------------------

- Added :func:`humanfriendly.text.generate_slug()` function.

- Fixed "invalid escape sequence" DeprecationWarning (pointed out by Python >= 3.6).

- Fought Travis CI (for way too long) in order to restore Python 2.6, 2.7, 3.4,
3.5, 3.6 and 3.7 compatibility in the Travis CI configuration (unrelated to
the ``humanfriendly`` package itself).

.. _Release 4.18: https://github.com/xolox/python-humanfriendly/compare/4.17...4.18

4.17

----------------------------

- Add Python 3.7 to versions tested on Travis CI and using ``tox`` and document
compatibility with Python 3.7.

- Add rudimentary caching decorator for functions:

Over the years I've used several variations on this function in multiple
projects and I'd like to consolidate all of those implementations into a
single one that's properly tested and documented.

Due to the simplicity and lack of external dependencies it seemed kind of
fitting to include this in the ``humanfriendly`` package, which has become
a form of extended standard library for my Python projects 😇.

.. _Release 4.17: https://github.com/xolox/python-humanfriendly/compare/4.16.1...4.17

4.16.1

------------------------------

Yet another ANSI to HTML improvement: Emit an ANSI reset code before emitting
ANSI escape sequences that change styles, so that previously activated styles
don't inappropriately "leak through" to the text that follows.

.. _Release 4.16.1: https://github.com/xolox/python-humanfriendly/compare/4.16...4.16.1

Page 3 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.