Releases: model-bakers/model_bakery
Releases · model-bakers/model_bakery
1.23.4
Changed
- Fix AttributeError when processing models with reverse ForeignKey relations (
ManyToOneRel) (#575) - Fix
_bulk_createnot 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
- Fix type annotations by @amureki in #584
- Bump pillow from 12.0.0 to 12.1.1 by @dependabot[bot] in #586
- Bump django from 5.2.9 to 5.2.12 by @dependabot[bot] in #585
- Bump actions/upload-artifact from 6 to 7 by @dependabot[bot] in #581
- Bump actions/download-artifact from 7 to 8 by @dependabot[bot] in #580
- Bump urllib3 from 2.6.2 to 2.6.3 by @dependabot[bot] in #587
- Bump black from 25.12.0 to 26.3.1 by @dependabot[bot] in #588
- Update uv-build requirement from <0.10.0,>=0.9.26 to >=0.9.26,<0.11.0 by @dependabot[bot] in #579
- Add regression test for bulk_create with M2M field using explicit related_name by @benaduo in #582
- Fix remaining ty type errors in baker.py and generators.py by @benaduo in #589
- Fix bulk_create not setting M2M on FK-related objects by @benaduo in #583
- Bump requests from 2.32.5 to 2.33.0 by @dependabot[bot] in #590
- Fix AttributeError on ManyToOneRel fields (#575) by @amureki in #576
New Contributors
Full Changelog: 1.23.3...1.23.4
1.23.3
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
AutoFieldvalues via iterators with_quantityand 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
AutoFieldvia iterators (#577) by @amureki in #578
Full Changelog: 1.23.2...1.23.3
1.23.2
1.23.1
1.23.0
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=Falsenot 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
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
What's Changed
- Ref #61 -- Introduce generators for each integer field by @amureki in #528
- Fix
baker.prepare()withGenericForeignKeyto 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
- @Neutronlul made their first contribution in #559
Full Changelog: 1.21.0...1.22.0
1.21.0
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_modelconfiguration - Refactor
gen_float()to useuniform()with configurablemin_float/max_floatbounds instead ofrandom() * gen_integer()which produced skewed distribution - Refactor
gen_interval()to usemin_interval/max_intervalinstead ofoffsetparameter which never worked as intended due to hugeMAX_INTrange - Fix
gen_date_range()andgen_datetime_range()to prevent empty ranges by enforcing a minimum interval of 1 day - Use
baker_random.randint()directly ingen_pg_numbers_range()instead ofgen_integer() - The
gen_from_choicesgenerator now ignoresNoneor""values in choices when the field doesn't allow null or blank values - [dev] Various improvements to CI Python/Django matrices
Meaningful PRs
- fix: run
ruff check .whenmake lintby @mattwang44 in #527 - ci: run test with github action matrix by @mattwang44 in #530
- Drop fallbacks made for Django < 4.2 by @amureki in #534
- Fix flaky UnsupportedField tests by @amureki in #537
- Another attempt to improve CI matrix by @amureki in #536
- Drop Python 3.8 support by @amureki in #538
- Add Python 3.14 support by @amureki in #539
- Add Django 6.0 support by @amureki in #540
- Configure generic foreign key relations respecting Django internals by @berinhard in #544
- Standardize licenses to Apache License 2.0 by @berinhard in #552
- Drop Python 3.9 support (reached end of life) by @amureki in #548
- Improve numeric generators and drop internal
gen_integerusage by @amureki in #557 - Only select valid choices from model field choices by @samamorgan in #556
New Contributors
- @samamorgan made their first contribution in #556
Full Changelog: 1.20.5...1.21.0
1.20.5
What's Changed
- Add Django 5.2 support by @scpaes in #526
- Clarify type annotation by @ducdetronquito in #524
- Update documentation by @amureki in #521
- Update README.md by @amureki in #522
New Contributors
- @ducdetronquito made their first contribution in #524
- @scpaes made their first contribution in #526
Full Changelog: 1.20.4...1.20.5
1.20.4
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