Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-django-extensions for
openSUSE:Factory checked in at 2026-09-11 18:05:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-extensions (Old)
and /work/SRC/openSUSE:Factory/.python-django-extensions.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-extensions"
Fri Sep 11 18:05:46 2026 rev:22 rq:1377408 version:4.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-django-extensions/python-django-extensions.changes
2025-06-04 20:29:05.130305690 +0200
+++
/work/SRC/openSUSE:Factory/.python-django-extensions.new.1265/python-django-extensions.changes
2026-09-11 18:08:43.795415290 +0200
@@ -1,0 +2,5 @@
+Fri Sep 11 13:48:11 UTC 2026 - Markéta Machová <[email protected]>
+
+- Add django6.patch for compatibility with Django 6
+
+-------------------------------------------------------------------
New:
----
django6.patch
----------(New B)----------
New:
- Add django6.patch for compatibility with Django 6
----------(New E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-extensions.spec ++++++
--- /var/tmp/diff_new_pack.36cRu9/_old 2026-09-11 18:08:44.717453892 +0200
+++ /var/tmp/diff_new_pack.36cRu9/_new 2026-09-11 18:08:44.721454059 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-django-extensions
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,8 @@
License: BSD-3-Clause
URL: https://github.com/django-extensions/django-extensions
Source:
https://github.com/django-extensions/django-extensions/archive/%{version}.tar.gz#/django-extensions-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM
https://github.com/django-extensions/django-extensions/pull/1979 fix: add
Django 6 compatibility for signals, constraints, and random char field
+Patch0: django6.patch
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
++++++ django6.patch ++++++
>From 32ddfb0499bec7f39f9fbb44568d2781cecd1f32 Mon Sep 17 00:00:00 2001
From: Abdumutalov Sherzod <[email protected]>
Date: Thu, 21 May 2026 17:17:21 +0500
Subject: [PATCH] fix: add Django 6 compatibility for signals, constraints, and
random char field (#1979)
---
django_extensions/db/fields/__init__.py | 18 +++++++++++++-----
.../management/commands/list_signals.py | 4 +++-
tests/test_management_command.py | 6 +++++-
tests/testapp/models.py | 7 ++++++-
4 files changed, 27 insertions(+), 8 deletions(-)
Index: django-extensions-4.1/django_extensions/db/fields/__init__.py
===================================================================
--- django-extensions-4.1.orig/django_extensions/db/fields/__init__.py
+++ django-extensions-4.1/django_extensions/db/fields/__init__.py
@@ -87,7 +87,11 @@ class UniqueFieldMixin:
new = next(iterator)
kwargs[self.attname] = new
- while not new or queryset.filter(query, **kwargs):
+ while True:
+ matching = queryset.filter(query, **kwargs)
+ has_match = matching.exists() if hasattr(matching, "exists") else
bool(matching)
+ if new and not has_match:
+ break
new = next(iterator)
kwargs[self.attname] = new
setattr(model_instance, self.attname, new)
@@ -389,10 +393,14 @@ class RandomCharField(UniqueFieldMixin,
return False
def pre_save(self, model_instance, add):
- if (not add or self.keep_default) and getattr(
- model_instance, self.attname
- ) != "":
- return getattr(model_instance, self.attname)
+ current_value = getattr(model_instance, self.attname)
+ # Django 6 may call pre_save multiple times for inserts; if we've
already
+ # populated the field value, reuse it instead of regenerating.
+ if current_value not in ("", None):
+ return current_value
+
+ if (not add or self.keep_default) and current_value != "":
+ return current_value
population = ""
if self.include_alpha:
Index:
django-extensions-4.1/django_extensions/management/commands/list_signals.py
===================================================================
---
django-extensions-4.1.orig/django_extensions/management/commands/list_signals.py
+++ django-extensions-4.1/django_extensions/management/commands/list_signals.py
@@ -53,7 +53,9 @@ class Command(BaseCommand):
for signal in signals:
signal_name = SIGNAL_NAMES.get(signal, "unknown")
for receiver in signal.receivers:
- if django.VERSION >= (5, 0):
+ if django.VERSION >= (6, 0):
+ lookup, receiver, _sender, is_async = receiver
+ elif django.VERSION >= (5, 0):
lookup, receiver, is_async = receiver
else:
lookup, receiver = receiver
Index: django-extensions-4.1/tests/test_management_command.py
===================================================================
--- django-extensions-4.1.orig/tests/test_management_command.py
+++ django-extensions-4.1/tests/test_management_command.py
@@ -4,6 +4,7 @@ from unittest import mock
import logging
import importlib
+import django
from django.core.management import (
call_command,
find_commands,
@@ -422,7 +423,10 @@ class ListModelInfoTests(TestCase):
stdout=out,
)
self.output = out.getvalue()
- self.assertIn("id - AutoField", self.output)
+ if django.VERSION >= (6, 0):
+ self.assertIn("id - BigAutoField", self.output)
+ else:
+ self.assertIn("id - AutoField", self.output)
self.assertIn("char_field - CharField", self.output)
self.assertIn("integer_field - IntegerField", self.output)
self.assertIn("foreign_key_field - ForeignKey", self.output)
Index: django-extensions-4.1/tests/testapp/models.py
===================================================================
--- django-extensions-4.1.orig/tests/testapp/models.py
+++ django-extensions-4.1/tests/testapp/models.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+import django
from django.db import models
from django.contrib.auth import get_user_model
from django.db.models import UniqueConstraint
@@ -179,7 +180,11 @@ class PostWithUniqField(models.Model):
fields=("common_field", "uniq_field"),
name="unique_common_uniq_pair"
),
models.CheckConstraint(
- check=~models.Q(common_field=models.F("another_common_field")),
+ **(
+ {"condition":
~models.Q(common_field=models.F("another_common_field"))}
+ if django.VERSION >= (5, 2)
+ else {"check":
~models.Q(common_field=models.F("another_common_field"))}
+ ),
name="common_and_another_common_differ",
),
]