diff options
author | adam <adam@pkgsrc.org> | 2021-02-07 15:42:49 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2021-02-07 15:42:49 +0000 |
commit | 071ecc7a0c7e7395de2b91381ffec66d29d5687e (patch) | |
tree | 8ad60b7b146d536c1f8be5903e7adcfa2e8fd64d /sysutils | |
parent | 9ab4cb518318302b0e3a0fc947213ae28ccbd023 (diff) | |
download | pkgsrc-071ecc7a0c7e7395de2b91381ffec66d29d5687e.tar.gz |
py-structlog: updated to 20.2.0
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.
- ``structlog`` is now fully type-annotated.
This won't break your applications, but if you use Mypy, it will most likely break your CI.
Check out the new chapter on typing for details.
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!
- 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.
- 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.
- ``structlog.PrintLogger`` now supports ``copy.deepcopy()``.
- 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.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/py-structlog/Makefile | 15 | ||||
-rw-r--r-- | sysutils/py-structlog/PLIST | 12 | ||||
-rw-r--r-- | sysutils/py-structlog/distinfo | 10 |
3 files changed, 27 insertions, 10 deletions
diff --git a/sysutils/py-structlog/Makefile b/sysutils/py-structlog/Makefile index 4f443330feb..2567d665b59 100644 --- a/sysutils/py-structlog/Makefile +++ b/sysutils/py-structlog/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.10 2020/09/30 07:01:52 adam Exp $ +# $NetBSD: Makefile,v 1.11 2021/02/07 15:42:49 adam Exp $ -DISTNAME= structlog-20.1.0 +DISTNAME= structlog-20.2.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= sysutils python MASTER_SITES= ${MASTER_SITE_PYPI:=s/structlog/} @@ -10,16 +10,23 @@ HOMEPAGE= http://www.structlog.org/ COMMENT= Painless structural logging LICENSE= apache-2.0 AND mit -DEPENDS+= ${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six TEST_DEPENDS+= ${PYPKGPREFIX}-freezegun>=0.2.8:../../devel/py-freezegun TEST_DEPENDS+= ${PYPKGPREFIX}-pretend-[0-9]*:../../devel/py-pretend TEST_DEPENDS+= ${PYPKGPREFIX}-simplejson-[0-9]*:../../converters/py-simplejson +TEST_DEPENDS+= ${PYPKGPREFIX}-test-asyncio-[0-9]*:../../devel/py-test-asyncio +TEST_DEPENDS+= ${PYPKGPREFIX}-test-randomly-[0-9]*:../../devel/py-test-randomly TEST_DEPENDS+= ${PYPKGPREFIX}-test-runner-[0-9]*:../../devel/py-test-runner -TEST_DEPENDS+= ${PYPKGPREFIX}-twisted-[0-9]*:../../net/py-twisted + +.include "../../lang/python/pyversion.mk" +.if ${_PYTHON_VERSION} < 38 +DEPENDS+= ${PYPKGPREFIX}-typing-extensions-[0-9]*:../../devel/py-typing-extensions +.endif USE_LANGUAGES= # none PYSETUPTESTTARGET= pytest +PYTHON_VERSIONS_INCOMPATIBLE= 27 + .include "../../lang/python/egg.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/py-structlog/PLIST b/sysutils/py-structlog/PLIST index 437ab55835b..f2c68aee8b8 100644 --- a/sysutils/py-structlog/PLIST +++ b/sysutils/py-structlog/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2020/09/30 07:01:52 adam Exp $ +@comment $NetBSD: PLIST,v 1.4 2021/02/07 15:42:49 adam Exp $ ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt @@ -20,6 +20,12 @@ ${PYSITELIB}/structlog/_frames.pyo ${PYSITELIB}/structlog/_generic.py ${PYSITELIB}/structlog/_generic.pyc ${PYSITELIB}/structlog/_generic.pyo +${PYSITELIB}/structlog/_greenlets.py +${PYSITELIB}/structlog/_greenlets.pyc +${PYSITELIB}/structlog/_greenlets.pyo +${PYSITELIB}/structlog/_log_levels.py +${PYSITELIB}/structlog/_log_levels.pyc +${PYSITELIB}/structlog/_log_levels.pyo ${PYSITELIB}/structlog/_loggers.py ${PYSITELIB}/structlog/_loggers.pyc ${PYSITELIB}/structlog/_loggers.pyo @@ -38,6 +44,7 @@ ${PYSITELIB}/structlog/exceptions.pyo ${PYSITELIB}/structlog/processors.py ${PYSITELIB}/structlog/processors.pyc ${PYSITELIB}/structlog/processors.pyo +${PYSITELIB}/structlog/py.typed ${PYSITELIB}/structlog/stdlib.py ${PYSITELIB}/structlog/stdlib.pyc ${PYSITELIB}/structlog/stdlib.pyo @@ -50,3 +57,6 @@ ${PYSITELIB}/structlog/threadlocal.pyo ${PYSITELIB}/structlog/twisted.py ${PYSITELIB}/structlog/twisted.pyc ${PYSITELIB}/structlog/twisted.pyo +${PYSITELIB}/structlog/types.py +${PYSITELIB}/structlog/types.pyc +${PYSITELIB}/structlog/types.pyo diff --git a/sysutils/py-structlog/distinfo b/sysutils/py-structlog/distinfo index 24021cd1dda..9ce84b23268 100644 --- a/sysutils/py-structlog/distinfo +++ b/sysutils/py-structlog/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.9 2020/09/30 07:01:52 adam Exp $ +$NetBSD: distinfo,v 1.10 2021/02/07 15:42:49 adam Exp $ -SHA1 (structlog-20.1.0.tar.gz) = 8e0fe9ee26c4d39a0b96be7ceeea12e3565ba691 -RMD160 (structlog-20.1.0.tar.gz) = 30cdae480081f30c8f51aba859eec94758e7d2af -SHA512 (structlog-20.1.0.tar.gz) = 87e4909e4a8cee396cc9b78212f13819632c303448bea28e78d574b981435aa29dc5620d59785788ae165af805761cbf97fa4d1ec49a3bf3b887ae76c91b18f3 -Size (structlog-20.1.0.tar.gz) = 332376 bytes +SHA1 (structlog-20.2.0.tar.gz) = e7a1f2fb6ed8ba4627c2211bbebcddc71eadec1d +RMD160 (structlog-20.2.0.tar.gz) = f4b2adfb97efb5a0018fd1003f8d162e787daa05 +SHA512 (structlog-20.2.0.tar.gz) = 950807ce131464e102807e2ee17a830ad227110a12a05078dc42f97588b77b0dcab78428aae3fabb2d6cd1a249f5cec05a95acb3097602af2ab41b7bcc0d099a +Size (structlog-20.2.0.tar.gz) = 371793 bytes |