-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat(sqla_factory): refresh object in async_session after commit to db #541
Conversation
cc: @adhtruong |
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.
Overall approach looks good and looks good to me other than the comments
I think this PR is ready for review now |
Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/541 |
@all-contributors add @wangxin688 for code |
I've put up a pull request to add @wangxin688! 🎉 |
Bumps [polyfactory](https://github.com/litestar-org/polyfactory) from 2.15.0 to 2.16.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.16.0</h2> <h2>Sponsors 🌟</h2> <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 Contributors</h3> <ul> <li><a href="https://github.com/wangxin688"><code>@wangxin688</code></a> made their first contribution in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/530">litestar-org/polyfactory#530</a></li> <li><a href="https://github.com/impaktor"><code>@impaktor</code></a> made their first contribution in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/537">litestar-org/polyfactory#537</a></li> </ul> <h3>Fixes 🔧</h3> <ul> <li>Ignore non-columns types by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/510">litestar-org/polyfactory#510</a></li> <li>Favour SA mapped type over impl type by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/513">litestar-org/polyfactory#513</a></li> <li>Update typing by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/540">litestar-org/polyfactory#540</a></li> <li>Fix json type error and pg dialect default value by <a href="https://github.com/wangxin688"><code>@wangxin688</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/542">litestar-org/polyfactory#542</a></li> </ul> <h3>New Features 🚀</h3> <ul> <li>Support nested type in pg.array types and others by <a href="https://github.com/wangxin688"><code>@wangxin688</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/530">litestar-org/polyfactory#530</a></li> <li>Refresh object in async_session after commit to db by <a href="https://github.com/wangxin688"><code>@wangxin688</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/541">litestar-org/polyfactory#541</a></li> <li>Copy mutable args by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/529">litestar-org/polyfactory#529</a></li> </ul> <h3>Docs 📚</h3> <ul> <li>Apply organization theme by <a href="https://github.com/JacobCoffee"><code>@JacobCoffee</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/533">litestar-org/polyfactory#533</a></li> <li>Update Polyfactory landing page by <a href="https://github.com/JacobCoffee"><code>@JacobCoffee</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/535">litestar-org/polyfactory#535</a></li> <li>Update changelog.rst by <a href="https://github.com/impaktor"><code>@impaktor</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/537">litestar-org/polyfactory#537</a></li> </ul> <h3>Infra 🚆</h3> <ul> <li>Add codecov coverage, fix badges by <a href="https://github.com/JacobCoffee"><code>@JacobCoffee</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/536">litestar-org/polyfactory#536</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/litestar-org/polyfactory/compare/v2.15.0...v2.16.0">https://github.com/litestar-org/polyfactory/compare/v2.15.0...v2.16.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> <h1>========= Changelog</h1> <p>All commits to this project will be documented in this file.</p> <h2>[unreleased]</h2> <p><code>1d1c7f9 <https://github.com/litestar-org/polyfactory/commit/1d1c7f9d02f9c7a8eb977dc0624bf5a045d55ddc></code>_ is the last commit in the changelog before unreleased changes.</p> <p>Bug Fixes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>719495e <https://github.com/litestar-org/polyfactory/commit/719495e6dca5c6938975b6bc0456205d28e2c90d></code><em>) - Ignore non-columns types (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/510">#510</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#510](litestar-org/polyfactory#510) <https://github.com/litestar-org/polyfactory/pull/510></code>_</li> <li>(<code>bb04b4e <https://github.com/litestar-org/polyfactory/commit/bb04b4e81764289ba5a138c0b82faa73bb4e5257></code><em>) - Favour SA mapped type over impl type (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/513">#513</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#513](litestar-org/polyfactory#513) <https://github.com/litestar-org/polyfactory/pull/513></code>_</li> <li>(<code>0032b5e <https://github.com/litestar-org/polyfactory/commit/0032b5e962906239ecd4c4bd7276dc0d9e9f142d></code><em>) - Add footer to changelog generation by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em></li> <li>(<code>5fd7d6c <https://github.com/litestar-org/polyfactory/commit/5fd7d6c2bedb3c602e009618137c6ab215172625></code><em>) - Resolve mypy issues (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/540">#540</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#540](litestar-org/polyfactory#540) <https://github.com/litestar-org/polyfactory/pull/540></code>_</li> <li>(<code>9e6edab <https://github.com/litestar-org/polyfactory/commit/9e6edabd4ee5242c54f3ddb66e539a415da86901></code><em>) - Fix json type error and pg dialect default value e… (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/542">#542</a>) by <code>@wangxin688 <https://github.com/wangxin688></code></em> in <code>[#542](litestar-org/polyfactory#542) <https://github.com/litestar-org/polyfactory/pull/542></code>_</li> </ul> <p>Documentation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>01d1dbe <https://github.com/litestar-org/polyfactory/commit/01d1dbeb46cc722b075dba85cfd6bcb94505e65d></code><em>) - Apply organization theme (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/533">#533</a>) by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em> in <code>[#533](litestar-org/polyfactory#533) <https://github.com/litestar-org/polyfactory/pull/533></code>_</li> <li>(<code>5a0a5be <https://github.com/litestar-org/polyfactory/commit/5a0a5bed4ddb679868d9365a5ffbcc6c3fed686c></code><em>) - Polyfactory landing page (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/535">#535</a>) by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em> in <code>[#535](litestar-org/polyfactory#535) <https://github.com/litestar-org/polyfactory/pull/535></code>_</li> <li>(<code>2f781ee <https://github.com/litestar-org/polyfactory/commit/2f781eee7f06436661874a4e469c601bb0de6cd4></code><em>) - Add wangxin688 as a contributor for code (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/544">#544</a>) by <code>@allcontributors[bot] <https://github.com/allcontributors[bot]></code></em> in <code>[#544](litestar-org/polyfactory#544) <https://github.com/litestar-org/polyfactory/pull/544></code>_</li> </ul> <p>Features ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>1792c19 <https://github.com/litestar-org/polyfactory/commit/1792c19fc100b16b610902c19c90b2031420c57e></code><em>) - Support nested type in pg.array types and others (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/530">#530</a>) by <code>@wangxin688 <https://github.com/wangxin688></code></em> in <code>[#530](litestar-org/polyfactory#530) <https://github.com/litestar-org/polyfactory/pull/530></code>_</li> <li>(<code>013135c <https://github.com/litestar-org/polyfactory/commit/013135c17387e451d88a7b73157ad08333649112></code><em>) - Refresh object in async_session after commit to db (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/541">#541</a>) by <code>@wangxin688 <https://github.com/wangxin688></code></em> in <code>[#541](litestar-org/polyfactory#541) <https://github.com/litestar-org/polyfactory/pull/541></code>_</li> <li>(<code>e4695a7 <https://github.com/litestar-org/polyfactory/commit/e4695a7d16e1a63b7cce036ca653d839ea0104fb></code><em>) - Copy mutable args (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/529">#529</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#529](litestar-org/polyfactory#529) <https://github.com/litestar-org/polyfactory/pull/529></code>_</li> </ul> <p>Miscellaneous Tasks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>fac9fba <https://github.com/litestar-org/polyfactory/commit/fac9fbad94f0a82a062bfdac11b2da19f906e32f></code><em>) - Upgrade dependencies (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/517">#517</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#517](litestar-org/polyfactory#517) <https://github.com/litestar-org/polyfactory/pull/517></code>_</li> <li>(<code>3da64f6 <https://github.com/litestar-org/polyfactory/commit/3da64f615056c8d2f11c6bfc55c86877a89c2414></code><em>) - Update changelog.rst (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/537">#537</a>) by <code>@impaktor <https://github.com/impaktor></code></em> in <code>[#537](litestar-org/polyfactory#537) <https://github.com/litestar-org/polyfactory/pull/537></code>_</li> <li>(<code>3e2d22c <https://github.com/litestar-org/polyfactory/commit/3e2d22c5bafc5ed984338be54c3eace3cacc720f></code><em>) - Update maintainer emails (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/545">#545</a>) by <code>@guacs <https://github.com/guacs></code></em> in <code>[#545](litestar-org/polyfactory#545) <https://github.com/litestar-org/polyfactory/pull/545></code>_</li> </ul> <p>Ci ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>6507c6d <https://github.com/litestar-org/polyfactory/commit/6507c6d86094dbcf678083e3ce7d06a5b4dd2f60></code><em>) - Add codecov coverage, fix badges (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/536">#536</a>) by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em> in <code>[#536](litestar-org/polyfactory#536) <https://github.com/litestar-org/polyfactory/pull/536></code>_</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/litestar-org/polyfactory/commit/4928f0735ad58adc63f093062b4938dfc5003ea9"><code>4928f07</code></a> chore(release): prepare for v2.16.0 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/546">#546</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/3e2d22c5bafc5ed984338be54c3eace3cacc720f"><code>3e2d22c</code></a> chore: update maintainer emails (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/545">#545</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/e4695a7d16e1a63b7cce036ca653d839ea0104fb"><code>e4695a7</code></a> feat: copy mutable args (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/529">#529</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/3da64f615056c8d2f11c6bfc55c86877a89c2414"><code>3da64f6</code></a> chore: Update changelog.rst (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/537">#537</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/9e6edabd4ee5242c54f3ddb66e539a415da86901"><code>9e6edab</code></a> fix(sqla_factory): fix json type error and pg dialect default value e… (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/542">#542</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/2f781eee7f06436661874a4e469c601bb0de6cd4"><code>2f781ee</code></a> docs: add wangxin688 as a contributor for code (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/544">#544</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/013135c17387e451d88a7b73157ad08333649112"><code>013135c</code></a> feat(sqla_factory): refresh object in async_session after commit to db (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/541">#541</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/1792c19fc100b16b610902c19c90b2031420c57e"><code>1792c19</code></a> feat(sqlfactory): support nested type in pg.array types and others (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/530">#530</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/5fd7d6c2bedb3c602e009618137c6ab215172625"><code>5fd7d6c</code></a> fix: resolve mypy issues (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/540">#540</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/0032b5e962906239ecd4c4bd7276dc0d9e9f142d"><code>0032b5e</code></a> fix(docs): add footer to changelog generation</li> <li>Additional commits viewable in <a href="https://github.com/litestar-org/polyfactory/compare/v2.15.0...v2.16.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.15.0&new-version=2.16.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>
Bumps [polyfactory](https://github.com/litestar-org/polyfactory) from 2.15.0 to 2.16.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.16.0</h2> <h2>Sponsors 🌟</h2> <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 Contributors</h3> <ul> <li><a href="https://github.com/wangxin688"><code>@wangxin688</code></a> made their first contribution in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/530">litestar-org/polyfactory#530</a></li> <li><a href="https://github.com/impaktor"><code>@impaktor</code></a> made their first contribution in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/537">litestar-org/polyfactory#537</a></li> </ul> <h3>Fixes 🔧</h3> <ul> <li>Ignore non-columns types by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/510">litestar-org/polyfactory#510</a></li> <li>Favour SA mapped type over impl type by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/513">litestar-org/polyfactory#513</a></li> <li>Update typing by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/540">litestar-org/polyfactory#540</a></li> <li>Fix json type error and pg dialect default value by <a href="https://github.com/wangxin688"><code>@wangxin688</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/542">litestar-org/polyfactory#542</a></li> </ul> <h3>New Features 🚀</h3> <ul> <li>Support nested type in pg.array types and others by <a href="https://github.com/wangxin688"><code>@wangxin688</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/530">litestar-org/polyfactory#530</a></li> <li>Refresh object in async_session after commit to db by <a href="https://github.com/wangxin688"><code>@wangxin688</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/541">litestar-org/polyfactory#541</a></li> <li>Copy mutable args by <a href="https://github.com/adhtruong"><code>@adhtruong</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/529">litestar-org/polyfactory#529</a></li> </ul> <h3>Docs 📚</h3> <ul> <li>Apply organization theme by <a href="https://github.com/JacobCoffee"><code>@JacobCoffee</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/533">litestar-org/polyfactory#533</a></li> <li>Update Polyfactory landing page by <a href="https://github.com/JacobCoffee"><code>@JacobCoffee</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/535">litestar-org/polyfactory#535</a></li> <li>Update changelog.rst by <a href="https://github.com/impaktor"><code>@impaktor</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/537">litestar-org/polyfactory#537</a></li> </ul> <h3>Infra 🚆</h3> <ul> <li>Add codecov coverage, fix badges by <a href="https://github.com/JacobCoffee"><code>@JacobCoffee</code></a> in <a href="https://redirect.github.com/litestar-org/polyfactory/pull/536">litestar-org/polyfactory#536</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/litestar-org/polyfactory/compare/v2.15.0...v2.16.0">https://github.com/litestar-org/polyfactory/compare/v2.15.0...v2.16.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> <h1>========= Changelog</h1> <p>All commits to this project will be documented in this file.</p> <h2>[unreleased]</h2> <p><code>1d1c7f9 <https://github.com/litestar-org/polyfactory/commit/1d1c7f9d02f9c7a8eb977dc0624bf5a045d55ddc></code>_ is the last commit in the changelog before unreleased changes.</p> <p>Bug Fixes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>719495e <https://github.com/litestar-org/polyfactory/commit/719495e6dca5c6938975b6bc0456205d28e2c90d></code><em>) - Ignore non-columns types (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/510">#510</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#510](litestar-org/polyfactory#510) <https://github.com/litestar-org/polyfactory/pull/510></code>_</li> <li>(<code>bb04b4e <https://github.com/litestar-org/polyfactory/commit/bb04b4e81764289ba5a138c0b82faa73bb4e5257></code><em>) - Favour SA mapped type over impl type (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/513">#513</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#513](litestar-org/polyfactory#513) <https://github.com/litestar-org/polyfactory/pull/513></code>_</li> <li>(<code>0032b5e <https://github.com/litestar-org/polyfactory/commit/0032b5e962906239ecd4c4bd7276dc0d9e9f142d></code><em>) - Add footer to changelog generation by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em></li> <li>(<code>5fd7d6c <https://github.com/litestar-org/polyfactory/commit/5fd7d6c2bedb3c602e009618137c6ab215172625></code><em>) - Resolve mypy issues (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/540">#540</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#540](litestar-org/polyfactory#540) <https://github.com/litestar-org/polyfactory/pull/540></code>_</li> <li>(<code>9e6edab <https://github.com/litestar-org/polyfactory/commit/9e6edabd4ee5242c54f3ddb66e539a415da86901></code><em>) - Fix json type error and pg dialect default value e… (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/542">#542</a>) by <code>@wangxin688 <https://github.com/wangxin688></code></em> in <code>[#542](litestar-org/polyfactory#542) <https://github.com/litestar-org/polyfactory/pull/542></code>_</li> </ul> <p>Documentation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>01d1dbe <https://github.com/litestar-org/polyfactory/commit/01d1dbeb46cc722b075dba85cfd6bcb94505e65d></code><em>) - Apply organization theme (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/533">#533</a>) by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em> in <code>[#533](litestar-org/polyfactory#533) <https://github.com/litestar-org/polyfactory/pull/533></code>_</li> <li>(<code>5a0a5be <https://github.com/litestar-org/polyfactory/commit/5a0a5bed4ddb679868d9365a5ffbcc6c3fed686c></code><em>) - Polyfactory landing page (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/535">#535</a>) by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em> in <code>[#535](litestar-org/polyfactory#535) <https://github.com/litestar-org/polyfactory/pull/535></code>_</li> <li>(<code>2f781ee <https://github.com/litestar-org/polyfactory/commit/2f781eee7f06436661874a4e469c601bb0de6cd4></code><em>) - Add wangxin688 as a contributor for code (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/544">#544</a>) by <code>@allcontributors[bot] <https://github.com/allcontributors[bot]></code></em> in <code>[#544](litestar-org/polyfactory#544) <https://github.com/litestar-org/polyfactory/pull/544></code>_</li> </ul> <p>Features ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>1792c19 <https://github.com/litestar-org/polyfactory/commit/1792c19fc100b16b610902c19c90b2031420c57e></code><em>) - Support nested type in pg.array types and others (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/530">#530</a>) by <code>@wangxin688 <https://github.com/wangxin688></code></em> in <code>[#530](litestar-org/polyfactory#530) <https://github.com/litestar-org/polyfactory/pull/530></code>_</li> <li>(<code>013135c <https://github.com/litestar-org/polyfactory/commit/013135c17387e451d88a7b73157ad08333649112></code><em>) - Refresh object in async_session after commit to db (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/541">#541</a>) by <code>@wangxin688 <https://github.com/wangxin688></code></em> in <code>[#541](litestar-org/polyfactory#541) <https://github.com/litestar-org/polyfactory/pull/541></code>_</li> <li>(<code>e4695a7 <https://github.com/litestar-org/polyfactory/commit/e4695a7d16e1a63b7cce036ca653d839ea0104fb></code><em>) - Copy mutable args (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/529">#529</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#529](litestar-org/polyfactory#529) <https://github.com/litestar-org/polyfactory/pull/529></code>_</li> </ul> <p>Miscellaneous Tasks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>fac9fba <https://github.com/litestar-org/polyfactory/commit/fac9fbad94f0a82a062bfdac11b2da19f906e32f></code><em>) - Upgrade dependencies (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/517">#517</a>) by <code>@adhtruong <https://github.com/adhtruong></code></em> in <code>[#517](litestar-org/polyfactory#517) <https://github.com/litestar-org/polyfactory/pull/517></code>_</li> <li>(<code>3da64f6 <https://github.com/litestar-org/polyfactory/commit/3da64f615056c8d2f11c6bfc55c86877a89c2414></code><em>) - Update changelog.rst (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/537">#537</a>) by <code>@impaktor <https://github.com/impaktor></code></em> in <code>[#537](litestar-org/polyfactory#537) <https://github.com/litestar-org/polyfactory/pull/537></code>_</li> <li>(<code>3e2d22c <https://github.com/litestar-org/polyfactory/commit/3e2d22c5bafc5ed984338be54c3eace3cacc720f></code><em>) - Update maintainer emails (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/545">#545</a>) by <code>@guacs <https://github.com/guacs></code></em> in <code>[#545](litestar-org/polyfactory#545) <https://github.com/litestar-org/polyfactory/pull/545></code>_</li> </ul> <p>Ci ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>(<code>6507c6d <https://github.com/litestar-org/polyfactory/commit/6507c6d86094dbcf678083e3ce7d06a5b4dd2f60></code><em>) - Add codecov coverage, fix badges (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/536">#536</a>) by <code>@JacobCoffee <https://github.com/JacobCoffee></code></em> in <code>[#536](litestar-org/polyfactory#536) <https://github.com/litestar-org/polyfactory/pull/536></code>_</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/litestar-org/polyfactory/commit/4928f0735ad58adc63f093062b4938dfc5003ea9"><code>4928f07</code></a> chore(release): prepare for v2.16.0 (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/546">#546</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/3e2d22c5bafc5ed984338be54c3eace3cacc720f"><code>3e2d22c</code></a> chore: update maintainer emails (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/545">#545</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/e4695a7d16e1a63b7cce036ca653d839ea0104fb"><code>e4695a7</code></a> feat: copy mutable args (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/529">#529</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/3da64f615056c8d2f11c6bfc55c86877a89c2414"><code>3da64f6</code></a> chore: Update changelog.rst (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/537">#537</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/9e6edabd4ee5242c54f3ddb66e539a415da86901"><code>9e6edab</code></a> fix(sqla_factory): fix json type error and pg dialect default value e… (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/542">#542</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/2f781eee7f06436661874a4e469c601bb0de6cd4"><code>2f781ee</code></a> docs: add wangxin688 as a contributor for code (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/544">#544</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/013135c17387e451d88a7b73157ad08333649112"><code>013135c</code></a> feat(sqla_factory): refresh object in async_session after commit to db (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/541">#541</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/1792c19fc100b16b610902c19c90b2031420c57e"><code>1792c19</code></a> feat(sqlfactory): support nested type in pg.array types and others (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/530">#530</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/5fd7d6c2bedb3c602e009618137c6ab215172625"><code>5fd7d6c</code></a> fix: resolve mypy issues (<a href="https://redirect.github.com/litestar-org/polyfactory/issues/540">#540</a>)</li> <li><a href="https://github.com/litestar-org/polyfactory/commit/0032b5e962906239ecd4c4bd7276dc0d9e9f142d"><code>0032b5e</code></a> fix(docs): add footer to changelog generation</li> <li>Additional commits viewable in <a href="https://github.com/litestar-org/polyfactory/compare/v2.15.0...v2.16.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.15.0&new-version=2.16.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>
Description
Use Case: column use
server_default
to generate default value in database side.If we use asyncsession, and access this attribute from orm object, it will raise
sqlalchemy.exc.MissingGreenlet
error.There are two ways to solve this issue.
refresh
tocreate_async()
andcreate_batch_async()
and default value is False. it will depends user's input in creation object.