Skip to content

Bump structlog from 20.2.0 to 21.2.0#204

Closed
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/structlog-21.2.0
Closed

Bump structlog from 20.2.0 to 21.2.0#204
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/structlog-21.2.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Oct 13, 2021

Bumps structlog from 20.2.0 to 21.2.0.

Release notes

Sourced from structlog's releases.

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.

Deprecations:

none

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

21.1.0

Backward-incompatible changes:

none

Deprecations:

none

Changes:

  • structlog.threadlocal.wrap_dict() now has a correct type annotation. #290
  • Fix isolation in structlog.contextvars. #302

... (truncated)

Changelog

Sourced from structlog's changelog.

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.

Deprecations: ^^^^^^^^^^^^^

none

Changes: ^^^^^^^^

  • structlog is now importable if sys.stdout is None (e.g. when running using pythonw). [#313](https://github.com/hynek/structlog/issues/313) <https://github.com/hynek/structlog/issues/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](https://github.com/hynek/structlog/issues/331) <https://github.com/hynek/structlog/pull/331>_ [#337](https://github.com/hynek/structlog/issues/337) <https://github.com/hynek/structlog/pull/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.Token\s, allowing you to reset values using the new structlog.contextvars.reset_contextvars(). [#339](https://github.com/hynek/structlog/issues/339) <https://github.com/hynek/structlog/pull/339>_

  • 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. [#330](https://github.com/hynek/structlog/issues/330) <https://github.com/hynek/structlog/pull/330>_ [#349](https://github.com/hynek/structlog/issues/349) <https://github.com/hynek/structlog/pull/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](https://github.com/hynek/structlog/issues/345) <https://github.com/hynek/structlog/pull/345>_

  • The final processor can now return a bytearray (additionally to str and bytes). [#344](https://github.com/hynek/structlog/issues/344) <https://github.com/hynek/structlog/issues/344>_


... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [structlog](https://github.com/hynek/structlog) from 20.2.0 to 21.2.0.
- [Release notes](https://github.com/hynek/structlog/releases)
- [Changelog](https://github.com/hynek/structlog/blob/main/CHANGELOG.rst)
- [Commits](hynek/structlog@20.2.0...21.2.0)

---
updated-dependencies:
- dependency-name: structlog
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 13, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 13, 2021

Codecov Report

Merging #204 (8642fc1) into master (1ed0713) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #204   +/-   ##
=======================================
  Coverage   96.10%   96.10%           
=======================================
  Files          77       77           
  Lines        2235     2235           
  Branches      179      179           
=======================================
  Hits         2148     2148           
  Misses         76       76           
  Partials       11       11           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ed0713...8642fc1. Read the comment docs.

@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot bot commented on behalf of github Nov 22, 2021

Superseded by #206.

@dependabot dependabot bot closed this Nov 22, 2021
@dependabot dependabot bot deleted the dependabot/pip/structlog-21.2.0 branch November 22, 2021 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants