Skip to content

Commit 53a66f5

Browse files
committed
fix #138
1 parent e380820 commit 53a66f5

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

django_typer/__init__.py

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

50-
VERSION = (2, 3, 0)
50+
VERSION = (2, 4, 0)
5151

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

doc/source/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Change Log
33
==========
44

5+
v2.4.0 (2024-11-07)
6+
===================
7+
8+
* Implemented `Support Typer 0.13 <https://github.com/django-commons/django-typer/issues/138>`_
9+
510
v2.3.0 (2024-10-13)
611
===================
712

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "django-typer"
7-
version = "2.3.0"
7+
version = "2.4.0"
88
description = "Use Typer to define the CLI for your Django management commands."
99
authors = [
1010
"Brian Kohan <bckohan@gmail.com>",
@@ -63,7 +63,7 @@ click = "^8.1.0"
6363
# typer's release history is full of breaking changes for minor versions
6464
# given the reliance on some of its private internals we peg the typer
6565
# version very strictly to bug fix releases for specific minor lines.
66-
typer-slim = ">=0.12.5,<0.13.0"
66+
typer-slim = ">=0.13.0,<0.14.0"
6767

6868
# this should track typer's rich dependency, so long as our console
6969
# patches still work - so be sure to test on the low end of the range

tests/test_parser_completers.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ def test_ip_field(self):
251251
result = StringIO()
252252
with contextlib.redirect_stdout(result):
253253
call_command("shellcompletion", "complete", "model_fields test --ip ")
254-
result = result.getvalue()
254+
result = result.getvalue().replace("\\", "")
255255
for ip in self.field_values["ip_field"]:
256256
self.assertTrue(ip in result)
257257

258258
result = StringIO()
259259
with contextlib.redirect_stdout(result):
260260
call_command("shellcompletion", "complete", "model_fields test --ip 2001:")
261-
result = result.getvalue()
261+
result = result.getvalue().replace("\\", "")
262262
for ip in ["2001::1"]:
263263
self.assertTrue(ip in result)
264264

@@ -274,7 +274,7 @@ def test_ip_field(self):
274274
call_command(
275275
"shellcompletion", "complete", "model_fields test --ip 2a02:42"
276276
)
277-
result = result.getvalue()
277+
result = result.getvalue().replace("\\", "")
278278
for ip in ["2a02:42fe::4", "2a02:42ae::4"]:
279279
self.assertTrue(ip in result)
280280

@@ -283,28 +283,28 @@ def test_ip_field(self):
283283
call_command(
284284
"shellcompletion", "complete", "model_fields test --ip 2a02:42f"
285285
)
286-
result = result.getvalue()
286+
result = result.getvalue().replace("\\", "")
287287
for ip in ["2a02:42fe::4"]:
288288
self.assertTrue(ip in result)
289289

290290
result = StringIO()
291291
with contextlib.redirect_stdout(result):
292292
call_command("shellcompletion", "complete", "model_fields test --ip 192.")
293-
result = result.getvalue()
293+
result = result.getvalue().replace("\\", "")
294294
for ip in ["192.168.1.1", "192.0.2.30"]:
295295
self.assertTrue(ip in result)
296296

297297
result = StringIO()
298298
with contextlib.redirect_stdout(result):
299299
call_command("shellcompletion", "complete", "model_fields test --ip 192.1")
300-
result = result.getvalue()
300+
result = result.getvalue().replace("\\", "")
301301
for ip in ["192.168.1.1"]:
302302
self.assertTrue(ip in result)
303303

304304
result = StringIO()
305305
with contextlib.redirect_stdout(result):
306306
call_command("shellcompletion", "complete", "model_fields test --ip :")
307-
result = result.getvalue()
307+
result = result.getvalue().replace("\\", "")
308308
for ip in ["::ffff:10.10.10.10"]:
309309
self.assertTrue(ip in result)
310310

0 commit comments

Comments
 (0)