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

Update dependency cattrs to v23 #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 30, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cattrs (changelog) ^22.1.0 -> ^23.0.0 age adoption passing confidence

Release Notes

python-attrs/cattrs (cattrs)

v23.2.3

Compare Source

  • Fix a regression when unstructuring dictionary values typed as Any.
    (#​453 #​462)
  • Fix a regression when unstructuring unspecialized generic classes.
    (#​465 #​466)
  • Optimize function source code caching.
    (#​445 #​464)
  • Generate unique files only in case of linecache enabled.
    (#​445 #​441)

v23.2.2

Compare Source

  • Fix a regression when unstructuring Any | None.
    (#​453)

v23.2.1

Compare Source

  • Fix unnecessary typing_extensions import on Python 3.11.
    (#​446 #​447)

v23.2.0

Compare Source

  • Potentially breaking: skip attrs fields marked as init=False by default. This change is potentially breaking for unstructuring.
    See here for instructions on how to restore the old behavior.
    (#​40 #​395)
  • Potentially breaking: {py:func}cattrs.gen.make_dict_structure_fn and {py:func}cattrs.gen.typeddicts.make_dict_structure_fn will use the values for the detailed_validation and forbid_extra_keys parameters from the given converter by default now.
    If you're using these functions directly, the old behavior can be restored by passing in the desired values directly.
    (#​410 #​411)
  • Potentially breaking: The default union structuring strategy will also use fields annotated as typing.Literal to help guide structuring.
    See here for instructions on how to restore the old behavior.
    (#​391)
  • Python 3.12 is now supported. Python 3.7 is no longer supported; use older releases there.
    (#​424)
  • Implement the union passthrough strategy, enabling much richer union handling for preconfigured converters. Learn more here.
  • Introduce the use_class_methods strategy. Learn more here.
    (#​405)
  • The omit parameter of {py:func}cattrs.override is now of type bool | None (from bool).
    None is the new default and means to apply default cattrs handling to the attribute, which is to omit the attribute if it's marked as init=False, and keep it otherwise.
  • Converters can now be initialized with custom fallback hook factories for un/structuring.
    (#​331 #​441)
  • Add support for date to preconfigured converters.
    (#​420)
  • Add support for datetime.dates to the PyYAML preconfigured converter.
    (#​393)
  • Fix {py:func}format_exception() <cattrs.v.format_exception> parameter working for recursive calls to {py:func}transform_error <cattrs.transform_error>.
    (#​389)
  • attrs aliases are now supported, although aliased fields still map to their attribute name instead of their alias by default when un/structuring.
    (#​322 #​391)
  • Fix TypedDicts with periods in their field names.
    (#​376 #​377)
  • Optimize and improve unstructuring of Optional (unions of one type and None).
    (#​380 #​381)
  • Fix {py:func}format_exception <cattrs.v.format_exception> and {py:func}transform_error <cattrs.transform_error> type annotations.
  • Improve the implementation of cattrs._compat.is_typeddict. The implementation is now simpler, and relies on fewer private implementation details from typing and typing_extensions.
    (#​384)
  • Improve handling of TypedDicts with forward references.
  • Speed up generated attrs and TypedDict structuring functions by changing their signature slightly.
    (#​388)
  • Fix copying of converters with function hooks.
    (#​398 #​399)
  • Broaden {py:func}loads' <cattrs.preconf.orjson.OrjsonConverter.loads> type definition for the preconf orjson converter.
    (#​400)
  • {py:class}AttributeValidationNote <cattrs.AttributeValidationNote> and {py:class}IterableValidationNote <cattrs.IterableValidationNote> are now picklable.
    (#​408)
  • Fix structuring Final lists.
    (#​412)
  • Fix certain cases of structuring Annotated types.
    (#​418)
  • Fix the tagged union strategy to work with forbid_extra_keys.
    (#​402 #​443)
  • Use PDM instead of Poetry.
  • cattrs is now linted with Ruff.
  • Remove some unused lines in the unstructuring code.
    (#​416)
  • Fix handling classes inheriting from non-generic protocols.
    (#​374 #​436)
  • The documentation Makefile now supports the htmlview and htmllive targets. (#​442)
  • cattrs is now published using PyPI Trusted Publishers, and main branch commits are automatically deployed to Test PyPI.

v23.1.2

Compare Source

  • Improve typing_extensions version bound. (#​372)

v23.1.1

Compare Source

  • Add typing_extensions as a direct dependency on 3.10.
    (#​369 #​370)

v23.1.0

Compare Source

  • Introduce the tagged_union strategy.
    (#​318 #​317)
  • Introduce the cattrs.transform_error helper function for formatting validation exceptions. (258 342)
  • Add support for typing.TypedDict and typing_extensions.TypedDict.
    (#​296 #​364)
  • Add support for typing.Final.
    (#​340 #​349)
  • Introduce override.struct_hook and override.unstruct_hook. Learn more here.
    (#​326)
  • Fix generating structuring functions for types with angle brackets (<>) and pipe symbols (|) in the name.
    (#​319 #​327)
  • pathlib.Path is now supported by default.
    (#​81)
  • Add cbor2 serialization library to the cattrs.preconf package.
  • Add optional dependencies for cattrs.preconf third-party libraries. (#​337)
  • All preconf converters now allow overriding the default unstruct_collection_overrides in make_converter.
    (#​350 #​353)
  • Subclasses structuring and unstructuring is now supported via a custom include_subclasses strategy.
    (#​312)
  • Add support for typing_extensions.Annotated when the python version is less than 3.9. (#​366)
  • Add unstructuring and structuring support for the standard library deque.
    (#​355)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@docs-page
Copy link

docs-page bot commented May 30, 2023

To view this pull requests documentation preview, visit the following URL:

docs.page/fucina/treb~37

Documentation is deployed and generated using docs.page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants