I am pleased to announce the release of *ycecrean* 1.3.5.

Do you ever use `print()` or `log()` to debug your code? If so,  *ycecream*,
or `y` for short, will make printing debug information a lot sweeter.
And on top of that, you get some basic benchmarking functionality.

*Ycecream* is available on GitHub: www.github.com/salabim/ycecream and on
PyPI.

For this who know the *icecream* package, here's an overview of the
differences:

----------------------------------------------------------------------------------------
characteristic                    ycecream                 IceCream
----------------------------------------------------------------------------------------
colourize                         no                       yes (can be
disabled)
platform                          Python 2.7, >=3.6, PyPy  Python 2.7,
>=3.5, PyPy
default name                      y                        ic
dependencies                      none                     many
number of files                   1                        several
usable without installation       yes                      no
can be used as a decorator        yes                      no
can be used as a context manager  yes                      no
PEP8 (Pythonic) API               yes                      no
sorts dicts                       no by default, optional  yes
supports compact, indent and
depth parameters of pprint        yes                      no
use from a REPL                   limited functionality    no
external configuration            via json file            no
observes line_length correctly    yes                      no
indentation                       4 blanks (overridable)   dependent on
length of prefix
forking and cloning               yes                      no
test script                       pytest                   unittest
----------------------------------------------------------------------------------------

Recent changes:

version 1.3.5  2021-04-20
=========================
New functionality (0)
---------------------
The attribute delta can now be used as an ordinary attribute,
including propagation and initialization from json.

New tests (0)
-------------
Tests for propagation of attributes added.
Tests for delta setting/reading added.

Bugfix (0)
----------
The recently introduced show_traceback facility didn't work under Python
2.7. Fixed.

version 1.3.4  2021-04-16
=========================
New functionality (0)
---------------------
Introduced a new attribute: show_traceback / st .

When show_traceback is True, the ordinary output of y() will be followed by
a printout of the
traceback, similar to an error traceback.

    from ycecream import y
    y.show_traceback=True
    def x():
        y()

    x()
    x()
prints
    y| #4 in x()
        Traceback (most recent call last)
        File "c:\Users\Ruud\Dropbox (Personal)\Apps\Python
Ruud\ycecream\x.py", line 6, in <module>
            x()
        File "c:\Users\Ruud\Dropbox (Personal)\Apps\Python
Ruud\ycecream\x.py", line 4, in x
            y()
    y| #4 in x()
        Traceback (most recent call last)
        File "c:\Users\Ruud\Dropbox (Personal)\Apps\Python
Ruud\ycecream\x.py", line 7, in <module>
            x()
        File "c:\Users\Ruud\Dropbox (Personal)\Apps\Python
Ruud\ycecream\x.py", line 4, in x
            y()

The show_traceback functionality is also available when y is used as a
decorator or context manager.

Documentation change (0)
------------------------
The description of ycecream on PyPI is now (nearly) the same as the
readme.md file.

version 1.3.3  2021-04-14
=========================
New functionality (0)
---------------------
Introduced a new attribute: enforce_line_length / ell .
If True, all output lines will be truncated to the current line_length.
This holds for all output lines, including as_str output.
Example:
    y.configure(enforce_line_length=True, line_length=15)
    s = "abcdefghijklmnopqrstuvwxyz"
    y(s)
    y(show_time=True)
prints something like
    |y|
    |    s: 'abcdefg
    |y| #35 @ 08:14:

New functionality (0)
---------------------
New shorthand alternatives:
    sdi  for sort_dicts
    i    for indent
    de   for depth
    wi   for wrap_indent
    ell  for enforce_line_length

version 1.3.2  2021-04-07
=========================
New functionality (0)
---------------------
y.new() has a new parameter ignore_json that makes it possible to ignore
the ycecream.json file.
Thus, if you don't want to use any attributes that are overridden by an
ycecream.json file:
    y = y.new(ignore_json=True)

Internal changes (0)
--------------------
The PY2/PY3 specific code is clustered now to make maintenance easier.
In the pprint 3.8 module, the PrettyPrinter class is not even created for
PY2,
so no more need to disable specifically several dispatch calls.


version 1.3.1  2021-04-02
=========================
New functionality (0)
---------------------
The ycecream.json file may now also contain shorthand names,
like p for prefix.

New functionality (1)
---------------------
The attribute compact now has a shorthand name: c
So,
    y(d, compact=True)
is equivalent to
    y(d, c=1)

Changes in install ycecream.py (0)
----------------------------------
install ycecream.py will now also copy ycecream.json to site-packages, if
present.


Older versions of Python support (0)
------------------------------------
Ycecream now runs also under Python 2.7.
The implementation required a lot of changes, most notably phasing out
pathlib, f-strings,
some syntax incompatibilities and function signatures.
Under Python 2.7, the compact and sort_dicts attributes are ignored as the
2.7 version of
pprint.pformat (which is imported) does not support these parameters.

Also, the test script needed a lot of changes to be compatible with Python
2.7 and Python 3.x

Under Python 2.7, the scripts
    install ycecream.py
and
    install ycecream from github.py
require pathlib to be installed.

It is most likely that ycecream will run under Python 3.4 and 3.5, but that
has not been tested (yet).
_______________________________________________
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com

Reply via email to