Skip to content

Latest commit

 

History

History
214 lines (140 loc) · 6.39 KB

CHANGES.rst

File metadata and controls

214 lines (140 loc) · 6.39 KB

Changelog

Unreleased

  • 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

2.6.1

  • Address compatibility issue with pytest 8.1. #213

2.6.0

  • 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
  • Drop support for pytest < 6.2. We now support only pytest >= 6.2 (tested against pytest 7.4 at the time of writing). #197

2.5.1

  • Fix PytestDeprecationWarning. #180 #179

2.5.0

  • 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

2.4.0

  • LazyFixture is now a Generic[T] type.
  • Simplify fixture generation (internal change).
  • Use poetry (internal change).

2.3.1

  • Fix AttributeError when using LazyFixture in register(...) #159 #158

2.3.0

  • Add support for factory.PostGenerationMethodCall #103 #87.

2.2.1

  • @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",
)

2.2.0

  • 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):
    ...

2.1.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.

2.0.3

  • Fix compatibility with pytest 5.

2.0.2

  • Fix warning use of getfuncargvalue is deprecated, use getfixturevalue (sliverc)

2.0.1

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)

1.3.2

  • use {posargs} in pytest command (blueyed)
  • pin factory_boy<2.9 (blueyed)

1.3.1

  • fix LazyFixture evaluation order (olegpidsadnyi)

1.3.0

  • replace request._fixturedefs by request._fixture_defs (p13773)

1.2.2

  • fix post-generation dependencies (olegpidsadnyi)

1.2.1

  • automatic resolution of the post-generation dependencies (olegpidsadnyi, kvas-it)

1.1.6

  • fixes fixture function module name attribute (olegpidsadnyi)
  • fixes _after_postgeneration hook invocation for deferred post-generation declarations (olegpidsadnyi)

1.1.5

  • support factory models to be passed as strings (bubenkoff)

1.1.3

  • circular dependency determination is fixed for the post-generation (olegpidsadnyi)

1.1.2

  • circular dependency determination is fixed for the RelatedFactory attributes (olegpidsadnyi)

1.1.1

  • fix installation issue when django environment is not set (bubenkoff, amakhnach)

1.1.0

  • fixture dependencies on deferred post-generation declarations (olegpidsadnyi)

1.0.3

  • 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)

1.0.2

  • 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)

1.0.1

  • use inflection package to convert camel case to underscore (bubenkoff)

1.0.0

  • initial release (olegpidsadnyi)