Skip to content

Commit 0de6bed

Browse files
authored
Merge branch 'master' into save_safety
2 parents b8b5628 + 6a948df commit 0de6bed

File tree

13 files changed

+151
-90
lines changed

13 files changed

+151
-90
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13+
uv-lock-check:
14+
runs-on: ubuntu-latest
15+
name: "UV Lockfile Sync Validation 🔒"
16+
permissions:
17+
contents: read
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v5
21+
with:
22+
persist-credentials: false
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
26+
27+
- name: Check uv.lock sync status
28+
run: uv lock --locked
29+
1330
ruff:
1431
runs-on: ubuntu-latest
1532
name: "ruff on code"
@@ -26,13 +43,14 @@ jobs:
2643
src: "."
2744

2845
test-regular:
29-
needs: ["ruff"]
46+
needs: ["ruff", "uv-lock-check"]
3047
runs-on: ubuntu-latest
3148
name: "Tests py${{ matrix.python-version }}/dj${{ matrix.django-version }}/${{ matrix.broker }}"
3249
strategy:
50+
fail-fast: false
3351
max-parallel: 6
3452
matrix:
35-
python-version: ["3.11", "3.12", "3.13"]
53+
python-version: ["3.11", "3.12", "3.13", "3.14"]
3654
django-version: ["5.2.5"]
3755
broker: ["redis", "fakeredis", "valkey"]
3856
include:
@@ -76,6 +94,7 @@ jobs:
7694
with:
7795
cache-dependency-path: uv.lock
7896
python-version: "${{ matrix.python-version }}"
97+
allow-prereleases: true
7998

8099
- name: Install django version
81100
shell: bash

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SCHEDULER_CONFIG = SchedulerConfiguration(
2525
SCHEDULER_INTERVAL=10,
2626
BROKER=Broker.REDIS,
2727
CALLBACK_TIMEOUT=60, # Callback timeout in seconds (success/failure/stopped)
28-
# Default values, can be overriden per task/job
28+
# Default values, can be overridden per task/job
2929
DEFAULT_SUCCESS_TTL=10 * 60, # Time To Live (TTL) in seconds to keep successful job results
3030
DEFAULT_FAILURE_TTL=365 * 24 * 60 * 60, # Time To Live (TTL) in seconds to keep job failure information
3131
DEFAULT_JOB_TTL=10 * 60, # Time To Live (TTL) in seconds to keep job information

docs/changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## v4.0.9 🌈
4+
5+
### 🐛 Bug Fixes
6+
7+
8+
### 🧰 Maintenance
9+
10+
- Support for python 3.14
11+
- Add python 3.14 to test matrix @cclauss #302
12+
- Turn off fail-fast @cclauss #303
13+
- Fix typos in docs @cclauss #304
14+
315
## v4.0.8 🌈
416

517
### 🐛 Bug Fixes

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SCHEDULER_CONFIG = SchedulerConfiguration(
1414
SCHEDULER_INTERVAL=10,
1515
BROKER=Broker.REDIS,
1616
CALLBACK_TIMEOUT=60, # Callback timeout in seconds (success/failure/stopped)
17-
# Default values, can be overriden per task/job
17+
# Default values, can be overridden per task/job
1818
DEFAULT_SUCCESS_TTL=10 * 60, # Time To Live (TTL) in seconds to keep successful job results
1919
DEFAULT_FAILURE_TTL=365 * 24 * 60 * 60, # Time To Live (TTL) in seconds to keep job failure information
2020
DEFAULT_JOB_TTL=10 * 60, # Time To Live (TTL) in seconds to keep job information

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
SCHEDULER_INTERVAL=10,
6161
BROKER=Broker.REDIS,
6262
CALLBACK_TIMEOUT=60, # Callback timeout in seconds (success/failure/stopped)
63-
# Default values, can be overriden per task/job
63+
# Default values, can be overridden per task/job
6464
DEFAULT_SUCCESS_TTL=10 * 60, # Time To Live (TTL) in seconds to keep successful job results
6565
DEFAULT_FAILURE_TTL=365 * 24 * 60 * 60, # Time To Live (TTL) in seconds to keep job failure information
6666
DEFAULT_JOB_TTL=10 * 60, # Time To Live (TTL) in seconds to keep job information

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
mkdocs==1.6.1
2-
mkdocs-material==9.6.20
2+
mkdocs-material==9.6.21

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "django-tasks-scheduler"
7-
version = "4.0.8"
7+
version = "4.0.9"
88
description = "An async job scheduler for django using redis/valkey brokers"
99
authors = [{ name = "Daniel Moran", email = "[email protected]" }]
1010
requires-python = ">=3.10"
@@ -32,6 +32,7 @@ classifiers = [
3232
"Programming Language :: Python :: 3.11",
3333
"Programming Language :: Python :: 3.12",
3434
"Programming Language :: Python :: 3.13",
35+
"Programming Language :: Python :: 3.14",
3536
"Framework :: Django",
3637
"Framework :: Django :: 5.0",
3738
"Framework :: Django :: 5.1",
@@ -41,6 +42,7 @@ dependencies = [
4142
"django>=5",
4243
"croniter>=2.0",
4344
"click~=8.2",
45+
"typing-extensions>=4.15.0",
4446
]
4547

4648
[project.optional-dependencies]

scheduler/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(
4141
:param result_ttl: Result time to live
4242
:param job_info_ttl: Time to live for job info
4343
:param at_front: Whether to enqueue the job at front of the queue
44-
:param meta: Arbitraty metadata about the job
44+
:param meta: Arbitrary metadata about the job
4545
:param description: Job description
4646
:param on_failure: Callable to run on failure
4747
:param on_success: Callable to run on success

scheduler/helpers/timeouts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __exit__(self, type, value, traceback):
4343
# situation and consider the body done.
4444
pass
4545

46-
# __exit__ may return True to supress further exception handling. We don't want to suppress any exceptions
46+
# __exit__ may return True to suppress further exception handling. We don't want to suppress any exceptions
4747
# here, since all errors should just pass through, BaseTimeoutException being handled normally to the invoking
4848
# context.
4949
return False

scheduler/settings.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
from scheduler.types import SchedulerConfiguration, QueueConfiguration
88

9+
try:
10+
from annotationlib import get_annotations
11+
except ImportError:
12+
from typing_extensions import get_annotations
13+
914
logger = logging.getLogger("scheduler")
1015

1116
_QUEUES: Dict[str, QueueConfiguration] = dict()
@@ -38,8 +43,9 @@ def conf_settings():
3843
return
3944
if not isinstance(user_settings, dict):
4045
raise ImproperlyConfigured("SCHEDULER_CONFIG should be a SchedulerConfiguration or dict")
46+
annotations = get_annotations(SCHEDULER_CONFIG)
4147
for k, v in user_settings.items():
42-
if k not in SCHEDULER_CONFIG.__annotations__:
48+
if k not in annotations:
4349
raise ImproperlyConfigured(f"Unknown setting {k} in SCHEDULER_CONFIG")
4450
setattr(SCHEDULER_CONFIG, k, v)
4551

0 commit comments

Comments
 (0)