Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.13 and Django 5.1 to test matrix, drop unsupported versions #67

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,16 @@ 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"
- python: "3.9"
django: "5.0"
- python: "3.9"
django: "5.1"
- python: "3.13"
django: "4.2"
- python: "3.13"
django: "5.0"
database_url:
- postgres://runner:password@localhost/project
Expand All @@ -45,19 +41,19 @@ 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
run: sudo apt-get install python3-dev
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python }}.*
- name: Upgraded pip
run: pip install --upgrade pip
- name: Install dependencies
run: pip install -r test-requirements.txt
- name: Install Django
run: pip install -U django==${{ matrix.django }}
run: pip install -U django~=${{ matrix.django }}.0
- name: Run tests
run: python manage.py test
- name: Run black
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
17 changes: 5 additions & 12 deletions django_dbq/tests.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from datetime import datetime, timedelta
import mock
from datetime import datetime, timedelta, timezone as datetime_timezone
from unittest 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
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
author_email = "[email protected]"
license = "BSD"
install_requires = [
"Django>=3.1",
"Django>=4.2",
]

long_description = """Simple database-backed job queue system"""
Expand Down Expand Up @@ -82,5 +82,5 @@ def get_package_data(package):
package_data=get_package_data(package),
install_requires=install_requires,
classifiers=[],
python_requires=">=3.6"
python_requires=">=3.9"
)
11 changes: 5 additions & 6 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
mysqlclient==1.4.6
freezegun==0.3.12
mock==3.0.5
dj-database-url==0.5.0
psycopg2==2.9.5
black==24.3.0
mysqlclient==2.2.7
freezegun==1.5.1
dj-database-url==2.3.0
psycopg2==2.9.10
black==24.10.0
Loading