From d5b84a2325c9c5f9660e3a2390dd2e2006ead0f5d54770f766185523aa6a0d02 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 27 Sep 2024 07:46:17 +0000 Subject: [PATCH 1/2] Accepting request 1203794 from home:mcalabkova:branches:devel:languages:python - skip testing with Django on SLFO OBS-URL: https://build.opensuse.org/request/show/1203794 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-factory_boy?expand=0&rev=36 --- .gitattributes | 23 +++ .gitignore | 1 + factory_boy-3.3.0.tar.gz | 3 + factory_boy-3.3.1.tar.gz | 3 + python-factory_boy.changes | 370 +++++++++++++++++++++++++++++++++++++ python-factory_boy.spec | 71 +++++++ 6 files changed, 471 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 factory_boy-3.3.0.tar.gz create mode 100644 factory_boy-3.3.1.tar.gz create mode 100644 python-factory_boy.changes create mode 100644 python-factory_boy.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/factory_boy-3.3.0.tar.gz b/factory_boy-3.3.0.tar.gz new file mode 100644 index 0000000..fa7daa3 --- /dev/null +++ b/factory_boy-3.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc76d97d1a65bbd9842a6d722882098eb549ec8ee1081f9fb2e8ff29f0c300f1 +size 163604 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 new file mode 100644 index 0000000..2bbb6e3 --- /dev/null +++ b/python-factory_boy.changes @@ -0,0 +1,370 @@ +------------------------------------------------------------------- +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 + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Wed Feb 1 20:48:11 UTC 2023 - Dirk Müller + +- skip testing with Django on SLE15 + +------------------------------------------------------------------- +Sat Jan 15 16:04:33 UTC 2022 - Dirk Müller + +- 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 + +- Add missing BR typing_extensions + +------------------------------------------------------------------- +Mon Dec 27 18:24:13 UTC 2021 - Ben Greiner + +- Add tests-skip-django-py36.patch -- no Django 4 for python36 + +------------------------------------------------------------------- +Sun May 16 13:01:17 UTC 2021 - Ben Greiner + +- 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 + +- 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 + +- Fix build without python2 + +------------------------------------------------------------------- +Mon Nov 18 00:57:55 UTC 2019 - Steve Kowalik + +- BuildRequires on %{pythons} as setuptools no longer drags it in. + +------------------------------------------------------------------- +Fri Jun 7 11:54:06 UTC 2019 - Marketa Calabkova + +- 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 + +- Add patch to support django 2.2: + * django-2.2.patch + +------------------------------------------------------------------- +Thu Oct 18 09:40:04 UTC 2018 - Tomáš Chvátal + +- 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.fuzzy‘s 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) + * Don’t 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 RelatedFactory‘s 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: + * Don’t 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 won’t 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 Django’s 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 + diff --git a/python-factory_boy.spec b/python-factory_boy.spec new file mode 100644 index 0000000..a5cea38 --- /dev/null +++ b/python-factory_boy.spec @@ -0,0 +1,71 @@ +# +# spec file for package python-factory_boy +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-factory_boy +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 +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 +BuildRequires: %{python_module Django} +%endif +Requires: python-Faker >= 0.7.0 +BuildArch: noarch +%python_subpackages + +%description +A test fixtures replacement based on thoughtbot's factory_girl for Ruby. + +%prep +%autosetup -p1 -n factory_boy-%{version} +# needs running mongo +rm tests/test_mongoengine.py +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 + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pyunittest -v + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/factory +%{python_sitelib}/factory_boy-%{version}*-info + +%changelog From 83e55ffb1514d929bf59544357b61d0c8494c0ff08b60b27b2d3c355118f1857 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 27 Sep 2024 07:46:41 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-factory_boy?expand=0&rev=37 --- python-factory_boy.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-factory_boy.spec b/python-factory_boy.spec index a5cea38..16a02a6 100644 --- a/python-factory_boy.spec +++ b/python-factory_boy.spec @@ -31,7 +31,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