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 20.2.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3052970b9e0a
branches:  trunk
changeset: 446356:3052970b9e0a
user:      adam <adam%pkgsrc.org@localhost>
date:      Sun Feb 07 15:42:49 2021 +0000

description:
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:

 sysutils/py-structlog/Makefile |  15 +++++++++++----
 sysutils/py-structlog/PLIST    |  12 +++++++++++-
 sysutils/py-structlog/distinfo |  10 +++++-----
 3 files changed, 27 insertions(+), 10 deletions(-)

diffs (90 lines):

diff -r e0e09c0478b2 -r 3052970b9e0a sysutils/py-structlog/Makefile
--- a/sysutils/py-structlog/Makefile    Sun Feb 07 15:31:44 2021 +0000
+++ b/sysutils/py-structlog/Makefile    Sun Feb 07 15:42:49 2021 +0000
@@ -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 @@
 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 -r e0e09c0478b2 -r 3052970b9e0a sysutils/py-structlog/PLIST
--- a/sysutils/py-structlog/PLIST       Sun Feb 07 15:31:44 2021 +0000
+++ b/sysutils/py-structlog/PLIST       Sun Feb 07 15:42:49 2021 +0000
@@ -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/_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/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/twisted.py
 ${PYSITELIB}/structlog/twisted.pyc
 ${PYSITELIB}/structlog/twisted.pyo
+${PYSITELIB}/structlog/types.py
+${PYSITELIB}/structlog/types.pyc
+${PYSITELIB}/structlog/types.pyo
diff -r e0e09c0478b2 -r 3052970b9e0a sysutils/py-structlog/distinfo
--- a/sysutils/py-structlog/distinfo    Sun Feb 07 15:31:44 2021 +0000
+++ b/sysutils/py-structlog/distinfo    Sun Feb 07 15:42:49 2021 +0000
@@ -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


Home | Main Index | Thread Index | Old Index