Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update factory-boy to 3.3.1 #669

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates factory-boy from 3.2.0 to 3.3.1.

Changelog

3.3.1

------------------
*New:*

- Add support for Django 4.2
- Add support for Django 5.1
- Add support for Python 3.12
- :issue:`903`: Add basic typing annotations
- Run the test suite against ``mongomock`` instead of an actual MongoDB server

*Bugfix:*

- :issue:`1031`: Do not require :attr:`~factory.alchemy.SQLAlchemyOptions.sqlalchemy_session` when
:attr:`~factory.alchemy.SQLAlchemyOptions.sqlalchemy_session_factory` is provided.

*Removed:*

- Stop advertising and verifying support for Django 3.2, 4.0, 4.1

3.3.0

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

*New:*

 - :issue:`366`: Add :class:`factory.django.Password` to generate Django :class:`~django.contrib.auth.models.User`
   passwords.
 - :issue:`304`: Add :attr:`~factory.alchemy.SQLAlchemyOptions.sqlalchemy_session_factory` to dynamically
   create sessions for use by the :class:`~factory.alchemy.SQLAlchemyModelFactory`.
 - Add support for Django 4.0
 - Add support for Django 4.1
 - Add support for Python 3.10
 - Add support for Python 3.11

*Bugfix:*

 - Make :meth:`~factory.django.mute_signals` mute signals during post-generation.

 - :issue:`775`: Change the signature for :class:`~factory.alchemy.SQLAlchemyModelFactory`'s ``_save`` and
   ``_get_or_create`` methods to avoid argument names clashes with a field named ``session``.

*Deprecated:*

 - :class:`~factory.django.DjangoModelFactory` will stop issuing a second call to
   :meth:`~django.db.models.Model.save` on the created instance when :ref:`post-generation-hooks` return a value.

   To help with the transition, :class:`factory.django.DjangoModelFactory`'s ``_after_postgeneration`` raises a
   :class:`DeprecationWarning` when calling :meth:`~django.db.models.Model.save`. Inspect your
   :class:`~factory.django.DjangoModelFactory` subclasses:

   - If the :meth:`~django.db.models.Model.save` call is not needed after :class:`~factory.PostGeneration`, set
     :attr:`factory.django.DjangoOptions.skip_postgeneration_save` to ``True`` in the factory meta.

   - Otherwise, the instance has been modified by :class:`~factory.PostGeneration` hooks and needs to be
     :meth:`~django.db.models.Model.save`\ d. Either:

       - call :meth:`django.db.models.Model.save` in the :class:`~factory.PostGeneration` hook that modifies the
         instance, or
       - override the :class:`~factory.Factory._after_postgeneration` method to
         :meth:`~django.db.models.Model.save` the instance.

*Removed:*

 - Drop support for Django 2.2
 - Drop support for Django 3.0
 - Drop support for Django 3.1
 - Drop support for Python 3.6
 - Drop support for Python 3.7

3.2.1

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

*New:*
 - Add support for Django 3.2

*Bugfix:*

 - Do not override signals receivers registered in a :meth:`~factory.django.mute_signals` context.

 - :issue:`775`: Change the signature for :class:`~factory.alchemy.SQLAlchemyModelFactory`'s ``_save`` and
   ``_get_or_create`` methods to avoid argument names clashes with a field named ``session``.
Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant