pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/py-structlog py-structlog: updated to 21.2.0
details: https://anonhg.NetBSD.org/pkgsrc/rev/59e80f8c0743
branches: trunk
changeset: 768592:59e80f8c0743
user: adam <adam%pkgsrc.org@localhost>
date: Tue Oct 26 17:29:40 2021 +0000
description:
py-structlog: updated to 21.2.0
21.2.0 (2021-10-12)
-------------------
Backward-incompatible changes:
- To implement pretty exceptions (see Changes below), ``structlog.dev.ConsoleRenderer`` now formats exceptions itself.
Make sure to remove ``format_exc_info`` from your processor chain if you configure ``structlog`` manually.
This change is not really breaking, because the old use-case will keep working as before.
However if you pass ``pretty_exceptions=True`` (which is the default if either ``rich`` or ``better-exceptions`` is installed), a warning will be raised and the exception will be renderered without
prettyfication.
Changes:
- ``structlog`` is now importable if ``sys.stdout`` is ``None`` (e.g. when running using ``pythonw``).
- ``structlog.threadlocal.get_threadlocal()`` and ``structlog.contextvars.get_contextvars()`` can now be used to get a copy of the current thread-local/context-local context that has been bound using
``structlog.threadlocal.bind_threadlocal()`` and ``structlog.contextvars.bind_contextvars()``.
- ``structlog.threadlocal.get_merged_threadlocal(bl)`` and ``structlog.contextvars.get_merged_contextvars(bl)`` do the same, but also merge the context from a bound logger *bl*.
Same pull requests as previous change.
- ``structlog.contextvars.bind_contextvars()`` now returns a mapping of keys to ``contextvars.Token``\s, allowing you to reset values using the new ``structlog.contextvars.reset_contextvars()``.
- Exception rendering in ``structlog.dev.ConsoleLogger`` is now configurable using the ``exception_formatter`` setting.
If either the `rich <https://github.com/willmcgugan/rich>`_ or the `better-exceptions <https://github.com/qix-/better-exceptions>`_ package is present, ``structlog`` will use them for
pretty-printing tracebacks.
``rich`` takes precedence over ``better-exceptions`` if both are present.
This only works if ``format_exc_info`` is **absent** in the processor chain.
- All use of ``colorama`` on non-Windows systems has been excised.
Thus, colors are now enabled by default in ``structlog.dev.ConsoleRenderer`` on non-Windows systems.
You can keep using ``colorama`` to customize colors, of course.
- The final processor can now return a ``bytearray`` (additionally to ``str`` and ``bytes``).
diffstat:
sysutils/py-structlog/Makefile | 4 ++--
sysutils/py-structlog/distinfo | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (25 lines):
diff -r 97e9b262f558 -r 59e80f8c0743 sysutils/py-structlog/Makefile
--- a/sysutils/py-structlog/Makefile Tue Oct 26 17:27:29 2021 +0000
+++ b/sysutils/py-structlog/Makefile Tue Oct 26 17:29:40 2021 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.12 2021/05/14 08:22:34 adam Exp $
+# $NetBSD: Makefile,v 1.13 2021/10/26 17:29:40 adam Exp $
-DISTNAME= structlog-21.1.0
+DISTNAME= structlog-21.2.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= sysutils python
MASTER_SITES= ${MASTER_SITE_PYPI:=s/structlog/}
diff -r 97e9b262f558 -r 59e80f8c0743 sysutils/py-structlog/distinfo
--- a/sysutils/py-structlog/distinfo Tue Oct 26 17:27:29 2021 +0000
+++ b/sysutils/py-structlog/distinfo Tue Oct 26 17:29:40 2021 +0000
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.13 2021/10/26 11:20:05 nia Exp $
+$NetBSD: distinfo,v 1.14 2021/10/26 17:29:40 adam Exp $
-BLAKE2s (structlog-21.1.0.tar.gz) = 114ce99b247505db348194149b4083e6b8c535868c3c175a06ac23c2ead8812c
-SHA512 (structlog-21.1.0.tar.gz) = 1540dc8c3682bb428fe64bbc9494eaf59b78a49c13ae4de1338e0bfbb2f4e70a00aab7aa8c45008879087deb0c8cef5412d5323292d5f968c8d613cb74f40802
-Size (structlog-21.1.0.tar.gz) = 371729 bytes
+BLAKE2s (structlog-21.2.0.tar.gz) = c411b5f0c2fb0cc1b30ccd1bed6cfadd7f3e5f7d35dca5bfa154fd0c8bf8cde3
+SHA512 (structlog-21.2.0.tar.gz) = 30fe54b07e8d860e990d78292bc17a946995f5817eabeed62126ae34a823da313ac88ce95493ef1eb2cd20d092994472399f6578f99b565b640b10ea264b82bb
+Size (structlog-21.2.0.tar.gz) = 449863 bytes
Home |
Main Index |
Thread Index |
Old Index