File: pytest-9.patch

package info (click to toggle)
python-django-celery-beat 2.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,176 kB
  • sloc: python: 3,437; makefile: 319; sh: 22
file content (57 lines) | stat: -rw-r--r-- 2,187 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From: Colin Watson <cjwatson@debian.org>
Date: Thu, 1 Jan 2026 16:30:50 +0000
Subject: Allow pytest 9

https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
notes that applying a mark to a fixture function never had any effect.
It raises an exception during test collection with pytest 9.

Forwarded: https://github.com/celery/django-celery-beat/pull/986
Bug-Debian: https://bugs.debian.org/1122936
Last-Update: 2026-01-01
---
 requirements/test.txt     | 2 +-
 t/unit/test_schedulers.py | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/requirements/test.txt b/requirements/test.txt
index bd79867..8c3fd3f 100644
--- a/requirements/test.txt
+++ b/requirements/test.txt
@@ -4,7 +4,7 @@ pytest-timeout
 
 # Conditional dependencies
 pytest>=6.2.5,<8.0; python_version < '3.9'  # Python 3.8 only
-pytest>=6.2.5,<9.0; python_version >= '3.9'  # Python 3.9+ only
+pytest>=6.2.5,<10.0; python_version >= '3.9'  # Python 3.9+ only
 pytest-django>=4.5.2,<4.6.0; python_version < '3.9'  # Python 3.8 only
 pytest-django>=4.5.2,<5.0; python_version >= '3.9'    # Python 3.9+ only
 backports.zoneinfo; python_version < '3.9'  # Python 3.8 only
diff --git a/t/unit/test_schedulers.py b/t/unit/test_schedulers.py
index 6ccc88b..e51f7cf 100644
--- a/t/unit/test_schedulers.py
+++ b/t/unit/test_schedulers.py
@@ -396,7 +396,6 @@ class test_ModelEntry(SchedulerCase):
 class test_DatabaseSchedulerFromAppConf(SchedulerCase):
     Scheduler = TrackingScheduler
 
-    @pytest.mark.django_db
     @pytest.fixture(autouse=True)
     def setup_scheduler(self, app):
         self.app = app
@@ -452,7 +451,6 @@ class test_DatabaseSchedulerFromAppConf(SchedulerCase):
 class test_DatabaseScheduler(SchedulerCase):
     Scheduler = TrackingScheduler
 
-    @pytest.mark.django_db
     @pytest.fixture(autouse=True)
     def setup_scheduler(self, app):
         self.app = app
@@ -1391,7 +1389,6 @@ class test_model_PeriodicTasks(SchedulerCase):
 
 @pytest.mark.django_db
 class test_modeladmin_PeriodicTaskAdmin(SchedulerCase):
-    @pytest.mark.django_db
     @pytest.fixture(autouse=True)
     def setup_scheduler(self, app):
         self.app = app