python-factory_boy/python-factory_boy.changes

371 lines
16 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-------------------------------------------------------------------
Thu Sep 26 10:37:04 UTC 2024 - Markéta Machová <mmachova@suse.com>
- skip testing with Django on SLFO
-------------------------------------------------------------------
Sat Aug 31 12:41:40 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 3.3.1:
* Add support for Django 4.2
* Add support for Django 5.1
* Add support for Python 3.12
* Stop advertising and verifying support for Django 3.2, 4.0,
4.1
-------------------------------------------------------------------
Thu Nov 9 11:32:25 UTC 2023 - ecsos <ecsos@opensuse.org>
- Update to 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 :meth:`~factory.alchemy.SQLAlchemyModelFactory._save`
and :meth:`~factory.alchemy.SQLAlchemyModelFactory._get_or_create` 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._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 :class:`~factory.django.DjangoModelFactory._after_postgeneration`
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
- Drop tests-skip-django-py36.patch because new version need
python >= 3.7.
-------------------------------------------------------------------
Fri Apr 21 12:24:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Wed Feb 1 20:48:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
- skip testing with Django on SLE15
-------------------------------------------------------------------
Sat Jan 15 16:04:33 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 3.2.1:
- Add support for Django 3.2
- Do not override signals receivers registered in a :meth:`~factory.django.mute_signals` context.
-------------------------------------------------------------------
Tue Dec 28 22:54:39 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Add missing BR typing_extensions
-------------------------------------------------------------------
Mon Dec 27 18:24:13 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Add tests-skip-django-py36.patch -- no Django 4 for python36
-------------------------------------------------------------------
Sun May 16 13:01:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to v3.2.0
* Add support for Django 3.1
* Add support for Python 3.9
* Drop support for Django 1.11. This version is not maintained
anymore.
* Drop support for Python 3.5. This version is not maintained
anymore.
Deprecated:
* factory.use_strategy(). Use factory.FactoryOptions.strategy
instead. The purpose of use_strategy() duplicates the factory
option. Follow PEP 20: There should be one and preferably only
one obvious way to do it.
* use_strategy() will be removed in the next major version.
Bug fix:
* Calls to factory.Faker and factory.django.FileField within a
Trait or Maybe no longer lead to a KeyError crash.
- Remove python2 build conditional: Not supported upstream
-------------------------------------------------------------------
Mon Oct 5 06:11:53 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Use PyPI tarball and revise test runner to python -m unittest
- Update to v3.1.0
* Allow all types of declarations in :class:`factory.Faker` calls
enables references to other faker-defined attributes.
- from v3.0.1
* Fix `import factory; factory.django.DjangoModelFactory` and
similar calls.
- from v3.0.0
* Removed alias
+ `from factory import DjangoModelFactory` to
`from factory.django import DjangoModelFactory`
+ `from factory import MogoFactory` to
`from factory.mogo import MogoFactory`
+ `from factory.fuzzy import get_random_state` to
`from factory.random import get_random_state`
+ `from factory.fuzzy import set_random_state` to
`from factory.random import set_random_state`
+ `from factory.fuzzy import reseed_random` to
`from factory.random import reseed_random`
* Drop support for Python 2 and 3.4
* Drop support for Django 2.0 and 2.1
* Remove deprecated `force_flush` from `SQLAlchemyModelFactory`
Use `sqlalchemy_session_persistence = "flush"` instead
* Drop deprecated `attributes()` from `factory.Factory`; use
`make_factory(dict, FactoryClass._meta.pre_declarations)`
* Drop deprecated `declarations()` from `factory.Factory`; use
`FactoryClass._meta.pre_declarations` instead
* Drop `factory.compat` module
* Add support for Python 3.8
* Add support for Django 2.2 and 3.0
* Report misconfiguration when `Factory` is used
as the `Factory.model` for another `Factory`
* Allow configuring the color palette of `factory.django.ImageField`
* `get_random_state()` now represents the state of Faker and
`factory_boy` fuzzy attributes
* Add SQLAlchemy ``get_or_create`` support
* Display a developer-friendly error message when providing a model
instead of a factory in a `factory.declarations.SubFactory` class
* Fix issue with SubFactory not preserving signal muting behaviour
of the used factory
* Fix issue with overriding params in a Trait
* Limit ``get_or_create`` behavior to fields specified in
`django_get_or_create`
* Re-raise `~django.db.IntegrityError` when `django_get_or_create`
with multiple fields fails to lookup model using user provided
keyword arguments
* TypeError masked by __repr__ AttributeError when initializing
`Maybe` with inconsistent phases
-------------------------------------------------------------------
Mon Mar 16 10:31:31 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Fix build without python2
-------------------------------------------------------------------
Mon Nov 18 00:57:55 UTC 2019 - Steve Kowalik <steven.kowalik@suse.com>
- BuildRequires on %{pythons} as setuptools no longer drags it in.
-------------------------------------------------------------------
Fri Jun 7 11:54:06 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
- Update to version 2.12.0
* NOW support for Python 3.7 and Django 2.1
* various small bugfixes
- Removed upstreamed patches:
* python37.patch
* django-2.2.patch
-------------------------------------------------------------------
Wed Apr 17 10:14:58 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to support django 2.2:
* django-2.2.patch
-------------------------------------------------------------------
Thu Oct 18 09:40:04 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2.11.1:
* Support for Django 2.1
* Support for python 3.7
* Various small bugfixes
- Add patch python37.patch
-------------------------------------------------------------------
Fri Oct 6 09:52:31 UTC 2017 - tchvatal@suse.com
- Update to version 2.9.2:
* read the upstream ChangeLog for in detail list as there are
too many changes
- Do not generate docu in the spec and make sure tests are run
- Switch to python singlespec
-------------------------------------------------------------------
Mon May 4 16:15:37 UTC 2015 - benoit.monin@gmx.fr
- update to version 2.5.2:
* Add support for Django 1.7/1.8
* Add support for mongoengine>=0.9.0 / pymongo>=2.1
- additional changes from version 2.5.1:
* Respect custom managers in DjangoModelFactory (see issue #192)
* Allow passing declarations (e.g Sequence) as parameters to
FileField and ImageField.
- additional changes from version 2.5.0:
* Add support for getting/setting factory.fuzzys random state
(see issue #175, issue #185).
* Support lazy evaluation of iterables in
factory.fuzzy.FuzzyChoice (see issue #184).
* Support non-default databases at the factory level (see issue
#171)
* Make factory.django.FileField and factory.django.ImageField
non-post_generation, i.e normal fields also available in save()
(see issue #141).
* Avoid issues when using factory.django.mute_signals() on a base
factory class (see issue #183).
* Fix limitations of factory.StubFactory, that can now use
factory.SubFactory and co (see issue #131).
* Remove deprecated features from 2.4.0 (2014-06-21)
* Remove the auto-magical sequence setup (based on the latest
primary key value in the database) for Django and SQLAlchemy;
this relates to issues issue #170, issue #153, issue #111,
issue #103, issue #92, issue #78.
* Fix overriding deeply inherited attributes (set in one factory,
overridden in a subclass, used in a sub-sub-class).
- additional changes from version 2.4.0:
* Add support for factory.fuzzy.FuzzyInteger.step, thanks to
ilya-pirogov (issue #120)
* Add mute_signals() decorator to temporarily disable some
signals, thanks to ilya-pirogov (issue #122)
* Add FuzzyFloat (issue #124)
* Declare target model and other non-declaration fields in a
class Meta section.
* Use of FACTORY_FOR and other FACTORY class-level attributes is
deprecated and will be removed in 2.5.
- additional changes from version 2.3.1:
* Fix badly written assert containing state-changing code,
spotted by chsigi (issue #126)
* Dont crash when handling objects whose __repr__ is
non-pure-ascii bytes on Py2, discovered by mbertheau (issue
#123) and strycore (issue #127)
- additional changes from version 2.3.0:
* Add FuzzyText, thanks to jdufresne (issue #97)
* Add FuzzyDecimal, thanks to thedrow (issue #94)
* Add support for EmbeddedDocument, thanks to imiric (issue #100)
- additional changes from version 2.2.1:
* Fixed sequence counter for DjangoModelFactory when a factory
inherits from another factory relating to an abstract model.
- additional changes from version 2.2.0:
* Removed duplicated SQLAlchemyModelFactory lurking in factory
(issue #83)
* Properly handle sequences within object inheritance chains. If
FactoryA inherits from FactoryB, and their associated classes
share the same link, sequence counters will be shared (issue
#93)
* Properly handle nested SubFactory overrides
* The DjangoModelFactory now supports the FACTORY_FOR =
'myapp.MyModel' syntax, making it easier to shove all factories
in a single module (issue #66).
* Add factory.debug() helper for easier backtrace analysis
* Adding factory support for mongoengine with MongoEngineFactory.
- additional changes from version 2.1.2:
* The ABSTRACT_FACTORY keyword is now optional, and automatically
set to True if neither the Factory subclass nor its parent
declare the FACTORY_FOR attribute (issue #74)
- additional changes from version 2.1.1:
* Properly retrieve the color keyword argument passed to
ImageField
- additional changes from version 2.1.0:
* Add FuzzyDate thanks to saulshanabrook
* Add FuzzyDateTime and FuzzyNaiveDateTime.
* Add a factory_parent attribute to the LazyStub passed to
LazyAttribute, in order to access fields defined in wrapping
factories.
* Move DjangoModelFactory and MogoFactory to their own modules
(factory.django and factory.mogo)
* Add the reset_sequence() classmethod to Factory to ease
resetting the sequence counter for a given factory.
* Add debug messages to factory logger.
* Add a reset() method to Iterator (issue #63)
* Add support for the SQLAlchemy ORM through
SQLAlchemyModelFactory (issue #64, thanks to Romain Commandé)
* Add factory.django.FileField and factory.django.ImageField
hooks for related Django model fields (issue #52)
* Properly handle non-integer pks in DjangoModelFactory (issue
#57).
* Disable RelatedFactory generation when a specific value was
passed (issue #62, thanks to Gabe Koscky)
* Rename RelatedFactorys name argument to factory_related_name
(See issue #58)
- additional changes from version 2.0.2:
* When FACTORY_DJANGO_GET_OR_CREATE is empty, use
Model.objects.create() instead of Model.objects.get_or_create.
- additional changes from version 2.0.1:
* Dont push defaults to get_or_create when
FACTORY_DJANGO_GET_OR_CREATE is not set.
- additional changes from version 2.0.0:
* Allow overriding the base factory class for make_factory() and
friends.
* Add support for Python3 (Thanks to kmike and nkryptic)
* The default type for Sequence is now int
* Fields listed in FACTORY_HIDDEN_ARGS wont be passed to the
associated class constructor
* Add support for get_or_create in DjangoModelFactory, through
FACTORY_DJANGO_GET_OR_CREATE.
* Add support for fuzzy attribute definitions.
* The Sequence counter can be overridden when calling a
generating function
* Add Dict and List declarations (Closes issue #18).
* Remove associated class discovery
* Remove InfiniteIterator and infinite_iterator()
* Remove CircularSubFactory
* Remove extract_prefix kwarg to post-generation hooks.
* Stop defaulting to Djangos Foo.objects.create() when
“creating” instances
* Remove STRATEGY_*
* Remove set_building_function() / set_creation_function()
- additional changes from version 1.3.0:
* Rewrite the whole documentation
* Provide a dedicated MogoFactory subclass of Factory
* Better creation/building customization hooks at
factory.Factory._build() and factory.Factory.create()
* Add support for passing non-kwarg parameters to a Factory
wrapped class through FACTORY_ARG_PARAMETERS.
* Keep the FACTORY_FOR attribute in Factory classes
* Allow SubFactory to solve circular dependencies between
factories
* Enhance SelfAttribute to handle “container” attribute fetching
* Add a getter to Iterator declarations
* A Iterator may be prevented from cycling by setting its cycle
argument to False
* Allow overriding default arguments in a
PostGenerationMethodCall when generating an instance of the
factory
* An object created by a DjangoModelFactory will be saved again
after PostGeneration hooks execution
* InfiniteIterator is deprecated in favor of Iterator
* CircularSubFactory is deprecated in favor of SubFactory
* The extract_prefix argument to post_generation() is now
deprecated
* Usage of set_creation_function() and set_building_function()
are now deprecated
* Implicit associated class discovery is no longer supported, you
must set the FACTORY_FOR attribute on all Factory subclasses
- add python-mock as BuildRequires for the tests
- add python-setuptools as BuildRequires: needed by setup.py
- build the documentation with the build_sphinx command
- pass -q to the test to avoid spamming the build log
- rename README to README.rst to follow upstream
-------------------------------------------------------------------
Fri Nov 23 11:06:19 UTC 2012 - saschpe@suse.de
- Update to version 1.2.0:
+ Upstream provides no changelog
- Build HTML documentation
-------------------------------------------------------------------
Mon Jun 11 13:10:36 UTC 2012 - saschpe@suse.de
- Initial version