Skip to content

Releases: litestar-org/polyfactory

v2.13.0

19 Dec 04:42
8dc8e1a
Compare
Choose a tag to compare

❤️ Sponsors ❤️

GitHub Sponsors: Scalar, Telemetry Sports (via @chris-telemetry) @benjamin-kirkbride @crisog @geeshta
OpenCollective: Christian Y, Anonymous

What's Changed

New Features 🚀

  • Infer __model__ from generic type args by @Mityuha in #452

Fixes 🔧

  • Handle Optional types in flatten_annotation by @sam-or in #440
  • Don't blindly suppress ValueError by @guacs in #450

New Contributors

Full Changelog: v2.12.0...v2.13.0

v2.12.0

13 Nov 05:56
fe05c4e
Compare
Choose a tag to compare

❤️ Sponsors ❤️

GitHub Sponsors: Telemetry Sports (via @chris-telemetry) @benjamin-kirkbride @crisog @geeshta
OpenCollective: Christian Y, Anonymous

What's Changed

New Features 🚀

  • Set factory.__model__ as default for model argument in create_factory by @g0di in #429
  • Model type coverage generation by @sam-or in #390

Fixes 🔧

  • Handle cases where 'init=False' for dataclasses and attrs models by @guacs in #433
  • Correctly handle collections with constrained items by @guacs in #436

New Contributors

Full Changelog: v2.11.0...v2.12.0

v2.11.0

23 Oct 14:01
b7b88a8
Compare
Choose a tag to compare

💰 Sponsors 💰

GitHub Sponsors: @benjamin-kirkbride @crisog
OpenCollective: Christian Y, Anonymous

What's Changed

New Features 🚀

  • Check if fields declared on the factory belong to the model by @johnraz in #405
  • Support annotation with Constraints by @guacs in #411
  • Deprecate FieldMeta collection params by @adhtruong in #417

Fixes 🔧

  • Handle Required and NonRequired annotations in TypedDict by @guacs in #422
  • Respect override of optional nested model fields through kwargs passed to the build method by @julioolvr in #420

Infra 🚆

  • Update installation of dependencies for document generation by @adhtruong in #414

Documentation 📚

  • Reorder documentation and add documentation on factories as fields by @adhtruong in #418

New Contributors

Full Changelog: v2.10.0...v2.11.0

v2.10.0

16 Oct 03:28
63aa272
Compare
Choose a tag to compare

💰 Sponsors 💰

GitHub Sponsors: @benjamin-kirkbride @crisog
OpenCollective: Christian Y, Anonymous

What's Changed

New Features 🚀

Fixes 🔧

  • Properly resolve dataclass forward references by @guacs in #383
  • Fix alternative version installation by @adhtruong in #389
  • Decouple the handling of collection length configuration from FieldMeta by @guacs in #407
  • Move creation of pydantic provider map by @guacs in #396
  • Refactor the msgspec factory to use the fields API by @guacs in #409

Infra 🚆

Full Changelog: v2.9.0...v2.10.0

v2.9.0

19 Sep 03:08
f2c6fe1
Compare
Choose a tag to compare

🎉 New Contributors 🎉

💰 Sponsors 💰

GitHub Sponsors: @benjamin-kirkbride, @crisog
OpenCollective: Christian Y, GitHub Sponsors, Shubham Prajapati, Snyk, Matteo

What's Changed

New Features 🚀

🔧 Fixes

  • Properly type hint create_factory by @guacs in #360
  • Properly handle stringified/forward annotations in attrs models by @guacs in #370
  • Don't register AttrsFactory by default in attrs models by @guacs in #370
  • Handle size=0 constraints for collections by @adhtruong in #373
  • Use dataclasses API for parsing dataclass models by @anthonyjgraff in #371

Infra 🚆

Full Changelog: v2.8.2...v2.9.0

v2.8.2

16 Sep 02:56
ebf30ff
Compare
Choose a tag to compare

🎉 New Contributors 🎉

💰 Sponsors 💰

GitHub Sponsors: @benjamin-kirkbride, @crisog
OpenCollective: Christian Y, GitHub Sponsors, Shubham Prajapati, Snyk

What's Changed

🔧 Fixes

  • fix: properly set annotation in union with Annotated constraints in subtypes by @guacs in #355
  • fix: add minimum version constraint to attrs by @guacs in #359

📚 Documentation

  • docs: change the comment length in "Handling custom types" docs by @sobolevn in #361

Full Changelog: v2.8.1...v2.8.2

v2.8.1

10 Sep 14:58
7af5469
Compare
Choose a tag to compare

What's Changed

Fixes 🔧

  • Add missing factories to builtin registration by @guacs in #351

Docs 📄

Infra 🚆

Full Changelog: v2.8.0...v2.8.1

v2.8.0

26 Aug 12:37
7b46b57
Compare
Choose a tag to compare

🎉 New Contributors 🎉

What's Changed

New Features 🚀

  • Added support for constraints for mapping types by @guacs in #337
  • Added support for pydantic's date types by @185504a9 in #333

Fixes 🔧

  • Ensure no override of Faker instance by @guacs in #331

Infra 🚆

Full Changelog: v2.7.2...v2.8.0

v2.7.2

09 Aug 11:30
710d3ce
Compare
Choose a tag to compare

Fixes 🔧

Full Changelog: v2.7.1...v2.7.2

v2.7.1

08 Aug 17:05
04a504b
Compare
Choose a tag to compare

🎉 New Contributors 🎉

What's Changed

Infra 🚆

Fixes 🔧

  • fix: add support for Json type in Pydantic factory by @guacs in #315
  • fix: constrained strings not deterministic with seed because urandom not seedable by @klimantje in #319
  • fix: random seed configuration by @guacs in #321
  • fix: include Pydantic Field constraints when using Optional type by @tcrasset in #323

Full Changelog: v2.7.0...v2.7.1