Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2024 05:39:45 GMT
From:      Kai Knoblich <kai@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 52e2b209b284 - main - www/py-django-tagging: Add Django 4.2 compatibility
Message-ID:  <202403270539.42R5dj8H008350@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kai:

URL: https://cgit.FreeBSD.org/ports/commit/?id=52e2b209b284ecc9e1ef29f7fcb3ab2cc8219b77

commit 52e2b209b284ecc9e1ef29f7fcb3ab2cc8219b77
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2024-03-27 05:37:20 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2024-03-27 05:38:17 +0000

    www/py-django-tagging: Add Django 4.2 compatibility
    
    * Bump PORTREVISION due package change.
    
    PR:             277929
    Approved by:    Kevin Golding (maintainer)
---
 www/py-django-tagging/Makefile                      |  2 +-
 www/py-django-tagging/files/patch-tagging_models.py | 20 +++++++++++++++++---
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/www/py-django-tagging/Makefile b/www/py-django-tagging/Makefile
index b097a791cf35..9aec9a845d90 100644
--- a/www/py-django-tagging/Makefile
+++ b/www/py-django-tagging/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	django-tagging
 PORTVERSION=	0.5.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
diff --git a/www/py-django-tagging/files/patch-tagging_models.py b/www/py-django-tagging/files/patch-tagging_models.py
index 5c4c00ac7116..f1391404addb 100644
--- a/www/py-django-tagging/files/patch-tagging_models.py
+++ b/www/py-django-tagging/files/patch-tagging_models.py
@@ -1,13 +1,21 @@
---- tagging/models.py.orig	2022-04-11 10:40:39 UTC
+Add compatibility for Django 4.x
+
+Obtained from:
+
+https://patch-diff.githubusercontent.com/raw/Fantomas42/django-tagging/pull/23.patch
+
+--- tagging/models.py.orig	2020-03-06 17:56:16 UTC
 +++ tagging/models.py
-@@ -5,6 +5,7 @@ from django.contrib.contenttypes.fields import Generic
+@@ -5,7 +5,8 @@ from django.db import models
  from django.contrib.contenttypes.models import ContentType
  from django.db import connection
  from django.db import models
+-from django.utils.encoding import smart_text
 +from django.db.models.query_utils import Q
- from django.utils.encoding import smart_text
++from django.utils.encoding import smart_str
  from django.utils.translation import gettext_lazy as _
  
+ from tagging import settings
 @@ -155,8 +156,9 @@ class TagManager(models.Manager):
              filters = {}
  
@@ -20,3 +28,9 @@
          usage = self.usage_for_queryset(queryset, counts, min_count)
  
          return usage
+@@ -519,4 +521,4 @@ class TaggedItem(models.Model):
+         verbose_name_plural = _('tagged items')
+ 
+     def __str__(self):
+-        return '%s [%s]' % (smart_text(self.object), smart_text(self.tag))
++        return '%s [%s]' % (smart_str(self.object), smart_str(self.tag))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403270539.42R5dj8H008350>