diff --git a/django_compressor-4.3.1.tar.gz b/django_compressor-4.3.1.tar.gz deleted file mode 100644 index 6f22fff..0000000 --- a/django_compressor-4.3.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68858c0da6cc099cc29a022d86c3ba8aed114da9d709eeceb0d7b8181b5f8942 -size 422161 diff --git a/django_compressor-4.4.tar.gz b/django_compressor-4.4.tar.gz new file mode 100644 index 0000000..bcc7ddf --- /dev/null +++ b/django_compressor-4.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b0acc9cfba9f69bc38e7c41da9b0d70a20bc95587b643ffef9609cf46064f67 +size 422254 diff --git a/lstrip.patch b/lstrip.patch new file mode 100644 index 0000000..6c1e3d7 --- /dev/null +++ b/lstrip.patch @@ -0,0 +1,28 @@ +From 1afd937f6a49b10013c1df71b53d054170efdce4 Mon Sep 17 00:00:00 2001 +From: bcail +Date: Mon, 3 Jul 2023 17:24:39 +0000 +Subject: [PATCH] Add `LazyScriptNamePrefixedUrl.lstrip` to fix tests (#1196) + +Needed because of cpython PR +https://github.com/python/cpython/pull/104575 +--- + compressor/tests/test_offline.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/compressor/tests/test_offline.py b/compressor/tests/test_offline.py +index c208048e..c49d1277 100644 +--- a/compressor/tests/test_offline.py ++++ b/compressor/tests/test_offline.py +@@ -58,6 +58,12 @@ def __unicode__(self): + def __hash__(self): + return str.__hash__(str(self)) + ++ def lstrip(self, *args, **kwargs): ++ """ ++ Override ``.lstrip()`` method to make it work with ``{% static %}``. ++ """ ++ return str(self).lstrip(*args, **kwargs) ++ + def split(self, *args, **kwargs): + """ + Override ``.split()`` method to make it work with ``{% static %}``. diff --git a/python-django-compressor.changes b/python-django-compressor.changes index e6cc43f..077a071 100644 --- a/python-django-compressor.changes +++ b/python-django-compressor.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 18 08:25:44 UTC 2023 - Markéta Machová + +- Update to 4.4 + * Full list of changes from v4.3.1 + * Officially support Django 4.2 +- Add upstream patch lstrip.patch + ------------------------------------------------------------------- Sun Jun 18 16:31:47 UTC 2023 - Andreas Schneider diff --git a/python-django-compressor.spec b/python-django-compressor.spec index f21b726..8b66de2 100644 --- a/python-django-compressor.spec +++ b/python-django-compressor.spec @@ -19,12 +19,14 @@ %{?sle15_python_module_pythons} %define mod_name django_compressor Name: python-django-compressor -Version: 4.3.1 +Version: 4.4 Release: 0 Summary: Python module to compress linked/inline JavaScript/CSS to cached files License: Apache-2.0 AND BSD-3-Clause AND MIT URL: https://github.com/django-compressor/django-compressor Source: https://files.pythonhosted.org/packages/source/d/%{mod_name}/%{mod_name}-%{version}.tar.gz +#PATCH-FIX-UPSTREAM https://github.com/django-compressor/django-compressor/pull/1196 Add LazyScriptNamePrefixedUrl.lstrip to fix tests +Patch: lstrip.patch BuildRequires: %{python_module Brotli >= 1.0.6} BuildRequires: %{python_module Django >= 2.2} BuildRequires: %{python_module Jinja2} @@ -64,11 +66,8 @@ template tag. %prep %setup -q -n %{mod_name}-%{version} +%autopatch -p1 sed -i '1{/env python/d}' compressor/tests/precompiler.py -# Fix broken tests related to jijna2 -# gh#django-compressor/django-compressor#1139 -# gh#django-compressor/django-compressor@bcdd21956a84 -sed -i '/jinja2.ext.with_/d' compressor/tests/test_offline.py %build %python_build