Skip to content

Commit b7d2d67

Browse files
authored
Merge pull request #110 from bckohan/v2.x.x
V2.2.2
2 parents b572435 + 66181c0 commit b7d2d67

File tree

6 files changed

+49
-32
lines changed

6 files changed

+49
-32
lines changed

.github/workflows/test.yml

+14-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
21+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-rc.1']
2222
django-version:
2323
- '3.2' # LTS April 2024
2424
- '4.2' # LTS April 2026
@@ -37,6 +37,12 @@ jobs:
3737
django-version: '5.1'
3838
- python-version: '3.9'
3939
django-version: '5.1'
40+
- python-version: '3.13.0-rc.1'
41+
django-version: '3.2'
42+
- python-version: '3.13.0-rc.1'
43+
django-version: '4.2'
44+
- python-version: '3.13.0-rc.1'
45+
django-version: '5.0'
4046

4147
steps:
4248
- uses: actions/checkout@v4
@@ -50,6 +56,9 @@ jobs:
5056
with:
5157
virtualenvs-create: true
5258
virtualenvs-in-project: true
59+
- name: Install libopenblas-dev
60+
if: matrix.python-version == '3.13.0-rc.1'
61+
run: sudo apt-get install libopenblas-dev
5362
- name: Install Release Dependencies
5463
run: |
5564
poetry config virtualenvs.in-project true
@@ -89,10 +98,10 @@ jobs:
8998
python-version: ['3.8', '3.12']
9099
django-version:
91100
- '3.2' # LTS April 2024
92-
- '5.0' # April 2025
101+
- '5.1' # December 2025
93102
exclude:
94103
- python-version: '3.8'
95-
django-version: '5.0'
104+
django-version: '5.1'
96105
- python-version: '3.12'
97106
django-version: '3.2'
98107

@@ -146,10 +155,10 @@ jobs:
146155
python-version: ['3.8', '3.12']
147156
django-version:
148157
- '3.2' # LTS April 2024
149-
- '5.0' # April 2025
158+
- '5.1' # December 2025
150159
exclude:
151160
- python-version: '3.8'
152-
django-version: '5.0'
161+
django-version: '5.1'
153162
- python-version: '3.12'
154163
django-version: '3.2'
155164

django_typer/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
model_parser_completer, # noqa: F401
4848
)
4949

50-
VERSION = (2, 2, 1)
50+
VERSION = (2, 2, 2)
5151

5252
__title__ = "Django Typer"
5353
__version__ = ".".join(str(i) for i in VERSION)

django_typer/management/__init__.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
patch.apply()
2525

2626
import typer # noqa: E402
27-
from typer.core import MarkupMode # noqa: E402
27+
import typer.core # noqa: E402
2828
from typer.core import TyperCommand as CoreTyperCommand # noqa: E402
2929
from typer.core import TyperGroup as CoreTyperGroup # noqa: E402
3030
from typer.main import get_command as get_typer_command # noqa: E402
@@ -61,6 +61,9 @@
6161
from typing import ParamSpec
6262

6363

64+
DEFAULT_MARKUP_MODE = getattr(typer.core, "DEFAULT_MARKUP_MODE", None)
65+
66+
6467
__all__ = [
6568
"TyperCommand",
6669
"CommandNode",
@@ -895,7 +898,7 @@ def __init__(
895898
deprecated: bool = Default(False),
896899
add_completion: bool = True,
897900
# Rich settings
898-
rich_markup_mode: MarkupMode = None,
901+
rich_markup_mode: typer.core.MarkupMode = Default(DEFAULT_MARKUP_MODE),
899902
rich_help_panel: t.Union[str, None] = Default(None),
900903
pretty_exceptions_enable: bool = True,
901904
pretty_exceptions_show_locals: bool = True,
@@ -1875,7 +1878,7 @@ def __new__(
18751878
add_help_option: bool = Default(True),
18761879
hidden: bool = Default(False),
18771880
deprecated: bool = Default(False),
1878-
rich_markup_mode: MarkupMode = None,
1881+
rich_markup_mode: typer.core.MarkupMode = Default(DEFAULT_MARKUP_MODE),
18791882
rich_help_panel: t.Union[str, None] = Default(None),
18801883
pretty_exceptions_enable: t.Union[DefaultPlaceholder, bool] = Default(True),
18811884
pretty_exceptions_show_locals: t.Union[DefaultPlaceholder, bool] = Default(

doc/source/changelog.rst

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Change Log
33
==========
44

5+
v2.2.2 (25-AUG-2024)
6+
====================
7+
8+
* Implemented `Support python 3.13 <https://github.com/bckohan/django-typer/issues/109>`_
9+
* Fixed `typer > 0.12.5 toggles rich help renderings off by default <https://github.com/bckohan/django-typer/issues/108>`_
10+
511
v2.2.1 (17-AUG-2024)
612
====================
713

pyproject.toml

+20-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-typer"
3-
version = "2.2.1"
3+
version = "2.2.2"
44
description = "Use Typer to define the CLI for your Django management commands."
55
authors = ["Brian Kohan <[email protected]>"]
66
license = "MIT"
@@ -29,6 +29,7 @@ classifiers = [
2929
"Programming Language :: Python :: 3.10",
3030
"Programming Language :: Python :: 3.11",
3131
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
3233
"Topic :: Internet :: WWW/HTTP",
3334
"Topic :: Internet :: WWW/HTTP :: Site Management",
3435
"Topic :: Software Development :: Libraries",
@@ -48,7 +49,7 @@ click = "^8.1.0"
4849
# typer's release history is full of breaking changes for minor versions
4950
# given the reliance on some of its private internals we peg the typer
5051
# version very strictly to bug fix releases for specific minor lines.
51-
typer-slim = ">=0.12.4,<0.13.0"
52+
typer-slim = ">=0.12.5,<0.13.0"
5253

5354
# this should track typer's rich dependency, so long as our console
5455
# patches still work - so be sure to test on the low end of the range
@@ -61,21 +62,17 @@ typing-extensions = { version = ">=3.7.4.3", markers = "python_version < '3.10'"
6162

6263

6364
[tool.poetry.group.dev.dependencies]
64-
ipdb = "^0.13.13"
65-
pytest-django = "^4.7.0"
66-
pytest-cov = "^4.1.0"
67-
Sphinx = [
68-
{ version = "^7.2.0", markers = "python_version > '3.8'" },
69-
{ version = "^7.0.0", markers = "python_version <= '3.8'" },
70-
]
71-
sphinx-rtd-theme = "^2.0.0"
72-
mypy = "^1.0"
73-
doc8 = "^1.1.1"
74-
aiohttp = "^3.9.1"
75-
readme-renderer = {extras = ["md"], version = ">=42,<44"}
76-
sphinxcontrib-typer = {extras = ["html", "pdf", "png"], version = "^0.3.0", markers="python_version >= '3.9'"}
77-
scikit-learn = "^1.0.0"
78-
pytest-env = "^1.0.0"
65+
ipdb = ">=0.13.13"
66+
pytest-django = ">=4.8.0"
67+
pytest-cov = ">=5.0.0"
68+
Sphinx = ">=7.0"
69+
mypy = ">=1.0"
70+
doc8 = ">=1.1.1"
71+
aiohttp = ">=3.9.1"
72+
readme-renderer = {extras = ["md"], version = ">=42"}
73+
sphinxcontrib-typer = {extras = ["html", "pdf", "png"], version = ">=0.5.0", markers="python_version >= '3.9'"}
74+
scikit-learn = ">=1.0.0"
75+
pytest-env = ">=1.0.0"
7976
numpy = [
8077
{ version = ">=1.26", markers = "python_version > '3.8'" },
8178
{ version = "<=1.24", markers = "python_version <= '3.8'" },
@@ -85,12 +82,12 @@ scipy = [
8582
{ version = "<=1.10", markers = "python_version <= '3.8'" },
8683
]
8784
django-stubs = ">=4.2.7"
88-
pexpect = "^4.9.0"
89-
pyright = "^1.1.357"
90-
ruff = "^0.4.1"
91-
graphviz = "^0.20.3"
92-
sphinx-tabs = "^3.4.5"
93-
furo = "^2024.7.18"
85+
pexpect = ">=4.9.0"
86+
pyright = ">=1.1.357"
87+
ruff = ">=0.4.1"
88+
graphviz = ">=0.20.3"
89+
sphinx-tabs = ">=3.4.5"
90+
furo = ">=2024.7.18"
9491

9592
[tool.poetry.extras]
9693
rich = ["rich"]

tests/test_examples.py

+2
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ def test_basic(self):
308308
observed_help = run_command(
309309
"basic", "--settings", self.settings, "--no-color", "--help"
310310
)[0].strip()
311+
# import ipdb
312+
# ipdb.set_trace()
311313
self.assertGreater(
312314
similarity(
313315
observed_help, basic_help if rich_installed else basic_help_no_rich

0 commit comments

Comments
 (0)