diff --git a/2.11.1.tar.gz b/2.11.1.tar.gz new file mode 100644 index 0000000..dd4aec5 --- /dev/null +++ b/2.11.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d1038051d3bf468a4ec05a7e9e584985ad827e8af2badeefc93121f0e1a5633 +size 137220 diff --git a/2.9.2.tar.gz b/2.9.2.tar.gz deleted file mode 100644 index dc7d16d..0000000 --- a/2.9.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5f27acda3787fb556dc26a50cbfa3ce9ee86a88b1a96b72fa31aca47257c7dd -size 134371 diff --git a/python-factory_boy.changes b/python-factory_boy.changes index af69245..627eb24 100644 --- a/python-factory_boy.changes +++ b/python-factory_boy.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +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 diff --git a/python-factory_boy.spec b/python-factory_boy.spec index c637b4d..94982ee 100644 --- a/python-factory_boy.spec +++ b/python-factory_boy.spec @@ -1,7 +1,7 @@ # # spec file for package python-factory_boy # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,24 +12,27 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-factory_boy -Version: 2.9.2 +Version: 2.11.1 Release: 0 Summary: A test fixtures replacement License: MIT Group: Development/Languages/Python -Url: http://github.com/rbarrois/factory_boy +URL: http://github.com/rbarrois/factory_boy Source: https://github.com/FactoryBoy/factory_boy/archive/%{version}.tar.gz +Patch0: python37.patch +BuildRequires: %{python_module Django} BuildRequires: %{python_module Faker >= 0.7.0} -BuildRequires: %{python_module devel} +BuildRequires: %{python_module Pillow} BuildRequires: %{python_module flake8} BuildRequires: %{python_module mock} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python2-ipaddress Requires: python-Faker >= 0.7.0 @@ -41,18 +44,27 @@ A test fixtures replacement based on thoughtbot's factory_girl for Ruby. %prep %setup -q -n factory_boy-%{version} +%patch0 -p1 +# 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 %build %python_build %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test %files %{python_files} -%doc README.rst LICENSE +%license LICENSE +%doc README.rst %{python_sitelib}/* %changelog diff --git a/python37.patch b/python37.patch new file mode 100644 index 0000000..c1cbbb5 --- /dev/null +++ b/python37.patch @@ -0,0 +1,68 @@ +From 97f48597d241aca598783f7bcaed34bf7b133343 Mon Sep 17 00:00:00 2001 +From: Jon Dufresne +Date: Tue, 28 Aug 2018 04:40:26 -0700 +Subject: [PATCH] Add testing and support for Python 3.7 and Django 2.1 + +Python 3.7 was released on June 27, 2018. +Django 2.1 was released on August 1, 2018. + +https://docs.python.org/3/whatsnew/3.7.html +https://docs.djangoproject.com/en/2.1/releases/2.1/ + +Fixes #492 +--- + .travis.yml | 23 ++++++++++++++++++++--- + README.rst | 2 +- + docs/changelog.rst | 3 ++- + factory/utils.py | 10 +++++++--- + setup.py | 6 +++++- + tox.ini | 7 +++++-- + 6 files changed, 40 insertions(+), 11 deletions(-) + +diff --git a/factory/utils.py b/factory/utils.py +index 7bf38dd..15d87e4 100644 +--- a/factory/utils.py ++++ b/factory/utils.py +@@ -73,9 +73,13 @@ def __iter__(self): + if self.next_elements: + yield self.next_elements.popleft() + else: +- value = next(self.iterator) +- self.past_elements.append(value) +- yield value ++ try: ++ value = next(self.iterator) ++ except StopIteration: ++ break ++ else: ++ self.past_elements.append(value) ++ yield value + + def reset(self): + self.next_elements.clear() +diff --git a/setup.py b/setup.py +index 4291c80..07fb60a 100755 +--- a/setup.py ++++ b/setup.py +@@ -51,8 +51,11 @@ def get_version(package_name): + ], + classifiers=[ + "Development Status :: 5 - Production/Stable", +- "Intended Audience :: Developers", + "Framework :: Django", ++ "Framework :: Django :: 1.11", ++ "Framework :: Django :: 2.0", ++ "Framework :: Django :: 2.1", ++ "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", +@@ -62,6 +65,7 @@ def get_version(package_name): + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", ++ "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Testing", + "Topic :: Software Development :: Libraries :: Python Modules", +