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 4 of 9

2.8.0

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

*New:*

- :issue:`240`: Call post-generation declarations in the order they were declared,
thanks to `Oleg Pidsadnyi <https://github.com/olegpidsadnyi>`_.
- :issue:`309`: Provide new options for SQLAlchemy session persistence

*Bug fix:*

- :issue:`334`: Adjust for the package change in ``faker``

2.7.0

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

*New:*

- :pr:`267`: Add :class:`factory.LazyFunction` to remove unneeded lambda parameters,
thanks to `Hervé Cauwelier <https://github.com/bors-ltd>`_.
- :issue:`251`: Add :ref:`parameterized factories <parameters>` and :class:`traits <factory.Trait>`
- :pr:`256`, :pr:`292`: Improve error messages in corner cases

*Removed:*

- :pr:`278`: Formally drop support for Python2.6

.. warning:: Version 2.7.0 moves all error classes to
`factory.errors`. This breaks existing import statements
for any error classes except those importing
`FactoryError` directly from the `factory` module.

2.6.1

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

*New:*

- :pr:`262`: Allow optional forced flush on SQLAlchemy, courtesy of `Minjung <https://github.com/Minjung>`_.

2.6.0

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

*New:*

- Add :attr:`factory.FactoryOptions.rename` to help handle conflicting names (:issue:`206`)
- Add support for random-yet-realistic values through `fake-factory <https://pypi.org/project/fake-factory/>`_,
through the :class:`factory.Faker` class.
- :class:`factory.Iterator` no longer begins iteration of its argument at import time,
thus allowing to pass in a lazy iterator such as a Django queryset
(i.e ``factory.Iterator(models.MyThingy.objects.all())``).
- Simplify imports for ORM layers, now available through a simple ``factory`` import,
at ``factory.alchemy.SQLAlchemyModelFactory`` / ``factory.django.DjangoModelFactory`` / ``factory.mongoengine.MongoEngineFactory``.

*Bug fix:*

- :issue:`201`: Properly handle custom Django managers when dealing with abstract Django models.
- :issue:`212`: Fix :meth:`factory.django.mute_signals` to handle Django's signal caching
- :issue:`228`: Don't load ``django.apps.apps.get_model()`` until required
- :pr:`219`: Stop using ``mogo.model.Model.new()``, deprecated 4 years ago.

2.5.2

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

*Bug fix:*

- Add support for Django 1.7/1.8
- Add support for mongoengine>=0.9.0 / pymongo>=2.1

2.5.1

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

*Bug fix:*

- Respect custom managers in :class:`~factory.django.DjangoModelFactory` (see :issue:`192`)
- Allow passing declarations (e.g :class:`~factory.Sequence`) as parameters to :class:`~factory.django.FileField`
and :class:`~factory.django.ImageField`.

Page 4 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.