Skip to content

Commit

Permalink
Upgrade version to 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
llybin committed May 11, 2024
1 parent 683bdad commit fca6b0c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,32 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
django-version: [ "3.2", "4.0", "4.1", "4.2" ]
drf-version: [ "3.11", "3.12", "3.13", "3.14" ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
django-version: [ "3.2", "4.0", "4.1", "4.2", "5.0"]
drf-version: [ "3.11", "3.12", "3.13", "3.14", "3.15" ]
exclude:
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
- django-version: "4.0"
python-version: "3.7"
- django-version: "4.1"
python-version: "3.7"
- django-version: "4.2"
python-version: "3.7"
python-version: "3.8"
- django-version: "4.2"
python-version: "3.9"
# https://www.django-rest-framework.org/community/release-notes/
- django-version: "4.2"
drf-version: "3.11"
- django-version: "4.2"
drf-version: "3.12"
- django-version: "4.2"
drf-version: "3.13"
- django-version: "5.0"
drf-version: "3.11"
- django-version: "5.0"
drf-version: "3.12"
- django-version: "5.0"
drf-version: "3.13"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

## Requirements

* Python: 3.7, 3.8, 3.9, 3.10, 3.11
* Django: 3.2, 4.0, 4.1, 4.2
* DRF: 3.11, 3.12, 3.13, 3.14
* Python: 3.8, 3.9, 3.10, 3.11, 3.12
* Django: 3.2, 4.0, 4.1, 4.2, 5.0
* DRF: 3.11, 3.12, 3.13, 3.14, 3.15

## Installation

Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def read(f):

setup(
name="drf-recaptcha",
version="3.0.0",
version="3.1.0",
description="Django rest framework recaptcha field serializer.",
long_description=read("README.md"),
long_description_content_type="text/markdown",
Expand All @@ -22,8 +22,8 @@ def read(f):
"django-ipware>=2.1",
],
setup_requires=["pytest-runner"],
tests_require=["pytest", "pytest-django", "pytest-cov", "pytest-mock"],
python_requires=">=3.7",
tests_require=["pytest", "pytest-django", "pytest-cov", "pytest-mock", "pytz"],
python_requires=">=3.8",
include_package_data=True,
zip_safe=False,
keywords=[
Expand All @@ -45,6 +45,7 @@ def read(f):
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Expand All @@ -59,5 +60,6 @@ def read(f):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
)
2 changes: 2 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": "test.sqlite3"}
}

USE_TZ = False

DRF_RECAPTCHA_SECRET_KEY = "TEST_DRF_RECAPTCHA_SECRET_KEY"
10 changes: 3 additions & 7 deletions tests/test_checks.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import pytest
from django.core.exceptions import ImproperlyConfigured

from drf_recaptcha.checks import recaptcha_system_check
from drf_recaptcha.constants import TEST_V2_SECRET_KEY


def test_warning_no_secret_key(settings):
settings.DRF_RECAPTCHA_SECRET_KEY = None

with pytest.raises(ImproperlyConfigured) as exc_info:
recaptcha_system_check(None)

assert str(exc_info.value) == "settings.DRF_RECAPTCHA_SECRET_KEY must be set."
errors = recaptcha_system_check(None)
assert len(errors) == 1
assert errors[0].msg == "settings.DRF_RECAPTCHA_SECRET_KEY must be set."


def test_silent_testing(settings):
Expand Down

0 comments on commit fca6b0c

Please sign in to comment.