forked from pool/python-django-q
Compare commits
32 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 8829b4290c | |||
| 8e06d67d03 | |||
| b933399d5d | |||
| 3ecd355ba9 | |||
| e57279ab23 | |||
| 9088b8edea | |||
| 5618fc53b9 | |||
| 3d6b8f5501 | |||
| 346170bf0d | |||
| 063951f980 | |||
| b79bbd3260 | |||
|
|
7bc6819886 | ||
|
|
23da99bdcf | ||
| 04a79a0271 | |||
| cafde25827 | |||
| 5e804e5aac | |||
|
|
092c088f6b | ||
| 7ebe746331 | |||
|
|
5c15d2f06e | ||
| 56a4a0ae4d | |||
| e564c9a9bc | |||
| 79620b0c95 | |||
| 8061610700 | |||
|
|
88aa6338d7 | ||
| bcde2f42ca | |||
| 382bfd1f36 | |||
| d14409c633 | |||
|
|
108648d98f | ||
| 99e4fa22da | |||
|
|
3e403abe1c | ||
| b924eb0f94 | |||
|
|
cced3ade0b |
71
django5.patch
Normal file
71
django5.patch
Normal file
@@ -0,0 +1,71 @@
|
||||
From 1d2a6059db4cd44f14f9f3008098ca04a1a2bc96 Mon Sep 17 00:00:00 2001
|
||||
From: Stan Triepels <1939656+GDay@users.noreply.github.com>
|
||||
Date: Thu, 12 Oct 2023 22:44:19 +0200
|
||||
Subject: [PATCH] Add support for Django 5 (#120)
|
||||
|
||||
---
|
||||
.github/workflows/test.yml | 27 +-
|
||||
README.rst | 4 +-
|
||||
django_q/core_signing.py | 12 +-
|
||||
django_q/utils.py | 2 +-
|
||||
docs/index.rst | 2 +-
|
||||
docs/install.rst | 10 +-
|
||||
poetry.lock | 1751 +++++++++++++++++++-----------------
|
||||
pyproject.toml | 10 +-
|
||||
8 files changed, 962 insertions(+), 856 deletions(-)
|
||||
|
||||
Index: django-q-1.3.9/django_q/core_signing.py
|
||||
===================================================================
|
||||
--- django-q-1.3.9.orig/django_q/core_signing.py
|
||||
+++ django-q-1.3.9/django_q/core_signing.py
|
||||
@@ -2,11 +2,18 @@ import datetime
|
||||
import time
|
||||
import zlib
|
||||
|
||||
+import django
|
||||
from django.core.signing import BadSignature, JSONSerializer, SignatureExpired
|
||||
from django.core.signing import Signer as Sgnr
|
||||
from django.core.signing import TimestampSigner as TsS
|
||||
from django.core.signing import b64_decode, dumps
|
||||
-from django.utils import baseconv
|
||||
+
|
||||
+if django.VERSION < (5, 0):
|
||||
+ from django.utils.baseconv import base62
|
||||
+ b62_decode = base62.decode
|
||||
+else:
|
||||
+ from django.core.signing import b62_decode
|
||||
+
|
||||
from django.utils.crypto import constant_time_compare
|
||||
from django.utils.encoding import force_bytes, force_str
|
||||
|
||||
@@ -32,7 +39,7 @@ def loads(
|
||||
"""
|
||||
# TimestampSigner.unsign() returns str but base64 and zlib compression
|
||||
# operate on bytes.
|
||||
- base64d = force_bytes(TimestampSigner(key, salt=salt).unsign(s, max_age=max_age))
|
||||
+ base64d = force_bytes(TimestampSigner(key=key, salt=salt).unsign(s, max_age=max_age))
|
||||
decompress = False
|
||||
if base64d[:1] == b".":
|
||||
# It's compressed; uncompress it first
|
||||
@@ -69,7 +76,7 @@ class TimestampSigner(Signer, TsS):
|
||||
"""
|
||||
result = super(TimestampSigner, self).unsign(value)
|
||||
value, timestamp = result.rsplit(self.sep, 1)
|
||||
- timestamp = baseconv.base62.decode(timestamp)
|
||||
+ timestamp = b62_decode(timestamp)
|
||||
if max_age is not None:
|
||||
if isinstance(max_age, datetime.timedelta):
|
||||
max_age = max_age.total_seconds()
|
||||
Index: django-q-1.3.9/django_q/models.py
|
||||
===================================================================
|
||||
--- django-q-1.3.9.orig/django_q/models.py
|
||||
+++ django-q-1.3.9/django_q/models.py
|
||||
@@ -213,7 +213,7 @@ class Schedule(models.Model):
|
||||
url = reverse("admin:django_q_success_change", args=(task.id,))
|
||||
else:
|
||||
url = reverse("admin:django_q_failure_change", args=(task.id,))
|
||||
- return format_html(f'<a href="{url}">[{task.name}]</a>')
|
||||
+ return format_html('<a href="{}">[{}]</a>', url, task.name)
|
||||
return None
|
||||
|
||||
def __str__(self):
|
||||
@@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 17 13:12:39 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add upstream patch django5.patch to fix Django 5 support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 3 06:48:29 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Switch to pyproject macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 20:11:19 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- Increase timeout not to kill the redis server in the middle of the
|
||||
testsuite run
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 18 07:52:24 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-django-q
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 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
|
||||
@@ -25,21 +25,28 @@ License: MIT
|
||||
URL: https://django-q.readthedocs.org
|
||||
Source: https://files.pythonhosted.org/packages/source/d/django-q/django-q-%{version}.tar.gz
|
||||
# pkg_resources is broken since the flufl.lock update in Factory
|
||||
Patch: gh-pr-737_importlib.patch
|
||||
Patch0: gh-pr-737_importlib.patch
|
||||
# PATCH-FIX-UPSTREAM combined bits of:
|
||||
# https://github.com/django-q2/django-q2/commit/1f31725f43e3b6f0f793ed00f482d994ae50a503 Added Django 4.2 to the test matrix, fixed deprecation warning
|
||||
# https://github.com/django-q2/django-q2/commit/1d2a6059db4cd44f14f9f3008098ca04a1a2bc96 Add support for Django 5
|
||||
# https://github.com/django-q2/django-q2/commit/0090a6f4111c95aa4d405a10fcc06cc14c907a4d Update tested versions, add python 3.13 support and django 5.2 support. Drop python 3.8 support
|
||||
Patch1: django5.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Django >= 2.2
|
||||
Requires: python-arrow
|
||||
Requires: python-blessed
|
||||
Requires: python-django-picklefield
|
||||
Requires: python-redis
|
||||
Requires: (python-Django >= 2.2 with python-Django < 5)
|
||||
Suggests: python-croniter
|
||||
Suggests: python-django-q-rollbar >= 0.1
|
||||
Suggests: python-django-q-sentry >= 0.1
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module Django >= 2.2 with %python-Django < 5}
|
||||
BuildRequires: %{python_module Django >= 2.2}
|
||||
BuildRequires: %{python_module arrow}
|
||||
BuildRequires: %{python_module blessed}
|
||||
BuildRequires: %{python_module croniter}
|
||||
@@ -61,7 +68,7 @@ This package provides a multiprocessing distributed task queue for Django.
|
||||
%prep
|
||||
%setup -n django-q-%{version}
|
||||
# wrong line endings prevent patching
|
||||
dos2unix django_q/conf.py
|
||||
dos2unix django_q/*.py
|
||||
%autopatch -p1
|
||||
|
||||
# Fix permissions
|
||||
@@ -76,10 +83,10 @@ dos2unix README.rst
|
||||
sed -i '/HiredisParser/d' django_q/tests/settings.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand rm -r %{buildroot}%{$python_sitelib}/django_q/tests/
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
@@ -92,7 +99,7 @@ export DJANGO_SETTINGS_MODULE=tests.settings
|
||||
|
||||
export PYTHONPATH=${PWD}
|
||||
|
||||
timeout 5m %{_sbindir}/redis-server &
|
||||
timeout 20m %{_sbindir}/redis-server &
|
||||
# Mongo & Disque servers not installed
|
||||
# test_max_rss assertions fail
|
||||
%pytest -k 'not (mongo or disque or test_max_rss)'
|
||||
|
||||
Reference in New Issue
Block a user