dependabot[bot] opened a new pull request, #19174: URL: https://github.com/apache/iceberg/pull/19174
Bumps [datamodel-code-generator](https://github.com/datamodel-code-generator/datamodel-code-generator) from 0.96.0 to 0.99.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/datamodel-code-generator/datamodel-code-generator/releases">datamodel-code-generator's releases</a>.</em></p> <blockquote> <h2>0.99.0</h2> <h2>Breaking Changes</h2> <h3>Code Generation Changes</h3> <ul> <li>Generated AsyncAPI clients now follow references into other loaded documents (experimental <code>--generate-client</code>) - With <code>--generate-client</code> and AsyncAPI input, the generator now reads a channel, operation, message, trait, binding, parameter, reply, server or security scheme declared in another loaded document at the place where the parser resolves its <code>$ref</code>. Channels that used to be skipped with a "references another document" warning are now generated as client helpers. An AsyncAPI 3 operation in another loaded document no longer stops the whole run with "operation ... references another document". When you regenerate such a client, it gains these helpers, and the <code>SOCKET_N</code>, <code>OPERATION_N</code> and <code>codec_N</code> constants in the generated <code>protocols/_plans.py</code>, <code>_operations.py</code> and <code>_generated/model_bindings.py</code> are renumbered. Channels that are still left out may giv e a different reason in their skip warning. References into a document the run did not load, and references that loop, still leave the channel out (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7137">#7137</a>)</li> <li>Channel servers and security requirements are now matched by where their reference leads (experimental <code>--generate-client</code>) - In AsyncAPI input, a channel <code>servers</code> entry or an operation or server security requirement whose <code>$ref</code> does not point straight at an entry of the root document's <code>servers</code> or <code>components/securitySchemes</code> now names the root entry that leads to the same object. Before, such an entry was ignored or the channel was skipped. So a generated channel can now get extra servers or security requirements it did not have before, or be generated where it used to be skipped (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7137">#7137</a>)</li> <li>Constrained union members are written as <code>Annotated</code> under <code>--use-annotated</code> - In Pydantic v2 output (<code>pydantic_v2.BaseModel</code>, <code>pydantic_v2.dataclass</code>) with <code>--use-annotated</code>, a union member that has its own constraints used to be written as a <code>con*()</code> call. This covers members in a field, a list item, a dict value or a <code>RootModel</code> root and generic parameter, for example the <code>string</code> of <code>type: [integer, string]</code> with a <code>pattern</code>, or the <code>integer</code> of a type list with a <code>minimum</code>. Such a member is now written as <code>Annotated[<type>, Field(...)]</code>, and a <code>Decimal</code> <code>multipleOf</code> becomes <code>MultipleOf(...)</code>. For example, <code>code: int | constr(pattern=r'^[0-9]+$')</code> becomes <code>code: int | Annotated[str, Field(pattern=r'^[0-9]+$')]</code>, and <code>RootModel[conint(ge=2) | constr(max_length=2)]</cod e> becomes <code>RootModel[Annotated[int, Field(ge=2)] | Annotated[str, Field(max_length=2)]]</code>. The generated imports change too: <code>constr</code>, <code>conint</code>, <code>confloat</code>, <code>condecimal</code> and <code>conbytes</code> are no longer imported from <code>pydantic</code> for these members, while <code>Annotated</code>, <code>Field</code> and <code>annotated_types.MultipleOf</code> are added where needed. This also changes the output of the <code>read-kubernetes-extensions</code> presets. The models accept and reject the same values, but the generated code text and imports are different. Output without <code>--use-annotated</code> and with <code>--field-constraints</code> alone does not change (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7117">#7117</a>)</li> <li>Generated clients now bind the keys of a TypedDict whose bases have conflicting orders - With the experimental <code>--generate-client</code> option and <code>--output-model-type typing.TypedDict</code>, a TypedDict whose bases Python cannot order (for example <code>E: allOf [C, D]</code> where <code>C: allOf [A, B]</code> and <code>D: allOf [B, A]</code>) used to get an empty binding. Its codec in <code>model_bindings.py</code> was <code>Model(())</code>, decoded objects held no keys, and a body of it took no field arguments under <code>--client-body-arguments both</code>. Its keys are now bound in the order the models give its bases. The codec lists every field (for example <code>Model((Field('b', 'b'), Field('a', 'a'), Field('d', 'd'), Field('c', 'c'), Field('e', 'e')))</code>), decoded objects contain those keys in that order, and the client call that sends such a body now accepts them as field arguments. Generated clients that relied on the old empty binding behave differ ently (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7150">#7150</a>)</li> <li>AsyncAPI client payloads written as a <code>$ref</code> with annotation siblings are now typed by the referenced model - This affects the experimental <code>--generate-client</code> option with AsyncAPI input. A message payload written as a <code>$ref</code> beside annotations only (such as a <code>description</code>) is now typed and coded by the model of the schema it names, the same way an OpenAPI body is. Before, it was typed by the payload's own wrapper root model. For example, <code>ChannelPlan[models.FeedTradePayload | models.Quote, Never]</code> becomes <code>ChannelPlan[models.Trade | models.Quote, Never]</code>. Code that annotates or handles session messages as the wrapper model must switch to the referenced model (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7163">#7163</a>)</li> <li>AsyncAPI 2 client unions now list <code>publish</code> messages before <code>subscribe</code> messages - This affects the experimental <code>--generate-client</code> option with AsyncAPI 2 input. The operations of a channel are now read in the parser's order, <code>publish</code> then <code>subscribe</code>, so a stream or channel that carries both has its union written in the opposite order. For example, <code>EventPlan[models.StatusSubscribePayload | models.StatusPublishPayload]</code> becomes <code>EventPlan[models.StatusPublishPayload | models.StatusSubscribePayload]</code> (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7163">#7163</a>)</li> <li>Served OpenAPI document of <code>--generate-server fastapi</code> now resolves references the way the models do (experimental) - The <code>_generated/openapi.json</code> that a generated FastAPI server serves now resolves each <code>$ref</code> through the <code>$id</code>, <code>$anchor</code> and <code>$dynamicAnchor</code> names the parser registers for the models, and no longer uses its own index. Three kinds of reference used to be kept as written with the warning "The served document keeps ..., which names nothing the generation loaded". They now point to the schema the models use: a plain-name reference to an <code>$anchor</code> inside a namespace of definitions (such as <code>$defs: {v1: {Label: {$anchor: label}}}</code>) now points to <code>/components/schemas/Pet/$defs/v1/Label</code>; a reference through the root <code>$id</code> of a referenced JSON Schema document into that document (such as <code>https://example.com/schemas/pet</code> followed by a poi nter to <code>/$defs/Name</code>) is now bundled as a component; and under OpenAPI 3.0, a reference by the <code>$id</code> of a component schema (such as <code>https://example.com/owner.json</code> with <code>--no-allow-remote-refs</code>) now resolves to that component. A plain name whose anchor is also declared by a <code>schema</code> beside a Reference Object (which OpenAPI ignores) now points to the anchored property the models read, not to the ignored schema. The generated models do not change, but regenerating changes the served <code>openapi.json</code>, so <code>--check</code> runs and anything that reads the served document will see different output (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7178">#7178</a>)</li> <li>Served OpenAPI document keeps some pointer references unresolved that it used to bundle (experimental) - With <code>--generate-server fastapi</code>, two kinds of JSON pointer that the models already treat as dangling references (they fall back to <code>Any</code> with a <code>DanglingRefWarning</code>) are now also left as written in the served <code>_generated/openapi.json</code>, and each now emits a <code>DocumentationAnnotationWarning</code>: a pointer below the <code>$id</code> of a parameter document that was first loaded through a pointer (such as <code>/properties/size</code>), and a pointer below the <code>$id</code> of a schema written inline in <code>paths</code> (such as <code>/$defs/Title</code>). The first used to be bundled. The second used to point to the inline schema's own <code>$defs</code> entry. Builds that treat warnings as errors will now fail on these inputs (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/ 7178">#7178</a>)</li> </ul> <h3>API/CLI Changes</h3> <ul> <li>Removed <code>create_module_getattr</code> from <code>datamodel_code_generator.types</code> and <code>datamodel_code_generator.parser.asyncapi</code> - Both modules used to import <code>create_module_getattr</code> from <code>datamodel_code_generator.util</code> for their old lazy <code>__getattr__</code> hooks. That meant <code>from datamodel_code_generator.types import create_module_getattr</code>, the same import from <code>datamodel_code_generator.parser.asyncapi</code>, and star imports of either module all gave you that name. Those imports are gone because the modules now use the internal <code>_lazy_exports</code> helper, so code that reached the function through either module gets <code>ImportError</code> or <code>AttributeError</code>. Import it from <code>datamodel_code_generator.util</code>, where it is still available. (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7155">#7155</a>)</li> <li>Module <code>dir()</code> now lists lazily exported names - The package root, <code>types</code>, <code>util</code>, <code>parser.avro</code>, <code>parser.asyncapi</code>, <code>parser.base</code>, <code>parser.jsonschema</code> and <code>__main__</code> now define <code>__dir__</code>, so <code>dir()</code> now includes lazy names such as <code>StrictTypes</code>, <code>BaseModel</code>, <code>SafeLoader</code>, <code>dataclass_model</code>, <code>msgspec_model</code>, <code>TypedDictModel</code>, <code>Config</code>, <code>generate_dynamic_models</code> and <code>load_pyproject_config</code>, which it used to leave out. Anything that walks <code>dir()</code> and reads each attribute, such as <code>inspect.getmembers()</code>, <code>help()</code> and REPL completion, now imports the modules behind those names. For example, it loads the dataclass and msgspec model modules for <code>parser.base</code> and the protobuf and XML Schema parsers for <code>parser.asyncapi</code>. Al so, once a resolver name in <code>datamodel_code_generator.reference</code> has been read, <code>dir()</code> and <code>__all__</code> now list it once instead of twice. (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7155">#7155</a>)</li> </ul> <h3>Default Behavior Changes</h3> <ul> <li>AsyncAPI client reads channels by the configured <code>--schema-version</code> - This affects the experimental <code>--generate-client</code> option with AsyncAPI input. Channels are now read by the AsyncAPI version the models are read by: <code>--schema-version 2.0</code> or <code>3.0</code> where it is given, else the document's <code>asyncapi</code> field. Before, only the <code>asyncapi</code> field was read. A run that passes a <code>--schema-version</code> different from the document's declared version now reads its channels by that version. This can leave channels out or make the client generation fail, for example a 3.0 document generated with <code>--schema-version 2.0</code> (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7163">#7163</a>)</li> </ul> <h3>Error Handling Changes</h3> <ul> <li>AsyncAPI client skip warnings change in wording, category and order - This affects the experimental <code>--generate-client</code> option with AsyncAPI input. A message <code>$ref</code> that loops is now read as the message it is written in. Its channel is reported under messages without a payload, as "message ... declares no payload", instead of "a message of it references another document". A channel whose messages the parser's walk never reached is now left out with "the messages at ... were not read", for example a reply channel in another document that no channel of the document lists. AsyncAPI 2 skip reasons now list the <code>publish</code> operation's reasons before the <code>subscribe</code> operation's. Tooling that matches these warnings or error messages must be updated (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7163">#7163</a>)</li> </ul> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>Drop the coverage exclusions the suite runs in model/ by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7132">datamodel-code-generator/datamodel-code-generator#7132</a></li> <li>Stamp the upgrade guide entries of 0.98.0 by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7133">datamodel-code-generator/datamodel-code-generator#7133</a></li> <li>Start no second watch generation for changes the last one already saw by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7130">datamodel-code-generator/datamodel-code-generator#7130</a></li> <li>Keep the Pydantic v2 annotated types beside the types they extend by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7139">datamodel-code-generator/datamodel-code-generator#7139</a></li> <li>Refuse retries and sleeps that hide flaky tests by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7138">datamodel-code-generator/datamodel-code-generator#7138</a></li> <li>Count the executed lines of the root modules in coverage by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7142">datamodel-code-generator/datamodel-code-generator#7142</a></li> <li>The connection reader follows references through the parser's keys by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7137">datamodel-code-generator/datamodel-code-generator#7137</a></li> <li>Write constrained union members as Annotated under --use-annotated by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7117">datamodel-code-generator/datamodel-code-generator#7117</a></li> <li>Count the executed lines of the parser modules in coverage by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7140">datamodel-code-generator/datamodel-code-generator#7140</a></li> <li>Hand the decoded document to the first parser by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7134">datamodel-code-generator/datamodel-code-generator#7134</a></li> <li>Print the review checklist a diff triggers by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7143">datamodel-code-generator/datamodel-code-generator#7143</a></li> <li>Record the fast-path module lists that the decoded input changed by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7147">datamodel-code-generator/datamodel-code-generator#7147</a></li> <li>Store a change several lanes send alike once in fix_expected.py by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7149">datamodel-code-generator/datamodel-code-generator#7149</a></li> <li>Take base orders and effective members from the model in the binder by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7150">datamodel-code-generator/datamodel-code-generator#7150</a></li> <li>Choose related tests from scripts/related_tests.toml by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7151">datamodel-code-generator/datamodel-code-generator#7151</a></li> <li>Judge release gaps by the rule each change is judged by by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7146">datamodel-code-generator/datamodel-code-generator#7146</a></li> <li>List lazy public names in dir() from one table per module by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7155">datamodel-code-generator/datamodel-code-generator#7155</a></li> <li>Select the fast-path test when a module its lists name changes by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7156">datamodel-code-generator/datamodel-code-generator#7156</a></li> <li>Collect earlier garbage before warnings are captured; close the worker pipes by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7160">datamodel-code-generator/datamodel-code-generator#7160</a></li> <li>Compare constraint values, not their metadata classes, in behaviour signatures by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7161">datamodel-code-generator/datamodel-code-generator#7161</a></li> <li>Add one source model for the checks that read Python by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7157">datamodel-code-generator/datamodel-code-generator#7157</a></li> <li>Read AsyncAPI client channels and messages the way the models read them by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7163">datamodel-code-generator/datamodel-code-generator#7163</a></li> <li>Answer node bindings, expression uses and type chains in the source model by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7167">datamodel-code-generator/datamodel-code-generator#7167</a></li> <li>Count import cycles as ratchet keys and reject module-level ones by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/pull/7168">datamodel-code-generator/datamodel-code-generator#7168</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/0ed4e7c9b6f6f031103b68006a624f15ea789936"><code>0ed4e7c</code></a> Measure the Pythons that tests start in coverage (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7226">#7226</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/a56301f0c67c77c4f8e70c88b07d9cb0d8414917"><code>a56301f</code></a> Count what only another lane shows: POSIX calls, syntax floor, names (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7225">#7225</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/e639254ab7baac82e7ff96b0d7ce5ec8fd3c6706"><code>e639254</code></a> Generate the decision homes table from one record per decision (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7221">#7221</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/22f861ced35ce636d471a80b856ac82363b890b8"><code>22f861c</code></a> Drop the expected-path arguments of the JSON Schema main tests (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7223">#7223</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/9923650ab596e40f09b80919e9854494fe0bec95"><code>9923650</code></a> Drop the expected-path arguments of the OpenAPI main tests (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7222">#7222</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/b104f7eb09dc5118168ec19b39baa12afcc1d485"><code>b104f7e</code></a> Add the oracle cases of the gate that judges cells by records (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7216">#7216</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/3a6974bf27688bd8f4cc4c5d6587915f8cdf95d1"><code>3a6974b</code></a> Judge a comparison's evidence by the code objects its runs ran (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7215">#7215</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/bdc6419720793ddade5a2131fe508bb3dbde1a53"><code>bdc6419</code></a> Keep main's harness type check green after the capability table merged (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7220">#7220</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/d4ab13988a5800ea160a2e7e003b38cdba514375"><code>d4ab139</code></a> Run the behaviour gate and the source rules when their inputs change (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7214">#7214</a>)</li> <li><a href="https://github.com/datamodel-code-generator/datamodel-code-generator/commit/227a3c2ba9fb10ea8edf2216c371ba9cc67362b9"><code>227a3c2</code></a> Check scripts and the test harness under ty (<a href="https://redirect.github.com/datamodel-code-generator/datamodel-code-generator/issues/7200">#7200</a>)</li> <li>Additional commits viewable in <a href="https://github.com/datamodel-code-generator/datamodel-code-generator/compare/0.96.0...0.99.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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 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> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
