From 1f3a44974bd15d05b4a43a54dbbb421a1633e0f7e04ea4a7c01d9c4393ce703d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 16 Oct 2021 09:24:14 +0000 Subject: [PATCH] Accepting request 925035 from home:jubalh:branches:devel:languages:python - Update to 21.2.0: Highlights: * Support for for beautiful (and helpful!) exceptions by integrating ConsoleRenderer with rich or better-exceptions. * Helpers to access thread-local and context-local context. * Deeper contextvars support. 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). #313 * 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(). #331 #337 * 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.Tokens, allowing you to reset values using the new structlog.contextvars.reset_contextvars(). #339 OBS-URL: https://build.opensuse.org/request/show/925035 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-structlog?expand=0&rev=11 --- 21.1.0.tar.gz | 3 --- 21.2.0.tar.gz | 3 +++ python-structlog.changes | 47 ++++++++++++++++++++++++++++++++++++++++ python-structlog.spec | 2 +- 4 files changed, 51 insertions(+), 4 deletions(-) delete mode 100644 21.1.0.tar.gz create mode 100644 21.2.0.tar.gz diff --git a/21.1.0.tar.gz b/21.1.0.tar.gz deleted file mode 100644 index 8c606a9..0000000 --- a/21.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd70dfe65c2c1b0bcbb25ad21434672b48b9c1debc6714ff9c4457640127143e -size 362767 diff --git a/21.2.0.tar.gz b/21.2.0.tar.gz new file mode 100644 index 0000000..c59bbca --- /dev/null +++ b/21.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23b3bf23bfd3f70b88b23698e43b826787dd25bd4b17cb61e15e643deb2a895e +size 441051 diff --git a/python-structlog.changes b/python-structlog.changes index 4f46825..36ff7ce 100644 --- a/python-structlog.changes +++ b/python-structlog.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Wed Oct 13 08:36:18 UTC 2021 - Michael Vetter + +- Update to 21.2.0: + Highlights: + * Support for for beautiful (and helpful!) exceptions by integrating + ConsoleRenderer with rich or better-exceptions. + * Helpers to access thread-local and context-local context. + * Deeper contextvars support. + 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). #313 + * 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(). #331 #337 + * 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.Tokens, allowing you to reset values using the + new structlog.contextvars.reset_contextvars(). #339 + * Exception rendering in structlog.dev.ConsoleLogger is now configurable + using the exception_formatter setting. If either the rich or the + 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. + #330 #349 + * 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. #345 + * The final processor can now return a bytearray (additionally to str + and bytes). #344 + ------------------------------------------------------------------- Fri Feb 19 08:07:55 UTC 2021 - Michael Vetter diff --git a/python-structlog.spec b/python-structlog.spec index 56e58d9..72d90b2 100644 --- a/python-structlog.spec +++ b/python-structlog.spec @@ -20,7 +20,7 @@ # because of acyncio for tests %define skip_python2 1 Name: python-structlog -Version: 21.1.0 +Version: 21.2.0 Release: 0 Summary: Structured Logging for Python License: Apache-2.0 OR MIT