Skip to content

chore: remove usage of _AnnotatedAlias#693

Merged
adhtruong merged 1 commit intomainfrom
chore-remove-annotated-alias
Apr 18, 2025
Merged

chore: remove usage of _AnnotatedAlias#693
adhtruong merged 1 commit intomainfrom
chore-remove-annotated-alias

Conversation

@adhtruong
Copy link
Copy Markdown
Collaborator

@adhtruong adhtruong commented Apr 18, 2025

@adhtruong adhtruong requested a review from vkcku as a code owner April 18, 2025 10:53
@adhtruong adhtruong enabled auto-merge (squash) April 18, 2025 10:54
@github-actions
Copy link
Copy Markdown

Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/693

@adhtruong adhtruong changed the title chore: remove _AnnotatedAlias chore: remove usage of _AnnotatedAlias Apr 18, 2025
@adhtruong adhtruong merged commit 82baed7 into main Apr 18, 2025
26 checks passed
@adhtruong adhtruong deleted the chore-remove-annotated-alias branch April 18, 2025 12:20
github-merge-queue bot pushed a commit to mozilla/experimenter that referenced this pull request Jul 8, 2025
Bumps [polyfactory](https://github.com/litestar-org/polyfactory) from
2.21.0 to 2.22.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/litestar-org/polyfactory/releases">polyfactory's
releases</a>.</em></p>
<blockquote>
<h2>v2.22.0</h2>
<h2>What's Changed</h2>
<ul>
<li>chore: remove usage of _AnnotatedAlias by <a
href="https://github.com/adhtruong"><code>@​adhtruong</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/693">litestar-org/polyfactory#693</a></li>
<li>chore: warn on deprecated parameter usage by <a
href="https://github.com/adhtruong"><code>@​adhtruong</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/689">litestar-org/polyfactory#689</a></li>
<li>feat: Allow usage of Pydantic models containing forward references
by <a
href="https://github.com/marcuslimdw"><code>@​marcuslimdw</code></a> in
<a
href="https://redirect.github.com/litestar-org/polyfactory/pull/698">litestar-org/polyfactory#698</a></li>
<li>chore(deps): bump astral-sh/setup-uv from 5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/696">litestar-org/polyfactory#696</a></li>
<li>docs: add marcuslimdw as a contributor for code by <a
href="https://github.com/allcontributors"><code>@​allcontributors</code></a>
in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/699">litestar-org/polyfactory#699</a></li>
<li>refactor: make type utils deterministic by <a
href="https://github.com/adhtruong"><code>@​adhtruong</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/688">litestar-org/polyfactory#688</a></li>
<li>perf: avoid deep copy by <a
href="https://github.com/adhtruong"><code>@​adhtruong</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/702">litestar-org/polyfactory#702</a></li>
<li>fix: test by adding inheritance in Child class from Parent by <a
href="https://github.com/Rub1kCube"><code>@​Rub1kCube</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/706">litestar-org/polyfactory#706</a></li>
<li>docs: add Rub1kCube as a contributor for test by <a
href="https://github.com/allcontributors"><code>@​allcontributors</code></a>
in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/708">litestar-org/polyfactory#708</a></li>
<li>chore(deps): bump dawidd6/action-download-artifact from 9 to 10 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/litestar-org/polyfactory/pull/709">litestar-org/polyfactory#709</a></li>
<li>fix: Generate correct collection size when annotation_types.Len is
used by <a
href="https://github.com/priyankc"><code>@​priyankc</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/712">litestar-org/polyfactory#712</a></li>
<li>chore(deps): bump dawidd6/action-download-artifact from 10 to 11 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/litestar-org/polyfactory/pull/714">litestar-org/polyfactory#714</a></li>
<li>fix: no blank children names by <a
href="https://github.com/iloveitaly"><code>@​iloveitaly</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/666">litestar-org/polyfactory#666</a></li>
<li>feat: add PEP 695 type alias support and improve type handling by <a
href="https://github.com/Rub1kCube"><code>@​Rub1kCube</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/711">litestar-org/polyfactory#711</a></li>
<li>chore(release): bump to v2.22.0 by <a
href="https://github.com/adhtruong"><code>@​adhtruong</code></a> in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/722">litestar-org/polyfactory#722</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/marcuslimdw"><code>@​marcuslimdw</code></a>
made their first contribution in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/698">litestar-org/polyfactory#698</a></li>
<li><a href="https://github.com/Rub1kCube"><code>@​Rub1kCube</code></a>
made their first contribution in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/706">litestar-org/polyfactory#706</a></li>
<li><a href="https://github.com/priyankc"><code>@​priyankc</code></a>
made their first contribution in <a
href="https://redirect.github.com/litestar-org/polyfactory/pull/712">litestar-org/polyfactory#712</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/litestar-org/polyfactory/compare/v2.21.0...v2.22.0">https://github.com/litestar-org/polyfactory/compare/v2.21.0...v2.22.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/litestar-org/polyfactory/blob/main/docs/changelog.rst">polyfactory's
changelog</a>.</em></p>
<blockquote>
<h2><code>Release [v2.22.0] - 2025-07-01
&lt;https://github.com/litestar-org/polyfactory/releases/tag/v2.22.0&gt;</code>_</h2>
<ul>
<li><code>See All commits in v2.22.0
&lt;https://github.com/litestar-org/polyfactory/commits/v2.22.0&gt;</code>_</li>
</ul>
<p><code>203310b
&lt;https://github.com/litestar-org/polyfactory/commit/203310bfa4a8054efb59c1bda34715d4196a7954&gt;</code>_
... <code>c7a7b44
&lt;https://github.com/litestar-org/polyfactory/commit/c7a7b4426126d0134d531fc4db34199d39c46298&gt;</code>_
| <code>See diff for 2.22.0
&lt;https://github.com/litestar-org/polyfactory/compare/203310bfa4a8054efb59c1bda34715d4196a7954...c7a7b4426126d0134d531fc4db34199d39c46298&gt;</code>_</p>
<p>Bug Fixes

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li>(<code>94eb1bf
&lt;https://github.com/litestar-org/polyfactory/commit/94eb1bfc3f947a4090157bc7bdcec19e8c530dd8&gt;</code><em>)
- Test by adding inheritance in Child class from Parent (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/706">#706</a>)
by <code>@Rub1kCube &lt;https://github.com/Rub1kCube&gt;</code></em> in
<code>[#706](litestar-org/polyfactory#706)
&lt;https://github.com/litestar-org/polyfactory/pull/706&gt;</code>_</li>
<li>(<code>dbcf79d
&lt;https://github.com/litestar-org/polyfactory/commit/dbcf79db38fffdcae7599b5cd2806261ab58fd79&gt;</code><em>)
- Generate correct collection size when annotation_types.Len is used (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/712">#712</a>)
by <code>@priyankc &lt;https://github.com/priyankc&gt;</code></em> in
<code>[#712](litestar-org/polyfactory#712)
&lt;https://github.com/litestar-org/polyfactory/pull/712&gt;</code>_</li>
<li>(<code>216b8a5
&lt;https://github.com/litestar-org/polyfactory/commit/216b8a50451f01a49967bcc7e028a5e0803a108c&gt;</code><em>)
- No blank children names (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/666">#666</a>)
by <code>@iloveitaly &lt;https://github.com/iloveitaly&gt;</code></em>
in <code>[#666](litestar-org/polyfactory#666)
&lt;https://github.com/litestar-org/polyfactory/pull/666&gt;</code>_</li>
</ul>
<p>Documentation

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li>(<code>3b541b6
&lt;https://github.com/litestar-org/polyfactory/commit/3b541b66c1ef4d5cb3ecc3071ee3d1921257c99e&gt;</code><em>)
- Add marcuslimdw as a contributor for code (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/699">#699</a>)
by <code>@allcontributors[bot]
&lt;https://github.com/allcontributors[bot]&gt;</code></em> in
<code>[#699](litestar-org/polyfactory#699)
&lt;https://github.com/litestar-org/polyfactory/pull/699&gt;</code>_</li>
<li>(<code>a34e7d3
&lt;https://github.com/litestar-org/polyfactory/commit/a34e7d37b727835f4f4aad19dc42c9f5009c366d&gt;</code><em>)
- Add Rub1kCube as a contributor for test (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/708">#708</a>)
by <code>@allcontributors[bot]
&lt;https://github.com/allcontributors[bot]&gt;</code></em> in
<code>[#708](litestar-org/polyfactory#708)
&lt;https://github.com/litestar-org/polyfactory/pull/708&gt;</code>_</li>
</ul>
<p>Features

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li>(<code>5de22fa
&lt;https://github.com/litestar-org/polyfactory/commit/5de22fa1331e36fc506088af21430ba58f11fc94&gt;</code><em>)
- Allow usage of Pydantic models containing forward references (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/698">#698</a>)
by <code>@marcuslimdw &lt;https://github.com/marcuslimdw&gt;</code></em>
in <code>[#698](litestar-org/polyfactory#698)
&lt;https://github.com/litestar-org/polyfactory/pull/698&gt;</code>_</li>
<li>(<code>c7a7b44
&lt;https://github.com/litestar-org/polyfactory/commit/c7a7b4426126d0134d531fc4db34199d39c46298&gt;</code><em>)
- Add PEP 695 type alias support and improve type handling (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/711">#711</a>)
by <code>@Rub1kCube &lt;https://github.com/Rub1kCube&gt;</code></em> in
<code>[#711](litestar-org/polyfactory#711)
&lt;https://github.com/litestar-org/polyfactory/pull/711&gt;</code>_</li>
</ul>
<p>Miscellaneous Tasks

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li>(<code>82baed7
&lt;https://github.com/litestar-org/polyfactory/commit/82baed7c2c252964381a751d8639e781662655f3&gt;</code><em>)
- Remove <em>AnnotatedAlias (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/693">#693</a>)
by <code>@adhtruong &lt;https://github.com/adhtruong&gt;</code></em> in
<code>[#693](litestar-org/polyfactory#693)
&lt;https://github.com/litestar-org/polyfactory/pull/693&gt;</code></em></li>
<li>(<code>5d97be2
&lt;https://github.com/litestar-org/polyfactory/commit/5d97be2424f03fa098741c1f93e2be832dcd3950&gt;</code><em>)
- Warn on deprecated parameter usage (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/689">#689</a>)
by <code>@adhtruong &lt;https://github.com/adhtruong&gt;</code></em> in
<code>[#689](litestar-org/polyfactory#689)
&lt;https://github.com/litestar-org/polyfactory/pull/689&gt;</code>_</li>
<li>(<code>aff32a0
&lt;https://github.com/litestar-org/polyfactory/commit/aff32a03de6c2b2282b2a28db88d03fb67ffb150&gt;</code><em>)
- Bump astral-sh/setup-uv from 5 to 6 (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/696">#696</a>)
by <code>@dependabot[bot]
&lt;https://github.com/dependabot[bot]&gt;</code></em> in
<code>[#696](litestar-org/polyfactory#696)
&lt;https://github.com/litestar-org/polyfactory/pull/696&gt;</code>_</li>
<li>(<code>d03aa1b
&lt;https://github.com/litestar-org/polyfactory/commit/d03aa1bfb6221d87cf5d83ad184beaf2d4d77178&gt;</code><em>)
- Bump dawidd6/action-download-artifact from 9 to 10 (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/709">#709</a>)
by <code>@dependabot[bot]
&lt;https://github.com/dependabot[bot]&gt;</code></em> in
<code>[#709](litestar-org/polyfactory#709)
&lt;https://github.com/litestar-org/polyfactory/pull/709&gt;</code>_</li>
<li>(<code>0cd86d2
&lt;https://github.com/litestar-org/polyfactory/commit/0cd86d2bf93efaddc1c994e21ead4714273182ec&gt;</code><em>)
- Bump dawidd6/action-download-artifact from 10 to 11 (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/714">#714</a>)
by <code>@dependabot[bot]
&lt;https://github.com/dependabot[bot]&gt;</code></em> in
<code>[#714](litestar-org/polyfactory#714)
&lt;https://github.com/litestar-org/polyfactory/pull/714&gt;</code>_</li>
</ul>
<p>Performance

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li>(<code>0d55db8
&lt;https://github.com/litestar-org/polyfactory/commit/0d55db8a6ac21e559f6524148de8e50323714994&gt;</code><em>)
- Avoid deep copy (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/702">#702</a>)
by <code>@adhtruong &lt;https://github.com/adhtruong&gt;</code></em> in
<code>[#702](litestar-org/polyfactory#702)
&lt;https://github.com/litestar-org/polyfactory/pull/702&gt;</code>_</li>
</ul>
<p>Refactor

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li>(<code>6281fb2
&lt;https://github.com/litestar-org/polyfactory/commit/6281fb223b893c2a808bcc9920856ed2c948d740&gt;</code><em>)
- Make type utils deterministic (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/688">#688</a>)
by <code>@adhtruong &lt;https://github.com/adhtruong&gt;</code></em> in
<code>[#688](litestar-org/polyfactory#688)
&lt;https://github.com/litestar-org/polyfactory/pull/688&gt;</code>_</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/f270b0fb46f36b32db0a1c9f9d2cea25c59b8f22"><code>f270b0f</code></a>
chore(release): bump to v2.22.0 (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/722">#722</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/c7a7b4426126d0134d531fc4db34199d39c46298"><code>c7a7b44</code></a>
feat: add PEP 695 type alias support and improve type handling (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/711">#711</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/216b8a50451f01a49967bcc7e028a5e0803a108c"><code>216b8a5</code></a>
fix: no blank children names (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/666">#666</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/0cd86d2bf93efaddc1c994e21ead4714273182ec"><code>0cd86d2</code></a>
chore(deps): bump dawidd6/action-download-artifact from 10 to 11 (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/714">#714</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/dbcf79db38fffdcae7599b5cd2806261ab58fd79"><code>dbcf79d</code></a>
fix: Generate correct collection size when annotation_types.Len is used
(<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/712">#712</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/d03aa1bfb6221d87cf5d83ad184beaf2d4d77178"><code>d03aa1b</code></a>
chore(deps): bump dawidd6/action-download-artifact from 9 to 10 (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/709">#709</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/a34e7d37b727835f4f4aad19dc42c9f5009c366d"><code>a34e7d3</code></a>
docs: add Rub1kCube as a contributor for test (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/708">#708</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/94eb1bfc3f947a4090157bc7bdcec19e8c530dd8"><code>94eb1bf</code></a>
fix: test by adding inheritance in Child class from Parent (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/706">#706</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/0d55db8a6ac21e559f6524148de8e50323714994"><code>0d55db8</code></a>
perf: avoid deep copy (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/702">#702</a>)</li>
<li><a
href="https://github.com/litestar-org/polyfactory/commit/6281fb223b893c2a808bcc9920856ed2c948d740"><code>6281fb2</code></a>
refactor: make type utils deterministic (<a
href="https://redirect.github.com/litestar-org/polyfactory/issues/688">#688</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/litestar-org/polyfactory/compare/v2.21.0...v2.22.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=polyfactory&package-manager=pip&previous-version=2.21.0&new-version=2.22.0)](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 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

2 participants