Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): Update cattrs requirement from <23.3,>=1.8 to >=1.8,<24.…
…2 in /packages/@jsii/python-runtime (#4626) Updates the requirements on [cattrs](https://github.com/python-attrs/cattrs) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/cattrs/releases">cattrs's releases</a>.</em></p> <blockquote> <h2>24.1.0</h2> <ul> <li><strong>Potentially breaking</strong>: Unstructuring hooks for <code>typing.Any</code> are consistent now: values are unstructured using their runtime type. Previously this behavior was underspecified and inconsistent, but followed this rule in the majority of cases. Reverting old behavior is very dependent on the actual case; ask on the issue tracker if in doubt. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/473">#473</a>)</li> <li><strong>Minor change</strong>: Heterogeneous tuples are now unstructured into tuples instead of lists by default; this is significantly faster and widely supported by serialization libraries. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/486">#486</a>)</li> <li><strong>Minor change</strong>: <code>cattrs.gen.make_dict_structure_fn</code> will use the value for the <code>prefer_attrib_converters</code> parameter from the given converter by default now. If you're using this function directly, the old behavior can be restored by passing in the desired values explicitly. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/527">#527</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/528">#528</a>)</li> <li>Introduce <code>BaseConverter.get_structure_hook</code> and <code>BaseConverter.get_unstructure_hook</code> methods. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/432">#432</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li><code>BaseConverter.register_structure_hook</code>, <code>BaseConverter.register_unstructure_hook</code>, <code>BaseConverter.register_unstructure_hook_factory</code> and <code>BaseConverter.register_structure_hook_factory</code> can now be used as decorators and have gained new features. See <a href="https://catt.rs/en/latest/customizing.html#use-as-decorators">here</a> and <a href="https://catt.rs/en/latest/customizing.html#id1">here</a> for more details. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/487">#487</a>)</li> <li>Introduce and <a href="https://catt.rs/en/latest/customizing.html#customizing-collections">document</a> the <code>cattrs.cols</code> module for better collection customizations. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/504">#504</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/540">#540</a>)</li> <li>Enhance the <code>cattrs.cols.is_mapping</code> predicate function to also cover virtual subclasses of <code>abc.Mapping</code>. This enables map classes from libraries such as <em>immutables</em> or <em>sortedcontainers</em> to structure out-of-the-box. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/555">#555</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/556">#556</a>)</li> <li>Introduce the <a href="https://jcristharif.com/msgspec/"><em>msgspec</em></a> <code>preconf converter <cattrs.preconf.msgspec></code>. Only JSON is supported for now, with other formats supported by <em>msgspec</em> to come later. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/481">#481</a>)</li> <li>The default union handler now properly takes renamed fields into account. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li>The default union handler now also handles dataclasses. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/426">#426</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/477">#477</a>)</li> <li>Add support for <a href="https://peps.python.org/pep-0695/">PEP 695</a> type aliases. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/452">#452</a>)</li> <li>Add support for <a href="https://peps.python.org/pep-0696/">PEP 696</a> <code>TypeVar</code>s with defaults. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/512">#512</a>)</li> <li>Add support for named tuples with type metadata (<a href="https://docs.python.org/3/library/typing.html#typing.NamedTuple"><code>typing.NamedTuple</code></a>). (<a href="https://redirect.github.com/python-attrs/cattrs/issues/425">#425</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/491">#491</a>)</li> <li>Add support for optionally un/unstructuring named tuples using dictionaries. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/425">#425</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/549">#549</a>)</li> <li>The <code>include_subclasses</code> strategy now fetches the member hooks from the converter (making use of converter defaults) if overrides are not provided, instead of generating new hooks with no overrides. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/429">#429</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li>The preconf <code>make_converter</code> factories are now correctly typed. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/481">#481</a>)</li> <li>The <code>orjson preconf converter</code> now passes through dates and datetimes to orjson while unstructuring, greatly improving speed. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/463">#463</a>)</li> <li><code>cattrs.gen</code> generators now attach metadata to the generated functions, making them introspectable. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li>Structure hook factories in <code>cattrs.gen</code> now handle recursive classes better. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/540">#540</a>)</li> <li>The <a href="https://catt.rs/en/stable/strategies.html#tagged-unions-strategy">tagged union strategy</a> now leaves the tags in the payload unless <code>forbid_extra_keys</code> is set. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/533">#533</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/534">#534</a>)</li> <li>More robust support for <code>Annotated</code> and <code>NotRequired</code> in TypedDicts.</li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/cattrs/blob/main/HISTORY.md">cattrs's changelog</a>.</em></p> <blockquote> <h2>24.1.0 (2024-08-28)</h2> <ul> <li><strong>Potentially breaking</strong>: Unstructuring hooks for <code>typing.Any</code> are consistent now: values are unstructured using their runtime type. Previously this behavior was underspecified and inconsistent, but followed this rule in the majority of cases. Reverting old behavior is very dependent on the actual case; ask on the issue tracker if in doubt. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/473">#473</a>)</li> <li><strong>Minor change</strong>: Heterogeneous tuples are now unstructured into tuples instead of lists by default; this is significantly faster and widely supported by serialization libraries. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/486">#486</a>)</li> <li><strong>Minor change</strong>: {py:func}<code>cattrs.gen.make_dict_structure_fn</code> will use the value for the <code>prefer_attrib_converters</code> parameter from the given converter by default now. If you're using this function directly, the old behavior can be restored by passing in the desired values explicitly. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/527">#527</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/528">#528</a>)</li> <li>Introduce {meth}<code>BaseConverter.get_structure_hook</code> and {meth}<code>BaseConverter.get_unstructure_hook</code> methods. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/432">#432</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li>{meth}<code>BaseConverter.register_structure_hook</code>, {meth}<code>BaseConverter.register_unstructure_hook</code>, {meth}<code>BaseConverter.register_unstructure_hook_factory</code> and {meth}<code>BaseConverter.register_structure_hook_factory</code> can now be used as decorators and have gained new features. See <a href="https://catt.rs/en/latest/customizing.html#use-as-decorators">here</a> and <a href="https://catt.rs/en/latest/customizing.html#id1">here</a> for more details. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/487">#487</a>)</li> <li>Introduce and <a href="https://catt.rs/en/latest/customizing.html#customizing-collections">document</a> the {mod}<code>cattrs.cols</code> module for better collection customizations. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/504">#504</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/540">#540</a>)</li> <li>Enhance the {func}<code>cattrs.cols.is_mapping</code> predicate function to also cover virtual subclasses of <code>abc.Mapping</code>. This enables map classes from libraries such as <em>immutables</em> or <em>sortedcontainers</em> to structure out-of-the-box. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/555">#555</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/556">#556</a>)</li> <li>Introduce the <a href="https://jcristharif.com/msgspec/"><em>msgspec</em></a> {mod}<code>preconf converter <cattrs.preconf.msgspec></code>. Only JSON is supported for now, with other formats supported by <em>msgspec</em> to come later. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/481">#481</a>)</li> <li>The default union handler now properly takes renamed fields into account. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li>The default union handler now also handles dataclasses. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/426">#426</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/477">#477</a>)</li> <li>Add support for <a href="https://peps.python.org/pep-0695/">PEP 695</a> type aliases. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/452">#452</a>)</li> <li>Add support for <a href="https://peps.python.org/pep-0696/">PEP 696</a> <code>TypeVar</code>s with defaults. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/512">#512</a>)</li> <li>Add support for named tuples with type metadata (<a href="https://docs.python.org/3/library/typing.html#typing.NamedTuple"><code>typing.NamedTuple</code></a>). (<a href="https://redirect.github.com/python-attrs/cattrs/issues/425">#425</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/491">#491</a>)</li> <li>Add support for optionally un/unstructuring named tuples using dictionaries. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/425">#425</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/549">#549</a>)</li> <li>The <code>include_subclasses</code> strategy now fetches the member hooks from the converter (making use of converter defaults) if overrides are not provided, instead of generating new hooks with no overrides. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/429">#429</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li>The preconf <code>make_converter</code> factories are now correctly typed. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/481">#481</a>)</li> <li>The {class}<code>orjson preconf converter <cattrs.preconf.orjson.OrjsonConverter></code> now passes through dates and datetimes to orjson while unstructuring, greatly improving speed. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/463">#463</a>)</li> <li>{mod}<code>cattrs.gen</code> generators now attach metadata to the generated functions, making them introspectable. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/472">#472</a>)</li> <li>Structure hook factories in {mod}<code>cattrs.gen</code> now handle recursive classes better. (<a href="https://redirect.github.com/python-attrs/cattrs/pull/540">#540</a>)</li> <li>The <a href="https://catt.rs/en/stable/strategies.html#tagged-unions-strategy">tagged union strategy</a> now leaves the tags in the payload unless <code>forbid_extra_keys</code> is set. (<a href="https://redirect.github.com/python-attrs/cattrs/issues/533">#533</a> <a href="https://redirect.github.com/python-attrs/cattrs/pull/534">#534</a>)</li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-attrs/cattrs/commit/3cb670705b810926d12ecda5315d9e5b61a04e5c"><code>3cb6707</code></a> v24.1.0</li> <li><a href="https://github.com/python-attrs/cattrs/commit/87eefe6ae362ec251b6af5cff14c34595defe283"><code>87eefe6</code></a> fix: wrong return type (<a href="https://redirect.github.com/python-attrs/cattrs/issues/569">#569</a>)</li> <li><a href="https://github.com/python-attrs/cattrs/commit/5fd0f5b445928064338e6fcdac081e608b51e541"><code>5fd0f5b</code></a> Let's not stick in the past</li> <li><a href="https://github.com/python-attrs/cattrs/commit/1d72dcc5764607d9fb9dcafc99e0a62c102ed818"><code>1d72dcc</code></a> Restructure readme/index/reasons (<a href="https://redirect.github.com/python-attrs/cattrs/issues/562">#562</a>)</li> <li><a href="https://github.com/python-attrs/cattrs/commit/c393abc2f4c7bfe989a654ad8694542b5d1ac7f6"><code>c393abc</code></a> Merge pull request <a href="https://redirect.github.com/python-attrs/cattrs/issues/565">#565</a> from python-attrs/artifacts-v4</li> <li><a href="https://github.com/python-attrs/cattrs/commit/ca6d0b608b568112684b1f544c5b826a6cc2a27e"><code>ca6d0b6</code></a> Switch to (up|down)load-artifact@v4</li> <li><a href="https://github.com/python-attrs/cattrs/commit/ea7595b14578259e5150cbc5d8421cc12aaa17c0"><code>ea7595b</code></a> Merge pull request <a href="https://redirect.github.com/python-attrs/cattrs/issues/564">#564</a> from python-attrs/coverage-md</li> <li><a href="https://github.com/python-attrs/cattrs/commit/9ec4b4939803f9ac37fc14953cfd8a41f623bb44"><code>9ec4b49</code></a> Don't measure branch coverage for now</li> <li><a href="https://github.com/python-attrs/cattrs/commit/2a9ff8ed6104190b8cdf41c7afed25c814c01a0f"><code>2a9ff8e</code></a> html too</li> <li><a href="https://github.com/python-attrs/cattrs/commit/0ae37d681535b329a56abbc9387e9b8d9f7473a3"><code>0ae37d6</code></a> Use config</li> <li>Additional commits viewable in <a href="https://github.com/python-attrs/cattrs/compare/v1.8.0...v24.1.0">compare view</a></li> </ul> </details> <br /> 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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 show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@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) </details>
- Loading branch information