Accepting request 1124433 from home:ecsos:python
- 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. OBS-URL: https://build.opensuse.org/request/show/1124433 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-factory_boy?expand=0&rev=30
This commit is contained in:
parent
991fa1fbaf
commit
ef56998143
BIN
factory_boy-3.2.1.tar.gz
(Stored with Git LFS)
BIN
factory_boy-3.2.1.tar.gz
(Stored with Git LFS)
Binary file not shown.
3
factory_boy-3.3.0.tar.gz
Normal file
3
factory_boy-3.3.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bc76d97d1a65bbd9842a6d722882098eb549ec8ee1081f9fb2e8ff29f0c300f1
|
||||||
|
size 163604
|
@ -1,3 +1,46 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
Fri Apr 21 12:24:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -20,16 +20,15 @@
|
|||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-factory_boy
|
Name: python-factory_boy
|
||||||
Version: 3.2.1
|
Version: 3.3.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python test fixtures
|
Summary: Python test fixtures
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/rbarrois/factory_boy
|
URL: https://github.com/rbarrois/factory_boy
|
||||||
Source: https://files.pythonhosted.org/packages/source/f/factory_boy/factory_boy-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/f/factory_boy/factory_boy-%{version}.tar.gz
|
||||||
# PATCH-FEATURE-OPENSUSE tests-skip-django-py36.patch -- don't test django on python36: no python36-Django 4, code@bnavigator.de
|
|
||||||
Patch0: tests-skip-django-py36.patch
|
|
||||||
BuildRequires: %{python_module Faker >= 0.7.0}
|
BuildRequires: %{python_module Faker >= 0.7.0}
|
||||||
BuildRequires: %{python_module Pillow}
|
BuildRequires: %{python_module Pillow}
|
||||||
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module setuptools >= 0.8}
|
BuildRequires: %{python_module setuptools >= 0.8}
|
||||||
BuildRequires: %{python_module typing_extensions}
|
BuildRequires: %{python_module typing_extensions}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -52,6 +51,8 @@ sed -i -e '/test_mongoengine/d' tests/__init__.py
|
|||||||
# sqlalchemy hickups a lot
|
# sqlalchemy hickups a lot
|
||||||
rm tests/test_alchemy.py
|
rm tests/test_alchemy.py
|
||||||
sed -i -e '/test_alchemy/d' tests/__init__.py
|
sed -i -e '/test_alchemy/d' tests/__init__.py
|
||||||
|
# Fix wrong version
|
||||||
|
sed -i -e 's|"3.2.1.dev0"|"3.3.0"|g' tests/test_version.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Loading…
Reference in New Issue
Block a user