Factory-boy

Latest version: v3.3.3

Safety actively analyzes 722296 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 9

2.11.0

-------------------

*Bug fix:*

- Fix :class:`~factory.fuzzy.FuzzyFloat` to return a 15 decimal digits precision float by default
- :issue:`451`: Restore :class:`~factory.django.FileField` to a
``factory.declarations.ParameteredAttribute``, relying on composition to parse the provided parameters.
- :issue:`389`: Fix random state management with ``faker``.
- :issue:`466`: Restore mixing :class:`~factory.Trait` and :meth:`~factory.post_generation`.

2.10.0

-------------------

*Bug fix:*

- :issue:`443`: Don't crash when calling :meth:`factory.Iterator.reset()` on a brand new iterator.

*New:*

- :issue:`397`: Allow a :class:`factory.Maybe` to contain a :class:`~factory.PostGeneration` declaration.
This also applies to :class:`factory.Trait`, since they use a :class:`factory.Maybe` declaration internally.

2.9.2

------------------

*Bug fix:*

- Fix declaration corruption bug when a factory defined `foo__bar__baz=1` and a caller
provided a `foo__bar=x` parameter at call time: this got merged into the factory's base
declarations.

2.9.1

------------------

*Bug fix:*

- Fix packaging issues (see https://github.com/zestsoftware/zest.releaser/issues/212)
- Don't crash when debugging PostGenerationDeclaration

2.9.0

------------------

This version brings massive changes to the core engine, thus reducing the number of
corner cases and weird behaviors.

*New:*

- :issue:`275`: `factory.fuzzy` and `factory.faker` now use the same random seed.
- Add :class:`factory.Maybe`, which chooses among two possible declarations based
on another field's value (powers the :class:`~factory.Trait` feature).
- :class:`~factory.PostGenerationMethodCall` only allows to pass one positional argument; use keyword arguments for
extra parameters.

*Deprecation:*

- `factory.fuzzy.get_random_state` is deprecated, `factory.random.get_random_state` should be used instead.
- `factory.fuzzy.set_random_state` is deprecated, `factory.random.set_random_state` should be used instead.
- `factory.fuzzy.reseed_random` is deprecated, `factory.random.reseed_random` should be used instead.

2.8.1

------------------

*Bug fix:*

- Fix packaging issues.

Page 3 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.