Hello community,

here is the log from the commit of package python-django-seed for 
openSUSE:Factory checked in at 2020-02-20 14:59:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-seed (Old)
 and      /work/SRC/openSUSE:Factory/.python-django-seed.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-django-seed"

Thu Feb 20 14:59:31 2020 rev:3 rq:777601 version:0.2.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-seed/python-django-seed.changes    
2019-03-26 15:46:10.656059692 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-django-seed.new.26092/python-django-seed.changes
 2020-02-20 14:59:34.246781398 +0100
@@ -1,0 +2,12 @@
+Thu Feb 20 08:57:06 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 0.2.2:
+  * Fix user-specified locale not being used
+  * Pep8 cleanup
+  * UUID primary key support
+  * More verbose logging in seed command
+  * fix for faker seed_instance
+  * Django 2.2, 3.0 added to build matrix
+  * Python 3.6, 3.7, 3.8 added to build matrix
+
+-------------------------------------------------------------------

Old:
----
  LICENSE
  django-seed-0.1.9.tar.gz
  runtests.py

New:
----
  django-seed-0.2.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-django-seed.spec ++++++
--- /var/tmp/diff_new_pack.iftO7S/_old  2020-02-20 14:59:34.910782700 +0100
+++ /var/tmp/diff_new_pack.iftO7S/_new  2020-02-20 14:59:34.914782709 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-django-seed
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,28 +18,24 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-django-seed
-Version:        0.1.9
+Version:        0.2.2
 Release:        0
 Summary:        Django project fake data seeder
 License:        MIT
-Group:          Development/Languages/Python
-Url:            http://github.com/brobin/django-seed
+URL:            https://github.com/brobin/django-seed
 Source:         
https://files.pythonhosted.org/packages/source/d/django-seed/django-seed-%{version}.tar.gz
-Source1:        
https://raw.githubusercontent.com/Brobin/django-seed/master/runtests.py
-Source2:        
https://raw.githubusercontent.com/Brobin/django-seed/master/LICENSE
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-Django >= 1.11
+Requires:       python-Faker >= 0.7.7
+BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module Django >= 1.11}
 BuildRequires:  %{python_module Faker >= 0.7.7}
 BuildRequires:  %{python_module coverage}
 BuildRequires:  %{python_module django-nose}
 # /SECTION
-BuildRequires:  fdupes
-Requires:       python-Django >= 1.11
-Requires:       python-Faker >= 0.7.7
-BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -48,7 +44,6 @@
 %prep
 %setup -q -n django-seed-%{version}
 sed -i 's/fake-factory/Faker/' setup.py
-cp %{SOURCE1} %{SOURCE2} .
 
 %build
 %python_build

++++++ django-seed-0.1.9.tar.gz -> django-seed-0.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/LICENSE 
new/django-seed-0.2.2/LICENSE
--- old/django-seed-0.1.9/LICENSE       1970-01-01 01:00:00.000000000 +0100
+++ new/django-seed-0.2.2/LICENSE       2020-02-04 23:15:41.000000000 +0100
@@ -0,0 +1,19 @@
+Copyright (c) 2015 Tobin Brown
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/MANIFEST.in 
new/django-seed-0.2.2/MANIFEST.in
--- old/django-seed-0.1.9/MANIFEST.in   2018-01-15 20:40:59.000000000 +0100
+++ new/django-seed-0.2.2/MANIFEST.in   2020-02-04 23:56:59.000000000 +0100
@@ -1 +1,3 @@
-include *.rst
\ No newline at end of file
+include *.rst
+include LICENSE
+include runtests.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/PKG-INFO 
new/django-seed-0.2.2/PKG-INFO
--- old/django-seed-0.1.9/PKG-INFO      2018-05-14 20:29:17.000000000 +0200
+++ new/django-seed-0.2.2/PKG-INFO      2020-02-05 00:04:10.000000000 +0100
@@ -1,10 +1,10 @@
 Metadata-Version: 1.1
 Name: django-seed
-Version: 0.1.9
+Version: 0.2.2
 Summary: Seed your Django project with fake data
 Home-page: http://github.com/brobin/django-seed
 Author: Tobin Brown
-Author-email: to...@brobin.me
+Author-email: tobinjbr...@gmail.com
 License: MIT
 Description: |seed-logo|
         
@@ -113,6 +113,13 @@
                 <class 'faker.django.tests.Game'>: [1, 2, 3, 4, 5]
             }
         
+        You may specify a different locale by passing it in the constructor of 
the seeder. Defaults to `settings.LANGUAGE_CODE`
+        
+        .. code-block:: python
+        
+            seeder = Seed.seeder(locale='sv_SE')
+            seeder.faker.city()  # 'Västerås'
+        
         
         -----
         Tests
@@ -160,7 +167,7 @@
         
         .. |python| image:: 
https://img.shields.io/pypi/pyversions/django-seed.svg?style=flat-square
             :target: https://pypi.python.org/pypi/django-seed
-            :alt: Python 2.7, 3.x
+            :alt: Python 3.x
         
         .. |seed-logo| image:: assets/django_seed.png
             :alt: Django Seed
@@ -172,15 +179,16 @@
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Framework :: Django
 Classifier: Framework :: Django :: 1.11
-Classifier: Framework :: Django :: 2.0
+Classifier: Framework :: Django :: 2.2
+Classifier: Framework :: Django :: 3.0
 Classifier: Natural Language :: English
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Software Development :: Testing
 Classifier: Topic :: Utilities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/README.rst 
new/django-seed-0.2.2/README.rst
--- old/django-seed-0.1.9/README.rst    2018-01-15 20:40:59.000000000 +0100
+++ new/django-seed-0.2.2/README.rst    2020-02-04 23:59:31.000000000 +0100
@@ -105,6 +105,13 @@
         <class 'faker.django.tests.Game'>: [1, 2, 3, 4, 5]
     }
 
+You may specify a different locale by passing it in the constructor of the 
seeder. Defaults to `settings.LANGUAGE_CODE`
+
+.. code-block:: python
+
+    seeder = Seed.seeder(locale='sv_SE')
+    seeder.faker.city()  # 'Västerås'
+
 
 -----
 Tests
@@ -152,7 +159,7 @@
 
 .. |python| image:: 
https://img.shields.io/pypi/pyversions/django-seed.svg?style=flat-square
     :target: https://pypi.python.org/pypi/django-seed
-    :alt: Python 2.7, 3.x
+    :alt: Python 3.x
 
 .. |seed-logo| image:: assets/django_seed.png
     :alt: Django Seed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/django_seed/__init__.py 
new/django-seed-0.2.2/django_seed/__init__.py
--- old/django-seed-0.1.9/django_seed/__init__.py       2018-05-14 
20:27:19.000000000 +0200
+++ new/django-seed-0.2.2/django_seed/__init__.py       2020-02-05 
00:03:49.000000000 +0100
@@ -2,7 +2,7 @@
 import random
 
 
-__version__ = '0.1.9'
+__version__ = '0.2.2'
 
 
 class Seed(object):
@@ -32,7 +32,7 @@
         if code not in cls.fakers:
             from faker import Faker
             cls.fakers[code] = Faker(locale)
-            cls.fakers[code].seed(random.randint(1, 10000))
+            cls.fakers[code].seed_instance(random.randint(1, 10000))
         return cls.fakers[code]
 
     @classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/django_seed/guessers.py 
new/django-seed-0.2.2/django_seed/guessers.py
--- old/django-seed-0.1.9/django_seed/guessers.py       2018-05-14 
20:26:54.000000000 +0200
+++ new/django-seed-0.2.2/django_seed/guessers.py       2020-02-04 
23:56:59.000000000 +0100
@@ -15,7 +15,9 @@
     :param value: The datetime value
     :return: A locale aware datetime
     """
-    return timezone.make_aware(value, timezone.get_current_timezone()) if 
getattr(settings, 'USE_TZ', False) else value
+    if getattr(settings, 'USE_TZ', False):
+        return timezone.make_aware(value, timezone.get_current_timezone(), 
is_dst=False)
+    return value
 
 
 class NameGuesser(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/django-seed-0.1.9/django_seed/management/commands/seed.py 
new/django-seed-0.2.2/django_seed/management/commands/seed.py
--- old/django-seed-0.1.9/django_seed/management/commands/seed.py       
2018-01-15 20:40:59.000000000 +0100
+++ new/django-seed-0.2.2/django_seed/management/commands/seed.py       
2020-02-04 23:56:59.000000000 +0100
@@ -1,11 +1,9 @@
 
 from django.core.management.base import AppCommand
-from django.db.models import ForeignKey
 from django_seed import Seed
 from django_seed.exceptions import SeederCommandError
 from django_seed.toposort import toposort_flatten
 from optparse import make_option
-import django
 
 
 class Command(AppCommand):
@@ -15,15 +13,14 @@
 
     option_list = [
         make_option('--number', dest='number', default=10,
-                    help='number of each model to seed'),
+                    help='number of each model to seed (default 10)'),
     ]
 
     def add_arguments(self, parser):
         super(Command, self).add_arguments(parser)
 
-        parser.add_argument('--number', nargs='?', type=int, default=10, 
const=10,
-                    help='number of each model to seed')
-
+        help_text = 'number of each model to seed (default 10)'
+        parser.add_argument('--number', nargs='?', type=int, default=10, 
const=10, help=help_text)
 
     def handle_app_config(self, app_config, **options):
         if app_config.models_module is None:
@@ -40,8 +37,14 @@
             seeder.add_entity(model, number)
             print('Seeding %i %ss' % (number, model.__name__))
 
-        pks = seeder.execute()
-        print(pks)
+        generated = seeder.execute()
+
+        for model, pks in generated.items():
+            for pk in pks:
+                print("Model {} generated record with primary key {}".format(
+                    model.__name__,
+                    pk
+                ))
 
     def dependencies(self, model):
         dependencies = set()
@@ -60,4 +63,3 @@
             return toposort_flatten(dependencies)
         except ValueError as ex:
             raise SeederCommandError(str(ex))
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/django_seed/seeder.py 
new/django-seed-0.2.2/django_seed/seeder.py
--- old/django-seed-0.1.9/django_seed/seeder.py 2018-05-14 20:26:54.000000000 
+0200
+++ new/django-seed-0.2.2/django_seed/seeder.py 2020-02-04 23:56:59.000000000 
+0100
@@ -1,11 +1,11 @@
 import random
 
 from django.db.models import ForeignKey, ManyToManyField, OneToOneField
-from django.db.models.fields import AutoField
 
 from django_seed.exceptions import SeederException
 from django_seed.guessers import NameGuesser, FieldTypeGuesser
 
+
 class ModelSeeder(object):
     def __init__(self, model):
         """
@@ -40,17 +40,17 @@
 
             field_name = field.name
 
-            if field.get_default(): 
+            if field.primary_key:
+                continue
+
+            if field.get_default():
                 formatters[field_name] = field.get_default()
                 continue
-            
+
             if isinstance(field, (ForeignKey, ManyToManyField, OneToOneField)):
                 formatters[field_name] = self.build_relation(field, 
field.related_model)
                 continue
 
-            if isinstance(field, AutoField):
-                continue
-
             if not field.choices:
                 formatter = name_guesser.guess_format(field_name)
                 if formatter:
@@ -122,7 +122,7 @@
         :type model: Model
         :param number: int The number of entities to seed
         :type number: integer
-        :param customFieldFormatters: optional dict with field as key and 
+        :param customFieldFormatters: optional dict with field as key and
         callable as value
         :type customFieldFormatters: dict or None
         """
@@ -132,7 +132,7 @@
         model.field_formatters = model.guess_field_formatters(self.faker)
         if customFieldFormatters:
             model.field_formatters.update(customFieldFormatters)
-        
+
         klass = model.model
         self.entities[klass] = model
         self.quantities[klass] = number
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/django_seed.egg-info/PKG-INFO 
new/django-seed-0.2.2/django_seed.egg-info/PKG-INFO
--- old/django-seed-0.1.9/django_seed.egg-info/PKG-INFO 2018-05-14 
20:29:17.000000000 +0200
+++ new/django-seed-0.2.2/django_seed.egg-info/PKG-INFO 2020-02-05 
00:04:10.000000000 +0100
@@ -1,10 +1,10 @@
 Metadata-Version: 1.1
 Name: django-seed
-Version: 0.1.9
+Version: 0.2.2
 Summary: Seed your Django project with fake data
 Home-page: http://github.com/brobin/django-seed
 Author: Tobin Brown
-Author-email: to...@brobin.me
+Author-email: tobinjbr...@gmail.com
 License: MIT
 Description: |seed-logo|
         
@@ -113,6 +113,13 @@
                 <class 'faker.django.tests.Game'>: [1, 2, 3, 4, 5]
             }
         
+        You may specify a different locale by passing it in the constructor of 
the seeder. Defaults to `settings.LANGUAGE_CODE`
+        
+        .. code-block:: python
+        
+            seeder = Seed.seeder(locale='sv_SE')
+            seeder.faker.city()  # 'Västerås'
+        
         
         -----
         Tests
@@ -160,7 +167,7 @@
         
         .. |python| image:: 
https://img.shields.io/pypi/pyversions/django-seed.svg?style=flat-square
             :target: https://pypi.python.org/pypi/django-seed
-            :alt: Python 2.7, 3.x
+            :alt: Python 3.x
         
         .. |seed-logo| image:: assets/django_seed.png
             :alt: Django Seed
@@ -172,15 +179,16 @@
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Framework :: Django
 Classifier: Framework :: Django :: 1.11
-Classifier: Framework :: Django :: 2.0
+Classifier: Framework :: Django :: 2.2
+Classifier: Framework :: Django :: 3.0
 Classifier: Natural Language :: English
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Software Development :: Testing
 Classifier: Topic :: Utilities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/django_seed.egg-info/SOURCES.txt 
new/django-seed-0.2.2/django_seed.egg-info/SOURCES.txt
--- old/django-seed-0.1.9/django_seed.egg-info/SOURCES.txt      2018-05-14 
20:29:17.000000000 +0200
+++ new/django-seed-0.2.2/django_seed.egg-info/SOURCES.txt      2020-02-05 
00:04:10.000000000 +0100
@@ -1,5 +1,7 @@
+LICENSE
 MANIFEST.in
 README.rst
+runtests.py
 setup.py
 django_seed/__init__.py
 django_seed/exceptions.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/runtests.py 
new/django-seed-0.2.2/runtests.py
--- old/django-seed-0.1.9/runtests.py   1970-01-01 01:00:00.000000000 +0100
+++ new/django-seed-0.2.2/runtests.py   2020-02-04 23:15:41.000000000 +0100
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+import sys
+import django
+from django.conf import settings
+from django.test.utils import get_runner
+
+
+def configure():
+    from faker import Faker
+    fake = Faker()
+
+    settings.configure(
+        DATABASES={
+            'default': {
+                'ENGINE': 'django.db.backends.sqlite3',
+                'NAME': ':memory:',
+            }
+        },
+        INSTALLED_APPS=(
+            'django_seed',
+            'django_nose',
+        ),
+        TEST_RUNNER = 'django_nose.NoseTestSuiteRunner',
+        NOSE_ARGS = [
+            '--with-coverage',
+            '--cover-package=django_seed',
+        ],
+        SITE_ID=1,
+        SECRET_KEY=fake.sha1(),
+    )
+
+
+if not settings.configured: 
+    configure()
+
+
+def runtests():
+    django.setup()
+    TestRunner = get_runner(settings)
+    test_runner = TestRunner(verbosity=1, interactive=True, failfast=False)
+    failures = test_runner.run_tests(['django_seed', ])
+    sys.exit(failures)
+
+
+if __name__ == '__main__':
+    runtests()
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-seed-0.1.9/setup.py 
new/django-seed-0.2.2/setup.py
--- old/django-seed-0.1.9/setup.py      2018-01-15 20:54:08.000000000 +0100
+++ new/django-seed-0.2.2/setup.py      2020-02-04 23:56:59.000000000 +0100
@@ -29,7 +29,7 @@
     name='django-seed',
     version=find_version('django_seed', '__init__.py'),
     author='Tobin Brown',
-    author_email='to...@brobin.me',
+    author_email='tobinjbr...@gmail.com',
     packages=['django_seed', 'django_seed.management', 
'django_seed.management.commands'],
     include_package_data=True,
     url='http://github.com/brobin/django-seed',
@@ -41,15 +41,16 @@
         'License :: OSI Approved :: MIT License',
         'Framework :: Django',
         'Framework :: Django :: 1.11',
-        'Framework :: Django :: 2.0',
+        'Framework :: Django :: 2.2',
+        'Framework :: Django :: 3.0',
         'Natural Language :: English',
         'Programming Language :: Python',
-        'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
         'Topic :: Software Development :: Libraries :: Python Modules',
         'Topic :: Software Development :: Testing',
         'Topic :: Utilities',


Reply via email to