Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-django-attachments for 
openSUSE:Factory checked in at 2026-09-15 12:49:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-attachments (Old)
 and      /work/SRC/openSUSE:Factory/.python-django-attachments.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-django-attachments"

Tue Sep 15 12:49:36 2026 rev:9 rq:1378059 version:1.12

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-django-attachments/python-django-attachments.changes
      2026-01-05 16:04:27.811710376 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-django-attachments.new.383539/python-django-attachments.changes
  2026-09-15 12:49:45.470281248 +0200
@@ -1,0 +2,8 @@
+Tue Sep 15 02:48:24 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch support-django-6.1.patch:
+  * Support BigAutoField changes for Django 6.1.
+- Add patch remove-six.patch:
+  * Remove use of six.
+
+-------------------------------------------------------------------

New:
----
  remove-six.patch
  support-django-6.1.patch

----------(New B)----------
  New:  * Support BigAutoField changes for Django 6.1.
- Add patch remove-six.patch:
  * Remove use of six.
  New:
- Add patch support-django-6.1.patch:
  * Support BigAutoField changes for Django 6.1.
----------(New E)----------

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

Other differences:
------------------
++++++ python-django-attachments.spec ++++++
--- /var/tmp/diff_new_pack.SfzY4j/_old  2026-09-15 12:49:46.546326260 +0200
+++ /var/tmp/diff_new_pack.SfzY4j/_new  2026-09-15 12:49:46.548326344 +0200
@@ -21,21 +21,22 @@
 Release:        0
 Summary:        Attach files to any Django model
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://github.com/bartTC/django-attachments
 Source:         
https://files.pythonhosted.org/packages/source/d/django_attachments/django_attachments-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#atodorov/django-attachments#117
+Patch0:         support-django-6.1.patch
+# PATCH-FIX-OPENSUSE Remove six
+Patch1:         remove-six.patch
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-django >= 1.11
-Requires:       python-six
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module django >= 1.11}
 BuildRequires:  %{python_module pytest-django}
-BuildRequires:  %{python_module six}
 # /SECTION
 %python_subpackages
 
@@ -43,7 +44,7 @@
 django-attachments is generic Django application to attach Files (Attachments) 
to any model.
 
 %prep
-%setup -q -n django_attachments-%{version}
+%autosetup -p1 -n django_attachments-%{version}
 sed -i '/mock/d;/-cov/d;/flakes/d' setup.cfg
 sed -i 's/import mock/from unittest import mock/' 
attachments/tests/test_views.py
 

++++++ remove-six.patch ++++++
Index: django_attachments-1.12/attachments/models.py
===================================================================
--- django_attachments-1.12.orig/attachments/models.py
+++ django_attachments-1.12/attachments/models.py
@@ -7,7 +7,6 @@ from django.contrib.contenttypes.fields
 from django.contrib.contenttypes.models import ContentType
 from django.db import models
 from django.utils.translation import gettext_lazy as _
-from six import python_2_unicode_compatible
 
 
 def attachment_upload(instance, filename):
@@ -26,7 +25,6 @@ class AttachmentManager(models.Manager):
         return self.filter(content_type__pk=object_type.id, object_id=obj.pk)
 
 
-@python_2_unicode_compatible
 class Attachment(models.Model):
     objects = AttachmentManager()
 
Index: django_attachments-1.12/attachments/tests/test_integrity.py
===================================================================
--- django_attachments-1.12.orig/attachments/tests/test_integrity.py
+++ django_attachments-1.12/attachments/tests/test_integrity.py
@@ -1,6 +1,6 @@
 from django.core.management import call_command
 from django.test import TestCase
-from six import StringIO
+from io import StringIO
 
 
 class IntegrityTestCase(TestCase):
Index: django_attachments-1.12/setup.cfg
===================================================================
--- django_attachments-1.12.orig/setup.cfg
+++ django_attachments-1.12/setup.cfg
@@ -28,7 +28,6 @@ include_package_data = True
 zip_safe = False
 install_requires = 
        django>=1.11
-       six
        mock
 
 [options.extras_require]

++++++ support-django-6.1.patch ++++++
>From 690f51b84061e376497821780fde6d7b04405043 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Tue, 15 Sep 2026 12:28:41 +1000
Subject: [PATCH] Support Django 6.1 by setting DEFAULT_AUTO_FIELD

Django 6.1 will automatically write migrations to BigAutoField, which
makes the integrity test fail. To ease debugging, I have also switched
it to using self.AssertIn().
---
 attachments/tests/test_integrity.py   | 2 +-
 attachments/tests/testapp/settings.py | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/attachments/tests/test_integrity.py 
b/attachments/tests/test_integrity.py
index 68ac80c..5a51cfa 100644
--- a/attachments/tests/test_integrity.py
+++ b/attachments/tests/test_integrity.py
@@ -16,4 +16,4 @@ def test_no_pending_migrations(self):
         call_command(
             "makemigrations", "--dry-run", interactive=False, stdout=output
         )
-        self.assertTrue("No changes detected" in output.getvalue())
+        self.assertIn("No changes detected", output.getvalue())
diff --git a/attachments/tests/testapp/settings.py 
b/attachments/tests/testapp/settings.py
index 503daac..7c58dd5 100644
--- a/attachments/tests/testapp/settings.py
+++ b/attachments/tests/testapp/settings.py
@@ -78,3 +78,7 @@
         },
     }
 ]
+
+# Prevent Django 6.1 and above from auto-generating migrations to upgrade
+# the testapp's existing AutoField primary keys.
+DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

Reply via email to