Skip to content

Commit

Permalink
Add Python 3.13 and Django 5.1 to test matrix, drop unsupported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
j4mie committed Jan 20, 2025
1 parent 01a506c commit 6730a6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 27 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django: ["3.2", "4.0", "4.1", "4.2", "5.0"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
django: ["4.2", "5.0", "5.1"]
exclude:
- python: "3.11"
django: "3.2"
- python: "3.12"
django: "3.2"
- python: "3.11"
django: "4.0"
- python: "3.12"
django: "4.0"
- python: "3.8"
django: "5.0"
- python: "3.9"
django: "5.0"
- python: "3.9"
django: "5.1"
database_url:
- postgres://runner:password@localhost/project
- mysql://root:[email protected]/project
Expand All @@ -45,11 +37,11 @@ jobs:
steps:
- name: Start MySQL
run: sudo systemctl start mysql.service
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install system Python build deps for psycopg2
run: sudo apt-get install python3-dev python3.11-dev
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Upgraded pip
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Simple database-backed job queue. Jobs are defined in your settings, and are pro
Asynchronous tasks are run via a *job queue*. This system is designed to support multi-step job workflows.

Supported and tested against:
- Django 3.2, 4.0, 4.1, 4.2, 5.0
- Python 3.8, 3.9, 3.10, 3.11, 3.12
- Django 4.2, 5.0, 5.1
- Python 3.9, 3.10, 3.11, 3.12, 3.13

## Getting Started

Expand Down
15 changes: 4 additions & 11 deletions django_dbq/tests.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone as datetime_timezone
import mock

import freezegun
from django.core.management import call_command, CommandError
from django.core.management import call_command
from django.test import TestCase
from django.test.utils import override_settings
from django.utils import timezone
Expand All @@ -13,14 +13,6 @@
from io import StringIO


try:
utc = timezone.utc
except AttributeError:
from datetime import timezone as datetime_timezone

utc = datetime_timezone.utc


def test_task(job=None):
pass # pragma: no cover

Expand Down Expand Up @@ -253,7 +245,8 @@ def test_gets_jobs_in_priority_and_date_order(self):
def test_ignores_jobs_until_run_after_is_in_the_past(self):
job_1 = Job.objects.create(name="testjob")
job_2 = Job.objects.create(
name="testjob", run_after=datetime(2021, 11, 4, 8, tzinfo=utc)
name="testjob",
run_after=datetime(2021, 11, 4, 8, tzinfo=datetime_timezone.utc),
)

with freezegun.freeze_time(datetime(2021, 11, 4, 7)):
Expand Down

0 comments on commit 6730a6b

Please sign in to comment.