NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2286 most downloaded on PyPI
Factory Boy support for pytest.
Last release 1 years ago
01 Jul 2025
Release timing varies
gaps range from 8 days to 1.5 years
Nearly every release is documented
notes for 31 of 32 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
32 releases · first in 2015
Test against all supported factory-boy versions
Test against all supported factory-boy versions
Fix incompatibility when using the combination of python < 3.12 and factory-boy < 3.3.
The error was: TypeError: type 'Factory' is not subscriptable
Declare compatibility with python 3.13. Supported versions are now: 3.9, 3.10, 3.11, 3.12, 3.13.
Declare compatibility with python 3.13. Supported versions are now: 3.9, 3.10, 3.11, 3.12, 3.13.
Test against pytest 8.4
Test against python 3.14 (beta)
Run static type checks.
Changelog format updated to follow Keep a Changelog.
Drop support for python 3.8. Supported versions are now: 3.9, 3.10, 3.11, 3.12, 3.13.
Drop support for pytest < 7.0.0.
Fix compatibility with pytest 8.4.
Fixed internal type annotations.
One column per quarter.
Declare required python version >= 3.8. (python 3.7 support was already removed in 2.6.0, the declared supported version tag was not updated though).
Declare required python version >= 3.8. (python 3.7 support was already removed in 2.6.0, the declared supported version tag was not updated though). #215
Address compatibility issue with pytest 8.1. #213 _
Address compatibility issue with pytest 8.1. #213
Drop python 3.7 support and add support for python 3.12. Supported versions are now: 3.8, 3.9, 3.10, 3.11, 3.12. #197 _
Fix PytestDeprecationWarning. #180 _ #179 _
Using a generic class container like dict, list, set, etc. will raise a warning suggesting you to wrap your model using named_model(...). Doing this w
Using a generic class container like dict, list, set, etc. will raise a warning suggesting you to wrap your model using named_model(...). Doing this will make sure that the fixture name is correctly chosen, otherwise SubFactory and RelatedFactory aren't able to determine the name of the model. See Generic Container Classes as models #167
Fix Factory._after_postgeneration being invoked twice. #164 #156
Stack traces caused by pytest-factoryboy are now slimmer. #169
Check for naming conflicts between factory and model fixture name, and raise a clear error immediately. #86
LazyFixture is now a Generic[T] type.
LazyFixture is now a Generic[T] type.
Simplify fixture generation (internal change).
Use poetry (internal change).
Fix AttributeError when using LazyFixture in register(...) #159 _ #158 _
Add support for factory.PostGenerationMethodCall #103 _ #87 _.
@register() decorator now refuses kwargs after the initial specialization. This behaviour was mistakenly introduced in version 2.2.0, and it complicat
@register() decorator now refuses kwargs after the initial specialization. This behaviour was mistakenly introduced in version 2.2.0, and it complicates the usage of the register function unnecessarily. For example, the following is not allowed anymore:
# INVALID
register(
_name="second_author",
name="C.S. Lewis",
)(
AuthorFactory,
register_user="cs_lewis",
register_user__password="Aslan1",
)
# VALID
register(
AuthorFactory,
_name="second_author",
name="C.S. Lewis",
register_user="cs_lewis",
register_user__password="Aslan1",
)
Drop support for Python 3.6. We now support only python >= 3.7.
Drop support for Python 3.6. We now support only python >= 3.7.
Improve "debuggability". Internal pytest-factoryboy calls are now visible when using a debugger like PDB or PyCharm.
Add type annotations. Now register and LazyFixture are type annotated.
Fix Factory._after_postgeneration method not getting the evaluated post_generations and RelatedFactory results correctly in the result param.
Factories can now be registered inside classes (even nested classes) and they won't pollute the module namespace.
Allow the @register decorator to be called with parameters:
@register
@register("other_author")
class AuthorFactory(Factory):
...
Add support for factory_boy >= 3.2.0
Add support for factory_boy >= 3.2.0
Drop support for Python 2.7, 3.4, 3.5. We now support only python >= 3.6.
Drop support for pytest < 4.6. We now support only pytest >= 4.6.
Add missing versions of python (3.9 and 3.10) and pytest (6.x.x) to the CI test matrix.
Fix compatibility with pytest 5.
Fix compatibility with pytest 5.
Fix warning use of getfuncargvalue is deprecated, use getfixturevalue (sliverc)
Fix warning use of getfuncargvalue is deprecated, use getfixturevalue (sliverc)
Breaking change due to the heavy refactor of both pytest and factory_boy.
Breaking change due to the heavy refactor of both pytest and factory_boy.
Failing test for using a attributes field on the factory (blueyed)
Minimal pytest version is 3.3.2 (olegpidsadnyi)
Minimal factory_boy version is 2.10.0 (olegpidsadnyi)
use {posargs} in pytest command (blueyed)
use {posargs} in pytest command (blueyed)
pin factory_boy<2.9 (blueyed)
fix LazyFixture evaluation order (olegpidsadnyi)
fix LazyFixture evaluation order (olegpidsadnyi)
replace request._fixturedefs by request._fixture_defs (p13773)
replace request._fixturedefs by request._fixture_defs (p13773)
fix post-generation dependencies (olegpidsadnyi)
fix post-generation dependencies (olegpidsadnyi)
automatic resolution of the post-generation dependencies (olegpidsadnyi, kvas-it)
automatic resolution of the post-generation dependencies (olegpidsadnyi, kvas-it)
fixes fixture function module name attribute (olegpidsadnyi)
fixes fixture function module name attribute (olegpidsadnyi)
fixes _after_postgeneration hook invocation for deferred post-generation declarations (olegpidsadnyi)
support factory models to be passed as strings (bubenkoff)
support factory models to be passed as strings (bubenkoff)
Nothing published for this version
circular dependency determination is fixed for the post-generation (olegpidsadnyi)
circular dependency determination is fixed for the post-generation (olegpidsadnyi)
circular dependency determination is fixed for the RelatedFactory attributes (olegpidsadnyi)
circular dependency determination is fixed for the RelatedFactory attributes (olegpidsadnyi)
fix installation issue when django environment is not set (bubenkoff, amakhnach)
fix installation issue when django environment is not set (bubenkoff, amakhnach)
fixture dependencies on deferred post-generation declarations (olegpidsadnyi)
fixture dependencies on deferred post-generation declarations (olegpidsadnyi)
post_generation extra parameters fixed (olegpidsadnyi)
post_generation extra parameters fixed (olegpidsadnyi)
fixture partial specialization (olegpidsadnyi)
fixes readme and example (dduong42)
lazy fixtures (olegpidsadnyi)
deferred post-generation evaluation (olegpidsadnyi)
hooks (olegpidsadnyi)
refactoring of the fixture function compilation (olegpidsadnyi)
refactoring of the fixture function compilation (olegpidsadnyi)
related factory fix (olegpidsadnyi)
post_generation fixture dependency fixed (olegpidsadnyi)
model fixture registration with specific name (olegpidsadnyi)
README updated (olegpidsadnyi)
use inflection package to convert camel case to underscore (bubenkoff)
use inflection package to convert camel case to underscore (bubenkoff)
initial release (olegpidsadnyi)
initial release (olegpidsadnyi)
Your coding agent can read these notes before it upgrades. Set up the MCP server →