Skip to content

Commit a76eb7a

Browse files
authored
Merge pull request #216 from django-commons/click82
Click82
2 parents 3fb86c3 + fe0ac95 commit a76eb7a

File tree

7 files changed

+78
-43
lines changed

7 files changed

+78
-43
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
actions: write
3434
strategy:
3535
matrix:
36-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
36+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14.0-beta.2']
3737
django-version:
3838
- '3.2' # LTS April 2024
3939
- '4.2' # LTS April 2026
@@ -57,6 +57,14 @@ jobs:
5757
django-version: '5.0'
5858
- python-version: '3.9'
5959
django-version: '5.2'
60+
- python-version: '3.14.0-beta.2'
61+
django-version: '3.2'
62+
- python-version: '3.14.0-beta.2'
63+
django-version: '4.2'
64+
- python-version: '3.14.0-beta.2'
65+
django-version: '5.0'
66+
- python-version: '3.14.0-beta.2'
67+
django-version: '5.1'
6068
env:
6169
COVERAGE_FILE: py${{ matrix.python-version }}-linux-dj${{ matrix.django-version }}.coverage
6270
TEST_PYTHON_VERSION: ${{ matrix.python-version }}

doc/source/changelog.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
Change Log
55
==========
66

7+
v3.2.0 (2025-04-30)
8+
===================
9+
10+
* Implemented `Support click 8.2 <https://github.com/django-commons/django-typer/issues/215>`_
711

8-
v3.1.1 (2024-04-30)
12+
v3.1.1 (2025-04-30)
913
===================
1014

1115
* Implemented `Support rich 14 <https://github.com/django-commons/django-typer/issues/213>`_
1216

13-
v3.1.0 (2024-04-02)
17+
v3.1.0 (2025-04-02)
1418
===================
1519

1620
* Fixed `Fish shell completion fails for any script named something other than "manage" <https://github.com/django-commons/django-typer/issues/207>`_
@@ -29,7 +33,7 @@ v3.1.0 (2024-04-02)
2933
* Implemented `Require tests to pass before release action runs. <https://github.com/django-commons/django-typer/issues/173>`_
3034

3135

32-
v3.0.0 (2024-02-16)
36+
v3.0.0 (2025-02-16)
3337
===================
3438

3539
* Implemented `Completer for media files. <https://github.com/django-commons/django-typer/issues/175>`_

pyproject.toml

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

55
[project]
66
name = "django-typer"
7-
version = "3.1.1"
7+
version = "3.2.0"
88
requires-python = ">=3.9,<4.0"
99
description = "Use Typer to define the CLI for your Django management commands."
1010
authors = [
@@ -18,11 +18,11 @@ homepage = "https://django-typer.readthedocs.io"
1818
keywords = ["django", "CLI", "management", "Typer", "commands"]
1919
dependencies = [
2020
"Django>=3.2,<6.0",
21-
"click>=8.1.8,<8.2",
21+
"click>=8.1.8,<8.3",
2222
# typer's release history is full of breaking changes for minor versions
2323
# given the reliance on some of its private internals we peg the typer
2424
# version very strictly to bug fix releases for specific minor lines.
25-
"typer-slim>=0.14.0,<0.16.0",
25+
"typer-slim>=0.14.0,<0.17.0",
2626
"shellingham>=1.5.4,<2.0",
2727
# we need this on 3.9 for ParamSpec
2828
"typing-extensions>=3.7.4.3; python_version < '3.10'",
@@ -49,6 +49,7 @@ classifiers = [
4949
"Programming Language :: Python :: 3.11",
5050
"Programming Language :: Python :: 3.12",
5151
"Programming Language :: Python :: 3.13",
52+
"Programming Language :: Python :: 3.14",
5253
"Topic :: Internet :: WWW/HTTP",
5354
"Topic :: Internet :: WWW/HTTP :: Site Management",
5455
"Topic :: Software Development :: Libraries",

src/django_typer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
and keep a tight version lock on Typer.
3434
"""
3535

36-
VERSION = (3, 1, 1)
36+
VERSION = (3, 2, 0)
3737

3838
__title__ = "Django Typer"
3939
__version__ = ".".join(str(i) for i in VERSION)

src/django_typer/management/commands/shellcompletion.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131

3232
from click import get_current_context
3333
from click.core import ParameterSource
34-
from click.parser import split_arg_string
35-
from click.shell_completion import CompletionItem
34+
from click.shell_completion import (
35+
CompletionItem,
36+
split_arg_string, # pyright: ignore[reportPrivateImportUsage]
37+
)
3638
from django.core.management import CommandError, ManagementUtility
3739
from django.utils.module_loading import import_string
3840
from django.utils.translation import gettext_lazy as _

tests/verify_environment.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import sys
3-
import django
3+
from django import VERSION
4+
from packaging.version import parse as parse_version
45

56

67
def test():
@@ -10,17 +11,14 @@ def test():
1011
expected_python = os.environ["TEST_PYTHON_VERSION"]
1112
expected_django = os.environ["TEST_DJANGO_VERSION"]
1213

13-
expected_python = tuple(int(v) for v in expected_python.split(".") if v)
14-
assert sys.version_info[: len(expected_python)] == expected_python, (
15-
f"Python Version Mismatch: {sys.version_info[: len(expected_python)]} != "
16-
f"{expected_python}"
14+
expected_python = parse_version(expected_python)
15+
assert sys.version_info[:2] == (expected_python.major, expected_python.minor), (
16+
f"Python Version Mismatch: {sys.version_info[:2]} != {expected_python}"
1717
)
1818

19-
try:
20-
expected_django = tuple(int(v) for v in expected_django.split(".") if v)
21-
assert django.VERSION[: len(expected_django)] == expected_django, (
22-
f"Django Version Mismatch: {django.VERSION[: len(expected_django)]} != "
23-
f"{expected_django}"
24-
)
25-
except ValueError:
26-
assert expected_django == django.__version__
19+
dj_actual = VERSION[:2]
20+
expected_django = parse_version(expected_django)
21+
dj_expected = (expected_django.major, expected_django.minor)
22+
assert dj_actual == dj_expected, (
23+
f"Django Version Mismatch: {dj_actual} != {expected_django}"
24+
)

uv.lock

Lines changed: 42 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)