Skip to content

Commit

Permalink
fix(deps): Update dependency structlog to v25 (#281)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [structlog](https://togithub.com/hynek/structlog) ([changelog](https://togithub.com/hynek/structlog/blob/main/CHANGELOG.md)) | major | `==24.4.0` -> `==25.1.0` |

---

### Release Notes

<details>
<summary>hynek/structlog (structlog)</summary>

### [`v25.1.0`](https://togithub.com/hynek/structlog/blob/HEAD/CHANGELOG.md#2510---2025-01-16)

[Compare Source](https://togithub.com/hynek/structlog/compare/24.4.0...25.1.0)

##### Added

-   Add `structlog.stdlib.render_to_log_args_and_kwargs` processor.
    Same as `structlog.stdlib.render_to_log_kwargs`, but also allows to pass positional arguments to `logging`.
    With it, you do not need to add `structlog.stdlib.PositionalArgumentsFormatter` processor to format positional arguments from *structlog* loggers.
    [#&#8203;668](https://togithub.com/hynek/structlog/pull/668)

-   Native loggers now have `is_enabled_for()` and `get_effective_level()` methods that mirror the behavior of the standard library's `logging.Logger.isEnabledFor()` and `logging.Logger.getEffectiveLevel()`.
    [#&#8203;689](https://togithub.com/hynek/structlog/pull/689)

##### Changed

-   `structlog.typing.BindableLogger` protocol now returns `Self` instead of `BindableLogger`.
    This adds a dependency on [*typing-extensions*](https://pypi.org/project/typing-extensions/) for Pythons older than 3.11.
    [#&#8203;642](https://togithub.com/hynek/structlog/pull/642)
    [#&#8203;659](https://togithub.com/hynek/structlog/pull/659)

-   `structlog.dev.ConsoleRenderer` will quote string value with special characters.
    [#&#8203;647](https://togithub.com/hynek/structlog/pull/647)

-   `structlog.stdlib.recreate_defaults()` now also adds `structlog.stdlib.PositionalArgumentsFormatter`.
    In default native mode, this is done by the loggers at the edge.

-   `structlog.make_filtering_bound_logger()` now also accepts a string for *min_level*.

##### Fixed

-   Fix handling calls to `{logger}.exception()` outside of exception blocks.
    Depending on the structlog configuration,
    this either resulted in an event dict key `exception: "MISSING"` or lead to an error.
    Now, an invalid or missing `exc_info` will just be ignored.
    This means, that calling `{logger}.exception()` outside of an exception block is basically the same as calling `{logger}.error()`.
    [#&#8203;634](https://togithub.com/hynek/structlog/issues/634)
    [#&#8203;680](https://togithub.com/hynek/structlog/pull/680)

-   Instantiating `structlog.dev.ConsoleRenderer` does not mutate the passed *styles* dict anymore.
    [#&#8203;669](https://togithub.com/hynek/structlog/pull/669)

-   The native `FilteringBoundLogger.fatal()` method now maps to the critical level, as it does in the standard library.
    Note that the level is discouraged to use there, so we recommend to stick to `error()` or `critical()`.
    [#&#8203;677](https://togithub.com/hynek/structlog/pull/677)

-   `structlog.tracebacks.ExceptionDictTransformer` now actually accepts `None` for `locals_max_length` and `locals_max_string`.
    [#&#8203;675](https://togithub.com/hynek/structlog/pull/675)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
  • Loading branch information
cq-bot authored Feb 3, 2025
1 parent c5f06dc commit e78c775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"python-dateutil>=2.8.1",
"pytz==2024.2",
"six==1.17.0",
"structlog==24.4.0",
"structlog==25.1.0",
"tomli==2.2.1",
"tzdata==2024.2",
]
Expand Down

0 comments on commit e78c775

Please sign in to comment.