Skip to content

Commit ff4f16f

Browse files
committed
Prep a Django 5.2 release.
1 parent 28b63f4 commit ff4f16f

File tree

8 files changed

+32
-20
lines changed

8 files changed

+32
-20
lines changed

docs/changelog.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ The API stability/deprecation policy for ``pwned-passwords-django`` is as follow
6464
Releases under DjangoVer
6565
------------------------
6666

67+
Version 5.2
68+
~~~~~~~~~~~
69+
70+
Released April 2025
71+
72+
* Supported Django versions are now 4.2, 5.1, and 5.2. Support for Django 5.0 has been
73+
dropped.
74+
75+
6776
Version 5.1.3
6877
~~~~~~~~~~~~~
6978

docs/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using ``pwned-passwords-django``.
1111
What versions of Django and Python are supported?
1212
-------------------------------------------------
1313

14-
``pwned-passwords-django`` |release| supports Django 4.2, 5.0, and 5.1, and
14+
``pwned-passwords-django`` |release| supports Django 4.2, 5.1, and 5.2, and
1515
Python 3.9 through 3.13. See `Django's Python support matrix
1616
<https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django>`_
1717
for details of which Python versions are compatible with each version of

docs/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Installation guide
55
==================
66

7-
``pwned-passwords-django`` |release| supports Django 4.2, 5.0, and 5.1, and
7+
``pwned-passwords-django`` |release| supports Django 4.2, 5.1, and 5.2, and
88
Python 3.9 through 3.13. See `Django's Python support matrix
99
<https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django>`_
1010
for details of which Python versions are compatible with each version of

noxfile.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ def clean(paths: typing.Iterable[pathlib.Path] = ARTIFACT_PATHS) -> None:
6262
@nox.parametrize(
6363
"python,django",
6464
[
65-
# Python/Django testing matrix. Tests Django 4.2, 5.0, 5.1 on Python 3.9 through
66-
# 3.12, skipping unsupported combinations.
65+
# Python/Django testing matrix. Tests Django 4.2, 5.1, 5.2 on Python 3.9 through
66+
# 3.13, skipping unsupported combinations.
6767
(python, django)
6868
for python in ["3.9", "3.10", "3.11", "3.12", "3.13"]
69-
for django in ["4.2", "5.0", "5.1"]
70-
if (python, django)
71-
not in [("3.9", "5.0"), ("3.9", "5.1"), ("3.13", "4.2"), ("3.13", "5.0")]
69+
for django in ["4.2", "5.1", "5.2"]
70+
if (python, django) not in [("3.9", "5.1"), ("3.9", "5.2"), ("3.13", "4.2")]
7271
],
7372
)
7473
def tests_with_coverage(session: nox.Session, django: str) -> None:
@@ -103,7 +102,7 @@ def tests_with_coverage(session: nox.Session, django: str) -> None:
103102
"--source",
104103
PACKAGE_NAME,
105104
"runtests.py",
106-
env={"DJANGO_SETTINGS_MODULE": "tests.settings"},
105+
env={"DJANGO_SETTINGS_MODULE": "test_settings"},
107106
)
108107
clean()
109108

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ classifiers = [
1111
"Environment :: Web Environment",
1212
"Framework :: Django",
1313
"Framework :: Django :: 4.2",
14-
"Framework :: Django :: 5.0",
1514
"Framework :: Django :: 5.1",
15+
"Framework :: Django :: 5.2",
1616
"Intended Audience :: Developers",
1717
"License :: OSI Approved :: BSD License",
1818
"Operating System :: OS Independent",
@@ -28,14 +28,14 @@ classifiers = [
2828
name = "pwned-passwords-django"
2929
description = "A Pwned Passwords implementation for Django sites."
3030
dependencies = [
31-
"Django>=4.2",
31+
"Django>=4.2,!=5.0.*",
3232
"httpx",
3333
]
3434
keywords = ["django", "security", "passwords", "auth", "authentication"]
3535
license = {text = "BSD-3-Clause"}
3636
readme = "README.rst"
3737
requires-python = ">=3.9"
38-
version = "5.1.3"
38+
version = "5.2.0a1"
3939

4040
[dependency-groups]
4141
tests = ["nox"]

runtests.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55

66
# SPDX-License-Identifier: BSD-3-Clause
77

8-
from django.core.management import execute_from_command_line
9-
10-
11-
def run_tests():
12-
execute_from_command_line(
13-
["runtests.py", "test", "--verbosity", "2", "--exclude-tag", "end-to-end"]
14-
)
8+
import os
9+
import sys
1510

11+
import django
12+
from django.conf import settings
13+
from django.test.utils import get_runner
1614

1715
if __name__ == "__main__":
18-
run_tests()
16+
sys.path.append("tests")
17+
os.environ["DJANGO_SETTINGS_MODULE"] = "test_settings"
18+
django.setup()
19+
TestRunner = get_runner(settings)
20+
test_runner = TestRunner(exclude_tags=["end-to-end"])
21+
failures = test_runner.run_tests(["tests"])
22+
sys.exit(bool(failures))

tests/test_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ async def test_multiple_values_bad_password_async(self):
323323
"""
324324
_, async_mock = self.api_error_mocks()
325325
with mock.patch("pwned_passwords_django.api.check_password_async", async_mock):
326-
self.async_client.post(
326+
await self.async_client.post(
327327
reverse(self.test_breach_async, kwargs={"field": "password"}),
328328
data={
329329
"password": [
File renamed without changes.

0 commit comments

Comments
 (0)