Skip to content

Releases: model-bakers/model_bakery

1.23.4

27 Mar 09:28
b094155

Choose a tag to compare

Changed

  • Fix AttributeError when processing models with reverse ForeignKey relations (ManyToOneRel) (#575)
  • Fix _bulk_create not setting M2M fields on FK-related objects (#583)
  • [dev] Fix type annotations (#584)
  • [dev] Fix remaining ty type errors in baker.py and generators.py (#589)

GitHub Changelog

New Contributors

Full Changelog: 1.23.3...1.23.4

1.23.3

13 Feb 16:46
7d75001

Choose a tag to compare

Changed

  • [dev] Replace mypy with ty as the primary type checker with stricter type checks
  • [dev] Fix ty 0.0.17 compatibility: update rule config, fix generic TypeVar bound, pin minimum version
  • Allow overriding AutoField values via iterators with _quantity and avoid hangs (#577)

GitHub changelog

  • Improve type annotations for stricter type checking (ty) by @amureki in #572
  • [dev]: Replace mypy with ty (experimental) by @amureki in #573
  • Ref #26 -- Add a regression test regarding overriding FK by @amureki in #574
  • Allow overriding AutoField via iterators (#577) by @amureki in #578

Full Changelog: 1.23.2...1.23.3

1.23.2

21 Jan 21:31
dd46418

Choose a tag to compare

What's Changed

  • Fix _bulk_create=True to use bulk_create even without _quantity (#462)

Full Changelog: 1.23.1...1.23.2

1.23.1

21 Jan 20:10
f47bbfb

Choose a tag to compare

What's Changed

Changed

  • Fix _bulk_create for ManyToManyField using custom through models (#477)
  • [dev] Clean up stale TODO and fix signal handler leak in m2m test

Removed

  • [dev] Drop JSONField workarounds from tests

Full Changelog: 1.23.0...1.23.1

1.23.0

19 Jan 09:19
0ab23cc

Choose a tag to compare

What's Changed

Changed

  • Fix related() with FK relations creating duplicate parent entities (#397)
  • [dev] CI: use uv for faster dependency installation and caching
  • [dev] Fix missing psycopg dependency in tox no-contenttypes environment
  • [dev] Fix USE_CONTENTTYPES=False not actually disabling contenttypes in tests

Removed

  • Drop EOL Django 5.0 and 5.1 support

Full Changelog: 1.22.1...1.23.0

1.22.1

16 Jan 18:00
4021e19

Choose a tag to compare

What's Changed

Added

  • [dev] PyPI releases now use trusted publishing

Changed

  • [dev] Switch build backend from hatchling to uv_build

Full Changelog: 1.22.0...1.22.1

1.22.0

16 Jan 14:12
4cdc85f

Choose a tag to compare

What's Changed

  • Ref #61 -- Introduce generators for each integer field by @amureki in #528
  • Fix baker.prepare() with GenericForeignKey to work without database access by @amureki in #501
  • Update reverse FK tests for Django 4.1+ ValueError behavior by @amureki in #347
  • Update seq import from model_bakery.recipe to model_bakery.utils in basic usage docs by @Neutronlul in #559
  • Add type hints to seq()'s increment_by argument by @Neutronlul in #560
  • Remove mentions of the old project by @amureki in #558

New Contributors

Full Changelog: 1.21.0...1.22.0

1.21.0

30 Dec 11:47
da87069

Choose a tag to compare

What's changed

  • Add Python 3.14 support
  • Add Django 6.0 support
  • Drop fallbacks made for Django < 4.2
  • Drop Python 3.8 and 3.9 support (reached end of life)
  • The creation of generic foreign key fields now respects their for_concrete_model configuration
  • Refactor gen_float() to use uniform() with configurable min_float/max_float bounds instead of random() * gen_integer() which produced skewed distribution
  • Refactor gen_interval() to use min_interval/max_interval instead of offset parameter which never worked as intended due to huge MAX_INT range
  • Fix gen_date_range() and gen_datetime_range() to prevent empty ranges by enforcing a minimum interval of 1 day
  • Use baker_random.randint() directly in gen_pg_numbers_range() instead of gen_integer()
  • The gen_from_choices generator now ignores None or "" values in choices when the field doesn't allow null or blank values
  • [dev] Various improvements to CI Python/Django matrices

Meaningful PRs

New Contributors

Full Changelog: 1.20.5...1.21.0

1.20.5

07 Jun 10:21
cc252ef

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.20.4...1.20.5

1.20.4

26 Feb 20:09
2ef7632

Choose a tag to compare

What's Changed

  • fix: should not skip auto now fields but assign with specified value by @mattwang44 in #520

Full Changelog: 1.20.3...1.20.4