-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
fix: ensure ABC are not considered a factory type #628
Conversation
|
Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/628 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(reporter of #627 here) Thanks for the very quick fix! |
Bumps [polyfactory](https://github.com/litestar-org/polyfactory) from 2.18.0 to 2.19.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.19.0</h2> <h1>Sponsors 🌟</h1> <p>Thanks to these incredible business sponsors:</p> <p><a href="https://scalar.com/">Scalar</a> (<a href="https://github.com/scalar"><code>@scalar</code></a>), <a href="https://telemetrysports.com/">Telemetry Sports</a> (via <a href="https://github.com/chris-telemetry"><code>@chris-telemetry</code></a>), <a href="https://www.stok.kr/">Stok</a> (<a href="https://github.com/stok-team"><code>@stok-team</code></a>)</p> <p>A huge 'Thank you!' to all other sponsors across <a href="https://polar.sh/litestar-org">Polar.sh</a>, <a href="https://opencollective.com/litestar">OpenCollective</a> and <a href="https://github.com/sponsors/litestar-org/">GitHub Sponsors</a>!</p> <h2>What's Changed</h2> <h3>New Features 🚀</h3> <ul> <li>feat(sqla_factory): added <strong>set_association_proxy</strong> attribute by <a href="https://github.com/nisemenov"><code>@nisemenov</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/629">litestar-org/polyfactory#629</a></li> </ul> <h3>Fixes 🔧</h3> <ul> <li>fix: lock PDM version to support 3.8 by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/609">litestar-org/polyfactory#609</a></li> <li>fix: update security alert by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/615">litestar-org/polyfactory#615</a></li> <li>fix: Pydantic 2.10 compatibility by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/613">litestar-org/polyfactory#613</a></li> <li>fix: ensure ABC are not considered a factory type by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/628">litestar-org/polyfactory#628</a></li> <li>fix(sqla_factory): added an async context manager in SQLAASyncPersistence by <a href="https://github.com/nisemenov"><code>@nisemenov</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/630">litestar-org/polyfactory#630</a></li> </ul> <h3>Infra 🚆</h3> <ul> <li>build: update pre-commit dependencies by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/614">litestar-org/polyfactory#614</a></li> <li>build: migrate to uv by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/612">litestar-org/polyfactory#612</a></li> <li>chore(deps): bump astral-sh/setup-uv from 4 to 5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/622">litestar-org/polyfactory#622</a></li> <li>refactor: update Pydantic imports by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/625">litestar-org/polyfactory#625</a></li> <li>build: support 3.13 by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/599">litestar-org/polyfactory#599</a></li> <li>chore(deps): bump dawidd6/action-download-artifact from 3 to 7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/619">litestar-org/polyfactory#619</a></li> <li>build: change deprecated action by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/626">litestar-org/polyfactory#626</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/nisemenov"><code>@nisemenov</code></a> made their first contribution in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/630">litestar-org/polyfactory#630</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/litestar-org/polyfactory/compare/v2.18.1...v2.19.0">https://github.com/litestar-org/polyfactory/compare/v2.18.1...v2.19.0</a></p> <h2>v2.18.1</h2> <h1>Sponsors 🌟</h1> <p>Thanks to these incredible business sponsors:</p> <p><a href="https://scalar.com/">Scalar</a> (<a href="https://github.com/scalar"><code>@scalar</code></a>), <a href="https://telemetrysports.com/">Telemetry Sports</a> (via <a href="https://github.com/chris-telemetry"><code>@chris-telemetry</code></a>), <a href="https://www.stok.kr/">Stok</a> (<a href="https://github.com/stok-team"><code>@stok-team</code></a>)</p> <p>A huge 'Thank you!' to all other sponsors across <a href="https://polar.sh/litestar-org">Polar.sh</a>, <a href="https://opencollective.com/litestar">OpenCollective</a> and <a href="https://github.com/sponsors/litestar-org/">GitHub Sponsors</a>!</p> <h2>What's Changed</h2> <ul> <li>fix: handle nullable SQLA constraints by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/602">litestar-org/polyfactory#602</a></li> <li>chore(release): bump release version by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/608">litestar-org/polyfactory#608</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </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> <h1>========= Changelog</h1> <p>All commits to this project will be documented in this file.</p> <h2>[unreleased]</h2> <p><code>0290580 <https://github.com/litestar-org/polyfactory/commit/029058005ff9681f5b9f3e2adf2030dfb40d21d5></code>_ is the last commit in the changelog before unreleased changes.</p> <p>Bug Fixes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>e1c5b8c <https://github.com/litestar-org/polyfactory/commit/e1c5b8c9f2c63604a3856937e772b4081c77ca90></code><em>) - Lock PDM version to support 3.8 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/609">#609</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#609](litestar-org/polyfactory#609) <https://github.com/litestar-org/polyfactory/pull/609></code>_</li> <li>(<code>f526601 <https://github.com/litestar-org/polyfactory/commit/f526601b080479963d431d36545c129be47ad161></code><em>) - Pydantic 2.10 compatibility (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/613">#613</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#613](litestar-org/polyfactory#613) <https://github.com/litestar-org/polyfactory/pull/613></code>_</li> <li>(<code>1e0c847 <https://github.com/litestar-org/polyfactory/commit/1e0c847deb762a8305edaf03a6e0a2a1e86a266e></code><em>) - Update security alert (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/615">#615</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#615](litestar-org/polyfactory#615) <https://github.com/litestar-org/polyfactory/pull/615></code>_</li> <li>(<code>135bbc0 <https://github.com/litestar-org/polyfactory/commit/135bbc03370212729350fd098b5d0a1cb227f388></code><em>) - Ensure ABC are not considered a factory type (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/628">#628</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#628](litestar-org/polyfactory#628) <https://github.com/litestar-org/polyfactory/pull/628></code>_</li> <li>(<code>137bfb9 <https://github.com/litestar-org/polyfactory/commit/137bfb9cb4f50b4b4397949bbf80b86a52483029></code><em>) - Added an async context manager in SQLAASyncPersistence (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/630">#630</a>) by <code>@nisemenov <https://github.com/nisemenov></code></em> in <code>[#630](litestar-org/polyfactory#630) <https://github.com/litestar-org/polyfactory/pull/630></code>_</li> </ul> <p>Features ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>42999fa <https://github.com/litestar-org/polyfactory/commit/42999fa015d70bae78ad67f7af160b6be2c2a90e></code><em>) - Added <strong>set_association_proxy</strong> attribute (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/629">#629</a>) by <code>@nisemenov <https://github.com/nisemenov></code></em> in <code>[#629](litestar-org/polyfactory#629) <https://github.com/litestar-org/polyfactory/pull/629></code>_</li> </ul> <p>Miscellaneous Tasks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>d6a886a <https://github.com/litestar-org/polyfactory/commit/d6a886a4f3b33c77774e14ec190531128ce504c2></code><em>) - Bump astral-sh/setup-uv from 4 to 5 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/622">#622</a>) by <code>@dependabot[bot] <https://github.com/dependabot[bot]></code></em> in <code>[#622](litestar-org/polyfactory#622) <https://github.com/litestar-org/polyfactory/pull/622></code>_</li> <li>(<code>9db2ee7 <https://github.com/litestar-org/polyfactory/commit/9db2ee726592c8b24b853e5f1d9c22df016be5c3></code><em>) - Bump dawidd6/action-download-artifact from 3 to 7 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/619">#619</a>) by <code>@dependabot[bot] <https://github.com/dependabot[bot]></code></em> in <code>[#619](litestar-org/polyfactory#619) <https://github.com/litestar-org/polyfactory/pull/619></code>_</li> </ul> <p>Refactor ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>a7dda85 <https://github.com/litestar-org/polyfactory/commit/a7dda85319bcefa0df4aef9fc75e6c0813cd7596></code><em>) - Update Pydantic imports (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/625">#625</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#625](litestar-org/polyfactory#625) <https://github.com/litestar-org/polyfactory/pull/625></code>_</li> </ul> <p>Build ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>9ee5852 <https://github.com/litestar-org/polyfactory/commit/9ee585214ea916751e48e36ac52dad6169d82519></code><em>) - Update pre-commit dependencies (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/614">#614</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#614](litestar-org/polyfactory#614) <https://github.com/litestar-org/polyfactory/pull/614></code>_</li> <li>(<code>9fa4ad9 <https://github.com/litestar-org/polyfactory/commit/9fa4ad913dcbef60440f1c5022581ef352c7cceb></code><em>) - Migrate to uv (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/612">#612</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#612](litestar-org/polyfactory#612) <https://github.com/litestar-org/polyfactory/pull/612></code>_</li> <li>(<code>d374de5 <https://github.com/litestar-org/polyfactory/commit/d374de52a6524a0eb3126483f6ea25812df59566></code><em>) - Support 3.13 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/599">#599</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#599](litestar-org/polyfactory#599) <https://github.com/litestar-org/polyfactory/pull/599></code>_</li> <li>(<code>d2ef554 <https://github.com/litestar-org/polyfactory/commit/d2ef5549a20da966a992f96145d2a46bd4f3d570></code><em>) - Change deprecated action (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/626">#626</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#626](litestar-org/polyfactory#626) <https://github.com/litestar-org/polyfactory/pull/626></code>_</li> </ul> <h2><code>Release [v2.18.1] - 2024-11-26 <https://github.com/litestar-org/polyfactory/releases/tag/v2.18.1></code>_</h2> <ul> <li><code>See All commits in v2.18.1 <https://github.com/litestar-org/polyfactory/commits/v2.18.1></code>_</li> </ul> <p><code>f7b5d8b <https://github.com/litestar-org/polyfactory/commit/f7b5d8bb9410d40dc6073d9ca7f2cdec878bc419></code>_ ... <code>0290580 <https://github.com/litestar-org/polyfactory/commit/029058005ff9681f5b9f3e2adf2030dfb40d21d5></code>_ | <code>See diff for 2.18.1 <https://github.com/litestar-org/polyfactory/compare/f7b5d8bb9410d40dc6073d9ca7f2cdec878bc419...029058005ff9681f5b9f3e2adf2030dfb40d21d5></code>_</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/litestar-org/polyfactory/commit/de789499f8b16b49c9fae5954cfba8ad868fff58"><code>de78949</code></a> chore: prep 2.19.0 release (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/637">#637</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/42999fa015d70bae78ad67f7af160b6be2c2a90e"><code>42999fa</code></a> feat(sqla_factory): added <strong>set_association_proxy</strong> attribute (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/629">#629</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/137bfb9cb4f50b4b4397949bbf80b86a52483029"><code>137bfb9</code></a> fix(sqla_factory): added an async context manager in SQLAASyncPersistence (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/630">#630</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/135bbc03370212729350fd098b5d0a1cb227f388"><code>135bbc0</code></a> fix: ensure ABC are not considered a factory type (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/628">#628</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/d2ef5549a20da966a992f96145d2a46bd4f3d570"><code>d2ef554</code></a> build: change deprecated action (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/626">#626</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/9db2ee726592c8b24b853e5f1d9c22df016be5c3"><code>9db2ee7</code></a> chore(deps): bump dawidd6/action-download-artifact from 3 to 7 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/619">#619</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/d374de52a6524a0eb3126483f6ea25812df59566"><code>d374de5</code></a> build: support 3.13 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/599">#599</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/a7dda85319bcefa0df4aef9fc75e6c0813cd7596"><code>a7dda85</code></a> refactor: update Pydantic imports (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/625">#625</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/d6a886a4f3b33c77774e14ec190531128ce504c2"><code>d6a886a</code></a> chore(deps): bump astral-sh/setup-uv from 4 to 5 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/622">#622</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/9fa4ad913dcbef60440f1c5022581ef352c7cceb"><code>9fa4ad9</code></a> build: migrate to uv (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/612">#612</a>)</li> <li>Additional commits viewable in <a href="https://github.com/litestar-org/polyfactory/compare/v2.18.0...v2.19.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 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Description
abc.ABC
cannot be instantiated so does not make sense for these to be considered factory typesCloses
get_provider_map
to override an abstract class, the abstract class is still wrongly instanciated #627