git: 0a928f388161 - main - www/py-django-bleach: Allow build with py-bleach 6.0.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 05 Feb 2023 15:55:54 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0a928f3881610045c81d449985b7fecf06ef97b0
commit 0a928f3881610045c81d449985b7fecf06ef97b0
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-02-05 15:19:51 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-02-05 15:48:07 +0000
www/py-django-bleach: Allow build with py-bleach 6.0.0+
- Bump PORTREVISION for package change
---
www/py-django-bleach/Makefile | 3 ++-
www/py-django-bleach/files/patch-bleach6 | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/www/py-django-bleach/Makefile b/www/py-django-bleach/Makefile
index 197fddc5420f..2596c683e7cc 100644
--- a/www/py-django-bleach/Makefile
+++ b/www/py-django-bleach/Makefile
@@ -1,5 +1,6 @@
PORTNAME= django-bleach
PORTVERSION= 3.0.1
+PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -11,7 +12,7 @@ WWW= https://github.com/marksweb/django-bleach
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bleach>=5<6:www/py-bleach@${PY_FLAVOR} \
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bleach>=5:www/py-bleach@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}django32>=3.2:www/py-django32@${PY_FLAVOR}
USES= python:3.8+
diff --git a/www/py-django-bleach/files/patch-bleach6 b/www/py-django-bleach/files/patch-bleach6
new file mode 100644
index 000000000000..3e894a4e2716
--- /dev/null
+++ b/www/py-django-bleach/files/patch-bleach6
@@ -0,0 +1,24 @@
+--- django_bleach/tests/test_forms.py.orig 2022-10-12 00:33:48 UTC
++++ django_bleach/tests/test_forms.py
+@@ -147,7 +147,7 @@ class TestCustomWidget(TestCase):
+ no_tags = BleachField(
+ max_length=100,
+ strip_tags=True,
+- allowed_tags=[]
++ allowed_tags={}
+ )
+ no_strip = BleachField(
+ max_length=100,
+--- testproject/models.py.orig 2022-10-12 00:33:48 UTC
++++ testproject/models.py
+@@ -10,8 +10,8 @@ class Person(models.Model):
+ biography = BleachField(
+ max_length=100,
+ verbose_name='Person biography',
+- allowed_tags=['p', 'a', 'li', 'ul', 'strong'],
++ allowed_tags={'p', 'a', 'li', 'ul', 'strong'},
+ allowed_attributes=['class', 'href', 'style'],
+- allowed_protocols=['http', 'https'],
++ allowed_protocols={'http', 'https'},
+ css_sanitizer=CSSSanitizer(allowed_css_properties=['color', 'background-color'])
+ )