From 5f32ac93f08b75816660732746ce0c57fd5a9cefea4690afde293c89ac2d34ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Dec 2024 11:24:23 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-factory_boy revision 383398e0e068ac473288744558ce0eaf --- factory_boy-3.2.1.tar.gz | 3 -- factory_boy-3.3.1.tar.gz | 3 ++ python-factory_boy.changes | 59 +++++++++++++++++++++-- python-factory_boy.spec | 11 +++-- tests-skip-django-py36.patch | 92 ------------------------------------ 5 files changed, 65 insertions(+), 103 deletions(-) delete mode 100644 factory_boy-3.2.1.tar.gz create mode 100644 factory_boy-3.3.1.tar.gz delete mode 100644 tests-skip-django-py36.patch diff --git a/factory_boy-3.2.1.tar.gz b/factory_boy-3.2.1.tar.gz deleted file mode 100644 index a4ce82b..0000000 --- a/factory_boy-3.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a98d277b0c047c75eb6e4ab8508a7f81fb03d2cb21986f627913546ef7a2a55e -size 153483 diff --git a/factory_boy-3.3.1.tar.gz b/factory_boy-3.3.1.tar.gz new file mode 100644 index 0000000..9063612 --- /dev/null +++ b/factory_boy-3.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8317aa5289cdfc45f9cae570feb07a6177316c82e34d14df3c2e1f22f26abef0 +size 163924 diff --git a/python-factory_boy.changes b/python-factory_boy.changes index 3cb8560..2bbb6e3 100644 --- a/python-factory_boy.changes +++ b/python-factory_boy.changes @@ -1,8 +1,61 @@ ------------------------------------------------------------------- -Thu Sep 26 08:40:58 UTC 2024 - Markéta Machová +Thu Sep 26 10:37:04 UTC 2024 - Markéta Machová - skip testing with Django on SLFO +------------------------------------------------------------------- +Sat Aug 31 12:41:40 UTC 2024 - Dirk Müller + +- 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 + +- 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 @@ -11,7 +64,7 @@ Fri Apr 21 12:24:55 UTC 2023 - Dirk Müller ------------------------------------------------------------------- Wed Feb 1 20:48:11 UTC 2023 - Dirk Müller -- skip testing with Django on SLE15 +- skip testing with Django on SLE15 ------------------------------------------------------------------- Sat Jan 15 16:04:33 UTC 2022 - Dirk Müller @@ -111,7 +164,7 @@ Mon Mar 16 10:31:31 UTC 2020 - Tomáš Chvátal ------------------------------------------------------------------- Mon Nov 18 00:57:55 UTC 2019 - Steve Kowalik -- BuildRequires on %{pythons} as setuptools no longer drags it in. +- BuildRequires on %{pythons} as setuptools no longer drags it in. ------------------------------------------------------------------- Fri Jun 7 11:54:06 UTC 2019 - Marketa Calabkova diff --git a/python-factory_boy.spec b/python-factory_boy.spec index 8dc3975..16a02a6 100644 --- a/python-factory_boy.spec +++ b/python-factory_boy.spec @@ -1,7 +1,7 @@ # # spec file for package python-factory_boy # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,21 +18,20 @@ %{?sle15_python_module_pythons} Name: python-factory_boy -Version: 3.2.1 +Version: 3.3.1 Release: 0 Summary: Python test fixtures License: MIT URL: https://github.com/rbarrois/factory_boy 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 Pillow} +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools >= 0.8} BuildRequires: %{python_module typing_extensions} BuildRequires: fdupes BuildRequires: python-rpm-macros -%if 0%{suse_version} >= 1699 +%if 0%{suse_version} > 1600 BuildRequires: %{python_module Django} %endif Requires: python-Faker >= 0.7.0 @@ -50,6 +49,8 @@ sed -i -e '/test_mongoengine/d' tests/__init__.py # sqlalchemy hickups a lot rm tests/test_alchemy.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 %python_build diff --git a/tests-skip-django-py36.patch b/tests-skip-django-py36.patch deleted file mode 100644 index 3119bcc..0000000 --- a/tests-skip-django-py36.patch +++ /dev/null @@ -1,92 +0,0 @@ -Index: factory_boy-3.2.0/tests/test_django.py -=================================================================== ---- factory_boy-3.2.0.orig/tests/test_django.py -+++ factory_boy-3.2.0/tests/test_django.py -@@ -7,11 +7,14 @@ import os - import unittest - from unittest import mock - --import django --from django import test as django_test --from django.conf import settings --from django.db.models import signals --from django.test import utils as django_test_utils -+try: -+ import django -+ from django import test as django_test -+ from django.conf import settings -+ from django.db.models import signals -+ from django.test import utils as django_test_utils -+except ImportError: -+ raise unittest.SkipTest("No Django installed") - - import factory.django - -Index: factory_boy-3.2.0/tests/test_using.py -=================================================================== ---- factory_boy-3.2.0.orig/tests/test_using.py -+++ factory_boy-3.2.0/tests/test_using.py -@@ -11,6 +11,7 @@ import unittest - - import factory - from factory import errors -+nodjango = not hasattr(factory, 'django') - - from . import utils - -@@ -141,6 +142,7 @@ class SimpleBuildTestCase(unittest.TestC - self.assertEqual(obj.id, None) - self.assertEqual(obj.foo, 'bar') - -+ @unittest.skipIf(nodjango, "No Django installed") - def test_create_custom_base(self): - obj = factory.create(FakeModel, foo='bar', FACTORY_CLASS=factory.django.DjangoModelFactory) - self.assertEqual(obj.id, 2) -@@ -156,6 +158,7 @@ class SimpleBuildTestCase(unittest.TestC - self.assertEqual(obj.id, None) - self.assertEqual(obj.foo, 'bar') - -+ @unittest.skipIf(nodjango, "No Django installed") - def test_create_batch_custom_base(self): - objs = factory.create_batch( - FakeModel, -@@ -196,6 +199,7 @@ class SimpleBuildTestCase(unittest.TestC - self.assertEqual(obj.id, None) - self.assertEqual(obj.foo, 'bar') - -+ @unittest.skipIf(nodjango, "No Django installed") - def test_generate_create_custom_base(self): - obj = factory.generate( - FakeModel, -@@ -231,6 +235,7 @@ class SimpleBuildTestCase(unittest.TestC - self.assertEqual(obj.id, None) - self.assertEqual(obj.foo, 'bar') - -+ @unittest.skipIf(nodjango, "No Django installed") - def test_generate_batch_create_custom_base(self): - objs = factory.generate_batch( - FakeModel, -@@ -267,6 +272,7 @@ class SimpleBuildTestCase(unittest.TestC - self.assertEqual(obj.id, None) - self.assertEqual(obj.foo, 'bar') - -+ @unittest.skipIf(nodjango, "No Django installed") - def test_simple_generate_create_custom_base(self): - obj = factory.simple_generate(FakeModel, True, foo='bar', FACTORY_CLASS=factory.django.DjangoModelFactory) - self.assertEqual(obj.id, 2) -@@ -292,6 +298,7 @@ class SimpleBuildTestCase(unittest.TestC - self.assertEqual(obj.id, None) - self.assertEqual(obj.foo, 'bar') - -+ @unittest.skipIf(nodjango, "No Django installed") - def test_simple_generate_batch_create_custom_base(self): - objs = factory.simple_generate_batch( - FakeModel, -@@ -2046,6 +2053,7 @@ class BetterFakeModel: - self.id = None - - -+@unittest.skipIf(nodjango, "No Django installed") - class DjangoModelFactoryTestCase(unittest.TestCase): - def test_simple(self): - class FakeModelFactory(factory.django.DjangoModelFactory):