Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump structlog from 22.1.0 to 22.2.0 #5

Merged
merged 3 commits into from
Nov 22, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 21, 2022

Bumps structlog from 22.1.0 to 22.2.0.

Release notes

Sourced from structlog's releases.

22.2.0

Highlights

This is another (too) big release, but before I go into new features, allow me to beg you to check out structlog's documentation. I've spent easily half of the time on bringing is up to date, restructuring, and adding usage recipes. Not new in this release, but did you know that the standard library chapter has flowcharts that give you as visual explanations of how the various methods work? This is usually the biggest sticking point when starting to use structlog.

Feature-wise the big thing is that structlog's internal (and extremely fast) loggers (the one created using structlog.make_filtering_bound_logger() got two new features that people have asked for forever:

  1. String interpolation: log.info("hello %s!", "world") works now!
  2. Async! Each logging method has an async version: await log.ainfo("hello %s!", "world") is the same thing as above, but async.

Special Thanks

This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If you would like to join them, go to https://github.com/sponsors/hynek and check out the sweet perks!

Above and Beyond

Variomedia AG (@​variomedia), Tidelift (@​tidelift), Sentry (@​getsentry), HiredScore (@​HiredScore), FilePreviews (@​filepreviews), and Daniel Fortunov (@​asqui).

Maintenance Sustainers

@​rzijp, Adam Hill (@​adamghill), Dan Groshev (@​si14), Tamir Bahar (@​tmr232), Adi Roiban (@​adiroiban), Magnus Watn (@​magnuswatn), David Cramer (@​dcramer), Moving Content AG (@​moving-content), Stein Magnus Jodal (@​jodal), Iwan Aucamp (@​aucampia), ProteinQure (@​ProteinQure), Jesse Snyder (@​jessesnyder), Rivo Laks (@​rivol), Thomas Ballinger (@​thomasballinger), @​medecau, Ionel Cristian Mărieș (@​ionelmc), The Westervelt Company (@​westerveltco), Philippe Galvan (@​PhilippeGalvan), Birk Jernström (@​birkjernstrom), Jannis Leidel (@​jezdez), Tim Schilling (@​tim-schilling), Chris Withers (@​cjw296), and Christopher Dignam (@​chdsbd).

Not to forget 2 more amazing humans who chose to be generous but anonymous!

Full Changelog

Deprecated

  • Accessing package metadata as attributes on the structlog module is deprecated (e.g. structlog.__version__). Please use importlib.metadata instead (for Python 3.7: the importlib-metadata PyPI package).
  • The structlog.types module is now deprecated in favor of the structlog.typing module. It seems like the Python typing community is settling on this name.

Added

  • FilteringBoundLogger (used by default) now allows for string interpolation using positional arguments:

    >>> log.info("Hello %s! The answer is %d.", "World", 42, x=1)
    2022-10-07 10:04.31 [info     ] Hello World! The answer is 42. x=1

    #454

  • FilteringBoundLogger now also has support for asyncio-based logging. Instead of a wrapper class like structlog.stdlib.AsyncBoundLogger, async equivalents have been added for all logging methods. So instead of log.info("hello") you can also write await log.ainfo("hello") in async functions and methods.

    This seems like the better approach and if it's liked by the community, structlog.stdlib.BoundLogger will get those methods too. #457

Changed

... (truncated)

Changelog

Sourced from structlog's changelog.

22.2.0 - 2022-11-19

Deprecated

  • Accessing package metadata as attributes on the structlog module is deprecated (e.g. structlog.__version__). Please use importlib.metadata instead (for Python 3.7: the importlib-metadata PyPI package).
  • The structlog.types module is now deprecated in favor of the structlog.typing module. It seems like the Python typing community is settling on this name.

Added

  • FilteringBoundLogger (used by default) now allows for string interpolation using positional arguments:

    >>> log.info("Hello %s! The answer is %d.", "World", 42, x=1)
    2022-10-07 10:04.31 [info     ] Hello World! The answer is 42. x=1

    #454

  • FilteringBoundLogger now also has support for asyncio-based logging. Instead of a wrapper class like structlog.stdlib.AsyncBoundLogger, async equivalents have been added for all logging methods. So instead of log.info("hello") you can also write await log.ainfo("hello") in async functions and methods.

    This seems like the better approach and if it's liked by the community, structlog.stdlib.BoundLogger will get those methods too. #457

Changed

  • The documentation has been heavily overhauled. Have a look if you haven't lately! Especially the graphs in the standard library chapter have proven valuable to many.
  • The build backend has been switched to Hatch.

Fixed

  • The timestamps in the default configuration now use the correct separator (:) for seconds.
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 22.1.0 to 22.2.0.
- [Release notes](https://github.com/hynek/structlog/releases)
- [Changelog](https://github.com/hynek/structlog/blob/main/CHANGELOG.md)
- [Commits](hynek/structlog@22.1.0...22.2.0)

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

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 Nov 21, 2022
- exc_info should only contain exceptions
- use the default processor when not running in gcp
@danielx danielx merged commit a5f125b into main Nov 22, 2022
@dependabot dependabot bot deleted the dependabot/pip/structlog-22.2.0 branch November 22, 2022 19:53
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.

None yet

1 participant