Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-django-tastypie for
openSUSE:Factory checked in at 2024-01-31 23:54:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-tastypie (Old)
and /work/SRC/openSUSE:Factory/.python-django-tastypie.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-tastypie"
Wed Jan 31 23:54:42 2024 rev:22 rq:1142889 version:0.14.6
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-django-tastypie/python-django-tastypie.changes
2023-09-20 13:28:26.105023542 +0200
+++
/work/SRC/openSUSE:Factory/.python-django-tastypie.new.1815/python-django-tastypie.changes
2024-01-31 23:54:58.231631450 +0100
@@ -1,0 +2,8 @@
+Wed Jan 31 03:36:25 UTC 2024 - Steve Kowalik <[email protected]>
+
+- Add patch correct-assertion-methods.patch:
+ * Use non-deprecated assertion methods.
+- Switch to autosetup and pyproject macros.
+- Stop using globbing in %files.
+
+-------------------------------------------------------------------
New:
----
correct-assertion-methods.patch
BETA DEBUG BEGIN:
New:
- Add patch correct-assertion-methods.patch:
* Use non-deprecated assertion methods.
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-tastypie.spec ++++++
--- /var/tmp/diff_new_pack.s3wyqD/_old 2024-01-31 23:54:59.271668981 +0100
+++ /var/tmp/diff_new_pack.s3wyqD/_new 2024-01-31 23:54:59.271668981 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-django-tastypie
#
-# 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
@@ -16,8 +16,6 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define skip_python2 1
Name: python-django-tastypie
Version: 0.14.6
Release: 0
@@ -25,14 +23,18 @@
License: BSD-3-Clause
URL: https://github.com/django-tastypie/django-tastypie
Source:
https://github.com/django-tastypie/django-tastypie/archive/v%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#django-tastypie/django-tastypie#1667
+Patch0: correct-assertion-methods.patch
BuildRequires: %{python_module Django >= 1.11.0}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module biplist}
BuildRequires: %{python_module defusedxml}
BuildRequires: %{python_module lxml}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module python-dateutil >= 2.1}
BuildRequires: %{python_module python-mimeparse >= 0.1.4}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Django >= 1.11.0
@@ -50,13 +52,13 @@
customizable abstraction for creating REST-style interfaces.
%prep
-%setup -q -n django-tastypie-%{version}
+%autosetup -p1 -n django-tastypie-%{version}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -77,5 +79,6 @@
%files %{python_files}
%license LICENSE
%doc AUTHORS *.rst docs/*.rst docs/release_notes/ docs/code/
-%{python_sitelib}/*tastypie*/
+%{python_sitelib}/tastypie
+%{python_sitelib}/django_tastypie-%{version}.dist-info
++++++ correct-assertion-methods.patch ++++++
>From 2ff35f05095bab418948bacd1cf6676bb2d95081 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Wed, 31 Jan 2024 14:26:19 +1100
Subject: [PATCH] Use non-deprecated assertion methods
Both TestCase.assert_() and TestCase.assertEquals() have been deprecated
since Python 3.2, and removed as of Python 3.12. Switch to the correct
method names, assertIn() and assertEqual().
---
tests/core/tests/resources.py | 50 +++++++++++++++++------------------
tests/namespaced/tests.py | 4 +--
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/tests/core/tests/resources.py b/tests/core/tests/resources.py
index 2f9287b49..c054647c5 100644
--- a/tests/core/tests/resources.py
+++ b/tests/core/tests/resources.py
@@ -302,19 +302,19 @@ def test_deserialize_no_contenttype_header(self):
def test_fields(self):
basic = BasicResource()
self.assertEqual(len(basic.fields), 4)
- self.assert_('name' in basic.fields)
+ self.assertIn('name', basic.fields)
self.assertEqual(isinstance(basic.fields['name'], fields.CharField),
True)
self.assertEqual(basic.fields['name']._resource, basic.__class__)
self.assertEqual(basic.fields['name'].instance_name, 'name')
- self.assert_('view_count' in basic.fields)
+ self.assertIn('view_count', basic.fields)
self.assertEqual(isinstance(basic.fields['view_count'],
fields.IntegerField), True)
self.assertEqual(basic.fields['view_count']._resource, basic.__class__)
self.assertEqual(basic.fields['view_count'].instance_name,
'view_count')
- self.assert_('date_joined' in basic.fields)
+ self.assertIn('date_joined', basic.fields)
self.assertEqual(isinstance(basic.fields['date_joined'],
fields.DateTimeField), True)
self.assertEqual(basic.fields['date_joined']._resource,
basic.__class__)
self.assertEqual(basic.fields['date_joined'].instance_name,
'date_joined')
- self.assert_('resource_uri' in basic.fields)
+ self.assertIn('resource_uri', basic.fields)
self.assertEqual(isinstance(basic.fields['resource_uri'],
fields.CharField), True)
self.assertEqual(basic.fields['resource_uri']._resource,
basic.__class__)
self.assertEqual(basic.fields['resource_uri'].instance_name,
'resource_uri')
@@ -322,35 +322,35 @@ def test_fields(self):
another = AnotherBasicResource()
self.assertEqual(len(another.fields), 8)
- self.assert_('name' in another.fields)
+ self.assertIn('name', another.fields)
self.assertEqual(isinstance(another.name, fields.CharField), True)
self.assertEqual(another.fields['name']._resource, another.__class__)
self.assertEqual(another.fields['name'].instance_name, 'name')
- self.assert_('view_count' in another.fields)
+ self.assertIn('view_count', another.fields)
self.assertEqual(isinstance(another.view_count, fields.IntegerField),
True)
self.assertEqual(another.fields['view_count']._resource,
another.__class__)
self.assertEqual(another.fields['view_count'].instance_name,
'view_count')
- self.assert_('date_joined' in another.fields)
+ self.assertIn('date_joined', another.fields)
self.assertEqual(isinstance(another.date_joined, fields.DateField),
True)
self.assertEqual(another.fields['date_joined']._resource,
another.__class__)
self.assertEqual(another.fields['date_joined'].instance_name,
'date_joined')
- self.assert_('is_active' in another.fields)
+ self.assertIn('is_active', another.fields)
self.assertEqual(isinstance(another.is_active, fields.BooleanField),
True)
self.assertEqual(another.fields['is_active']._resource,
another.__class__)
self.assertEqual(another.fields['is_active'].instance_name,
'is_active')
- self.assert_('aliases' in another.fields)
+ self.assertIn('aliases', another.fields)
self.assertEqual(isinstance(another.aliases, fields.ListField), True)
self.assertEqual(another.fields['aliases']._resource,
another.__class__)
self.assertEqual(another.fields['aliases'].instance_name, 'aliases')
- self.assert_('meta' in another.fields)
+ self.assertIn('meta', another.fields)
self.assertEqual(isinstance(another.meta, fields.DictField), True)
self.assertEqual(another.fields['meta']._resource, another.__class__)
self.assertEqual(another.fields['meta'].instance_name, 'meta')
- self.assert_('owed' in another.fields)
+ self.assertIn('owed', another.fields)
self.assertEqual(isinstance(another.owed, fields.DecimalField), True)
self.assertEqual(another.fields['owed']._resource, another.__class__)
self.assertEqual(another.fields['owed'].instance_name, 'owed')
- self.assert_('resource_uri' in another.fields)
+ self.assertIn('resource_uri', another.fields)
self.assertEqual(isinstance(another.resource_uri, fields.CharField),
True)
self.assertEqual(another.fields['resource_uri']._resource,
another.__class__)
self.assertEqual(another.fields['resource_uri'].instance_name,
'resource_uri')
@@ -358,15 +358,15 @@ def test_fields(self):
nouri = NoUriBasicResource()
self.assertEqual(len(nouri.fields), 3)
- self.assert_('name' in nouri.fields)
+ self.assertIn('name', nouri.fields)
self.assertEqual(isinstance(nouri.name, fields.CharField), True)
self.assertEqual(nouri.fields['name']._resource, nouri.__class__)
self.assertEqual(nouri.fields['name'].instance_name, 'name')
- self.assert_('view_count' in nouri.fields)
+ self.assertIn('view_count', nouri.fields)
self.assertEqual(isinstance(nouri.view_count, fields.IntegerField),
True)
self.assertEqual(nouri.fields['view_count']._resource, nouri.__class__)
self.assertEqual(nouri.fields['view_count'].instance_name,
'view_count')
- self.assert_('date_joined' in nouri.fields)
+ self.assertIn('date_joined', nouri.fields)
self.assertEqual(isinstance(nouri.date_joined, fields.DateTimeField),
True)
self.assertEqual(nouri.fields['date_joined']._resource,
nouri.__class__)
self.assertEqual(nouri.fields['date_joined'].instance_name,
'date_joined')
@@ -553,7 +553,7 @@ def test_full_hydrate(self):
empty_null_bundle = Bundle(obj=obj, data={})
hydrated = nullable.full_hydrate(empty_null_bundle)
- self.assertEquals(hydrated.obj.name, "Daniel")
+ self.assertEqual(hydrated.obj.name, "Daniel")
def test_full_hydrate__can_put_null_to_clear_related_value(self):
class RelatedBasicResource(BasicResource):
@@ -890,8 +890,8 @@ def test_get_list_with_use_in(self):
request.method = 'GET'
basic_resource_list =
json.loads(force_str(basic.get_list(request).content))['objects']
- self.assertEquals(basic_resource_list[0]['name'], 'Daniel')
- self.assertEquals(basic_resource_list[0]['date_joined'],
u'2010-03-30T09:00:00')
+ self.assertEqual(basic_resource_list[0]['name'], 'Daniel')
+ self.assertEqual(basic_resource_list[0]['date_joined'],
u'2010-03-30T09:00:00')
self.assertNotIn('view_count', basic_resource_list[0])
@@ -1622,7 +1622,7 @@ def test_fields(self):
# some related bits here & self-referential bits later on.
resource_1 = RelatedNoteResource()
self.assertEqual(len(resource_1.fields), 8)
- self.assert_('author' in resource_1.fields)
+ self.assertIn('author', resource_1.fields)
self.assertTrue(isinstance(resource_1.fields['author'],
fields.ToOneField))
self.assertEqual(resource_1.fields['author']._resource,
resource_1.__class__)
self.assertEqual(resource_1.fields['author'].instance_name, 'author')
@@ -4522,9 +4522,9 @@ def
test_obj_create_full_hydrate_on_create_authorization(self):
}, obj=Counter())
cr.obj_create(counter_bundle)
- self.assertEquals(counter_bundle._create_auth_call_count, 1)
- self.assertEquals(counter_bundle.obj.name, "About")
- self.assertEquals(counter_bundle.obj.slug, "about")
+ self.assertEqual(counter_bundle._create_auth_call_count, 1)
+ self.assertEqual(counter_bundle.obj.name, "About")
+ self.assertEqual(counter_bundle.obj.slug, "about")
def test_obj_update(self):
self.assertEqual(Note.objects.all().count(), 6)
@@ -4688,9 +4688,9 @@ def
test_obj_update_full_hydrate_on_update_authorization(self):
cr.obj_update(counter_bundle, pk=1)
counter = Counter.objects.get(pk=1)
- self.assertEquals(counter_bundle._update_auth_call_count, 1)
- self.assertEquals(counter_bundle.obj.name, "Signups")
- self.assertEquals(counter_bundle.obj.slug, "signups")
+ self.assertEqual(counter_bundle._update_auth_call_count, 1)
+ self.assertEqual(counter_bundle.obj.name, "Signups")
+ self.assertEqual(counter_bundle.obj.slug, "signups")
def test_lookup_kwargs_with_identifiers__field_without_attr(self):
"""
diff --git a/tests/namespaced/tests.py b/tests/namespaced/tests.py
index 69f92074b..257084392 100644
--- a/tests/namespaced/tests.py
+++ b/tests/namespaced/tests.py
@@ -18,5 +18,5 @@ def test_urls(self):
self.assertRaises(NoReverseMatch, reverse, 'api_v1_top_level')
self.assertRaises(NoReverseMatch, reverse, 'special:api_v1_top_level')
- self.assertEquals(reverse('special:api_v1_top_level',
kwargs={'api_name': 'v1'}), '/api/v1/')
- self.assertEquals(reverse('special:api_dispatch_list',
kwargs={'api_name': 'v1', 'resource_name': 'notes'}), '/api/v1/notes/')
+ self.assertEqual(reverse('special:api_v1_top_level',
kwargs={'api_name': 'v1'}), '/api/v1/')
+ self.assertEqual(reverse('special:api_dispatch_list',
kwargs={'api_name': 'v1', 'resource_name': 'notes'}), '/api/v1/notes/')