1
0
Files
python-django-compressor/lstrip.patch
Markéta Machová 0ab37271e6 - Update to 4.5.1
* Officially support Python 3.12 (requires lxml 4.9.3 or higher)
  * Drop support for Django versions before 4.2.
  * Added support for Django 5.1
  * Added new ``COMPRESS_STORAGE_ALIAS`` and ``COMPRESS_OFFLINE_MANIFEST_STORAGE_ALIAS``
    settings. These point to keys in Django's ``storages`` handler. If set by the
    user, Compressor will use these storages, or otherwise will set a default
    storage, given by ``COMPRESS_STORAGE`` and
    ``COMPRESS_OFFLINE_MANIFEST_STORAGE`` respectively on first access.
- Drop already merged patches:
  * python-django-compressor-rcssmin-and-rjsmin-versions.patch
  * lstrip.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-django-compressor?expand=0&rev=30
2024-09-05 08:38:38 +00:00

29 lines
1002 B
Diff

From 1afd937f6a49b10013c1df71b53d054170efdce4 Mon Sep 17 00:00:00 2001
From: bcail <bcail@crossway.org>
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 %}``.