From dd47a1bbf337f1419a6ae24b412dcfabf8451c835d14ab5e565c832b1d484f8d Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Mon, 4 Jan 2021 11:21:11 +0000 Subject: [PATCH] =?UTF-8?q?-=20Update=20to=2020.2.0:=20=20=20Backward-inco?= =?UTF-8?q?mpatible=20changes:=20=20=20*=20Python=202.7=20and=203.5=20aren?= =?UTF-8?q?'t=20supported=20anymore.=20The=20package=20meta=20=20=20=20=20?= =?UTF-8?q?data=20should=20ensure=20that=20you=20keep=20getting=2020.1.0?= =?UTF-8?q?=20on=20those=20versions.=20#244=20=20=20*=20structlog=20is=20n?= =?UTF-8?q?ow=20fully=20type-annotated.=20This=20won't=20break=20your=20?= =?UTF-8?q?=20=20=20=20applications,=20but=20if=20you=20use=20Mypy,=20it?= =?UTF-8?q?=20will=20most=20likely=20break=20your=20CI.=20=20=20Deprecatio?= =?UTF-8?q?ns:=20=20=20*=20Accessing=20the=20=5Fcontext=20attribute=20of?= =?UTF-8?q?=20a=20bound=20logger=20is=20now=20deprecated.=20=20=20=20=20Pl?= =?UTF-8?q?ease=20use=20the=20new=20structlog.get=5Fcontext().=20=20=20Cha?= =?UTF-8?q?nges:=20=20=20*=20structlog=20has=20now=20type=20hints=20for=20?= =?UTF-8?q?all=20of=20its=20APIs!=20Since=20structlog=20=20=20=20=20is=20h?= =?UTF-8?q?ighly=20dynamic=20and=20configurable,=20this=20led=20to=20a=20f?= =?UTF-8?q?ew=20concessions=20=20=20=20=20like=20a=20specialized=20structl?= =?UTF-8?q?og.stdlib.get=5Flogger()=20whose=20only=20difference=20=20=20?= =?UTF-8?q?=20=20to=20structlog.get=5Flogger()=20is=20that=20it=20has=20th?= =?UTF-8?q?e=20correct=20type=20hints.=20=20=20=20=20We=20consider=20them?= =?UTF-8?q?=20provisional=20for=20the=20time=20being=20=E2=80=93=20i.e.=20?= =?UTF-8?q?the=20backward=20=20=20=20=20compatibility=20does=20not=20apply?= =?UTF-8?q?=20to=20them=20in=20its=20full=20strength=20until=20we=20=20=20?= =?UTF-8?q?=20=20feel=20we=20got=20it=20right.=20Please=20feel=20free=20to?= =?UTF-8?q?=20provide=20feedback!=20#223,=20#282=20=20=20*=20Added=20struc?= =?UTF-8?q?tlog.make=5Ffiltering=5Flogger=20that=20can=20be=20used=20like?= =?UTF-8?q?=20=20=20=20=20configure(wrapper=5Fclass=3Dmake=5Ffiltering=5Fb?= =?UTF-8?q?ound=5Flogger(logging.INFO)).=20=20=20=20=20It=20creates=20a=20?= =?UTF-8?q?highly=20optimized=20bound=20logger=20whose=20inactive=20method?= =?UTF-8?q?s=20=20=20=20=20only=20consist=20of=20a=20return=20None.=20This?= =?UTF-8?q?=20is=20now=20also=20the=20default=20logger.=20=20=20*=20As=20a?= =?UTF-8?q?=20complement,=20structlog.stdlib.add=5Flog=5Flevel()=20can=20n?= =?UTF-8?q?ow=20=20=20=20=20additionally=20be=20imported=20as=20structlog.?= =?UTF-8?q?processors.add=5Flog=5Flevel=20=20=20=20=20since=20it=20just=20?= =?UTF-8?q?adds=20the=20method=20name=20to=20the=20event=20dict.=20=20=20*?= =?UTF-8?q?=20structlog.processors.add=5Flog=5Flevel()=20is=20now=20part?= =?UTF-8?q?=20of=20the=20default=20configuration.=20=20=20*=20structlog.st?= =?UTF-8?q?dlib.ProcessorFormatter=20no=20longer=20uses=20exceptions=20for?= =?UTF-8?q?=20=20=20=20=20control=20flow,=20allowing=20foreign=5Fpre=5Fcha?= =?UTF-8?q?in=20processors=20to=20use=20=20=20=20=20sys.exc=5Finfo()=20to?= =?UTF-8?q?=20access=20the=20real=20exception.=20=20=20*=20Added=20structl?= =?UTF-8?q?og.BytesLogger=20to=20avoid=20unnecessary=20encoding=20round=20?= =?UTF-8?q?trips.=20=20=20=20=20Concretely=20this=20is=20useful=20with=20o?= =?UTF-8?q?rjson=20which=20returns=20bytes.=20#271?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-structlog?expand=0&rev=7 --- 20.1.0.tar.gz | 3 --- 20.2.0.tar.gz | 3 +++ python-structlog.changes | 42 ++++++++++++++++++++++++++++++++++++++++ python-structlog.spec | 4 ++-- 4 files changed, 47 insertions(+), 5 deletions(-) delete mode 100644 20.1.0.tar.gz create mode 100644 20.2.0.tar.gz diff --git a/20.1.0.tar.gz b/20.1.0.tar.gz deleted file mode 100644 index 7bb36f5..0000000 --- a/20.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e4f4e672cd8586cfbb96a6e62cb423f563dfa98f29364a4074e2520b2f6b394 -size 324210 diff --git a/20.2.0.tar.gz b/20.2.0.tar.gz new file mode 100644 index 0000000..52a53ad --- /dev/null +++ b/20.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cca0471d84b05beb62894f5f51bd139134bd54077109cdbbfb0d95cee01d3c72 +size 361299 diff --git a/python-structlog.changes b/python-structlog.changes index 8b39178..0860b87 100644 --- a/python-structlog.changes +++ b/python-structlog.changes @@ -1,3 +1,45 @@ +------------------------------------------------------------------- +Mon Jan 4 11:16:18 UTC 2021 - Michael Vetter + +- Update to 20.2.0: + Backward-incompatible changes: + * Python 2.7 and 3.5 aren't supported anymore. The package meta + data should ensure that you keep getting 20.1.0 on those versions. #244 + * structlog is now fully type-annotated. This won't break your + applications, but if you use Mypy, it will most likely break your CI. + Deprecations: + * Accessing the _context attribute of a bound logger is now deprecated. + Please use the new structlog.get_context(). + Changes: + * structlog has now type hints for all of its APIs! Since structlog + is highly dynamic and configurable, this led to a few concessions + like a specialized structlog.stdlib.get_logger() whose only difference + to structlog.get_logger() is that it has the correct type hints. + We consider them provisional for the time being – i.e. the backward + compatibility does not apply to them in its full strength until we + feel we got it right. Please feel free to provide feedback! #223, #282 + * Added structlog.make_filtering_logger that can be used like + configure(wrapper_class=make_filtering_bound_logger(logging.INFO)). + It creates a highly optimized bound logger whose inactive methods + only consist of a return None. This is now also the default logger. + * As a complement, structlog.stdlib.add_log_level() can now + additionally be imported as structlog.processors.add_log_level + since it just adds the method name to the event dict. + * structlog.processors.add_log_level() is now part of the default configuration. + * structlog.stdlib.ProcessorFormatter no longer uses exceptions for + control flow, allowing foreign_pre_chain processors to use + sys.exc_info() to access the real exception. + * Added structlog.BytesLogger to avoid unnecessary encoding round trips. + Concretely this is useful with orjson which returns bytes. #271 + * The final processor now also may return bytes that are passed + untouched to the wrapped logger. + * structlog.get_context() allows you to retrieve the original + context of a bound logger. #266, + * structlog.PrintLogger now supports copy.deepcopy(). #268 + * Added structlog.testing.CapturingLogger for more unit testing goodness. + * Added structlog.stdlib.AsyncBoundLogger that executes logging + calls in a thread executor and therefore doesn't block. #245 + ------------------------------------------------------------------- Tue Mar 17 11:33:05 UTC 2020 - pgajdos@suse.com diff --git a/python-structlog.spec b/python-structlog.spec index 10fe315..d061748 100644 --- a/python-structlog.spec +++ b/python-structlog.spec @@ -1,7 +1,7 @@ # # spec file for package python-structlog # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ # because of acyncio for tests %define skip_python2 1 Name: python-structlog -Version: 20.1.0 +Version: 20.2.0 Release: 0 Summary: Structured Logging for Python License: Apache-2.0 OR MIT