Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 22, 2021

Bumps structlog from 21.2.0 to 21.3.0.

Release notes

Sourced from structlog's releases.

21.3.0

The main reason for this comparatively timely release is that aiohttp 3.8's new behavior of starting new loops within aiohttp.web.run_app() led to breakage in apps that use structlog.stdlib.AsyncBoundLogger.

The one big new feature though is the support for much more powerful processor chains within structlog.stdlib.ProcessorFormatter. This took me way too long to get right, but I'm excited to share it with you.

This is also the first release without a setup.py. Invoking it was never tested and never supported, so now it's gone. Please use standard packaging tools like PyPA's build or flit directly if you want to package structlog yourself.

Backward-incompatible changes:

  • structlog switched its packaging to flit. Users shouldn't notice a difference, but (re-)packagers might.

Deprecations:

none

Changes:

  • structlog.dev.ConsoleRenderer now has sort_keys boolean parameter that allows to disable the sorting of keys on output. #358

  • structlog.processors.TimeStamper now works well with FreezeGun even when it gets applied before the loggers are configured. #364

  • structlog.stdlib.AsyncBoundLogger now determines the running loop when logging, not on instantiation. That has a minor performance impact, but makes it more robust when loops change (e.g. aiohttp.web.run_app()), or you want to use sync_bl before a loop has started.

  • structlog.stdlib.ProcessorFormatter now has a processors argument that allows to define a processor chain to run over all log entries.

    Before running the chain, two additional keys are added to the event dictionary: _record and _from_structlog. With them it's possible to extract information from logging.LogRecords and differentiate between structlog and logging log entries while processing them.

    The old processor (singular) parameter is now deprecated, but no plans exist to remove it. #365

Changelog

Sourced from structlog's changelog.

21.3.0 (2021-11-20)

Backward-incompatible changes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  • structlog switched its packaging to flit <https://flit.readthedocs.io/>_. Users shouldn't notice a difference, but (re-)packagers might.

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

none

Changes: ^^^^^^^^

  • structlog.dev.ConsoleRenderer now has sort_keys boolean parameter that allows to disable the sorting of keys on output. [#358](https://github.com/hynek/structlog/issues/358) <https://github.com/hynek/structlog/pull/358>_

  • structlog.processors.TimeStamper now works well with FreezeGun even when it gets applied before the loggers are configured. [#364](https://github.com/hynek/structlog/issues/364) <https://github.com/hynek/structlog/pull/364>_

  • structlog.stdlib.AsyncBoundLogger now determines the running loop when logging, not on instantiation. That has a minor performance impact, but makes it more robust when loops change (e.g. aiohttp.web.run_app()), or you want to use sync_bl before a loop has started.

  • structlog.stdlib.ProcessorFormatter now has a processors argument that allows to define a processor chain to run over all log entries.

    Before running the chain, two additional keys are added to the event dictionary: _record and _from_structlog. With them it's possible to extract information from logging.LogRecord\s and differentiate between structlog and logging log entries while processing them.

    The old processor (singular) parameter is now deprecated, but no plans exist to remove it. [#365](https://github.com/hynek/structlog/issues/365) <https://github.com/hynek/structlog/pull/365>_


Commits
  • f21c50a Prepare 21.3.0
  • 7fdd847 Accept that we haven't run pypy3 tests in months
  • e0adf4d wtf
  • 60bf1c7 Dashes are confusing
  • ee615ec Add tox target to verify that pyproject.toml is up to date cog-wise
  • b21e732 Add mascot to PyPI page
  • c48b1f0 Don't run pre-commit in CI, only update monthly
  • ea9c965 stdlib/ProcessorFormatter: allow for complete chains on top of records (#365)
  • 2f956be Move docs closer to gh-actions and coverage-report to coverage runs
  • b9558a6 Compromise
  • Additional commits viewable in compare view

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 21.2.0 to 21.3.0.
- [Release notes](https://github.com/hynek/structlog/releases)
- [Changelog](https://github.com/hynek/structlog/blob/main/CHANGELOG.rst)
- [Commits](hynek/structlog@21.2.0...21.3.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 22, 2021
@dependabot dependabot bot requested a review from a team November 22, 2021 23:00
@ghost
Copy link

ghost commented Nov 22, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Duration: 9 min 18 sec

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@beniwohli beniwohli merged commit 7aa7cce into master Nov 23, 2021
@dependabot dependabot bot deleted the dependabot/pip/structlog-21.3.0 branch November 23, 2021 08:04
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.

2 participants