Skip to content

Commit 761559c

Browse files
add support for Django 6.0 (#35)
1 parent 1431519 commit 761559c

File tree

4 files changed

+39
-9
lines changed

4 files changed

+39
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ The GitHub releases were previously using calendar versioning (e.g., v2025.8.1)
3636
### Added
3737

3838
- Added support for Python 3.14
39+
- Added support for Django 6.0
3940

4041
### Changed
4142

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ import cog
66
77
from noxfile import DJ_VERSIONS
88
from noxfile import PY_VERSIONS
9+
from noxfile import display_version
10+
11+
django_versions = [display_version(version) for version in DJ_VERSIONS]
912
1013
cog.outl("[![PyPI - mcp-django](https://img.shields.io/pypi/v/mcp-django?label=mcp-django)](https://pypi.org/project/mcp-django/)")
1114
cog.outl("![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mcp-django)")
12-
cog.outl(f"![Django Version](https://img.shields.io/badge/django-{'%20%7C%20'.join(DJ_VERSIONS)}-%2344B78B?labelColor=%23092E20)")
15+
cog.outl(f"![Django Version](https://img.shields.io/badge/django-{'%20%7C%20'.join(django_versions)}-%2344B78B?labelColor=%23092E20)")
1316
]]] -->
1417
[![PyPI - mcp-django](https://img.shields.io/pypi/v/mcp-django?label=mcp-django)](https://pypi.org/project/mcp-django/)
1518
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mcp-django)
16-
![Django Version](https://img.shields.io/badge/django-4.2%20%7C%205.1%20%7C%205.2%20%7C%20main-%2344B78B?labelColor=%23092E20)
19+
![Django Version](https://img.shields.io/badge/django-4.2%20%7C%205.1%20%7C%205.2%20%7C%206.0%20%7C%20main-%2344B78B?labelColor=%23092E20)
1720
<!-- [[[end]]] -->
1821

1922
A Model Context Protocol (MCP) server providing Django project exploration resources and optional stateful shell access for LLM assistants to interact with Django projects.
@@ -26,12 +29,17 @@ import cog
2629
2730
from noxfile import DJ_VERSIONS
2831
from noxfile import PY_VERSIONS
32+
from noxfile import display_version
33+
34+
django_versions = [
35+
display_version(version) for version in DJ_VERSIONS if version != "main"
36+
]
2937
30-
cog.outl(f"- Python {', '.join([version for version in PY_VERSIONS])}")
31-
cog.outl(f"- Django {', '.join([version for version in DJ_VERSIONS if version != 'main'])}")
38+
cog.outl(f"- Python {', '.join(PY_VERSIONS)}")
39+
cog.outl(f"- Django {', '.join(django_versions)}")
3240
]]] -->
3341
- Python 3.10, 3.11, 3.12, 3.13, 3.14
34-
- Django 4.2, 5.1, 5.2
42+
- Django 4.2, 5.1, 5.2, 6.0
3543
<!-- [[[end]]] -->
3644

3745
## Installation

noxfile.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import json
44
import os
5+
import re
56
from pathlib import Path
67

78
import nox
@@ -21,9 +22,10 @@
2122
DJ42 = "4.2"
2223
DJ51 = "5.1"
2324
DJ52 = "5.2"
25+
DJ60 = "6.0a1"
2426
DJMAIN = "main"
2527
DJMAIN_MIN_PY = PY312
26-
DJ_VERSIONS = [DJ42, DJ51, DJ52, DJMAIN]
28+
DJ_VERSIONS = [DJ42, DJ51, DJ52, DJ60, DJMAIN]
2729
DJ_LTS = [
2830
version for version in DJ_VERSIONS if version.endswith(".2") and version != DJMAIN
2931
]
@@ -36,15 +38,24 @@ def version(ver: str) -> tuple[int, ...]:
3638
return tuple(map(int, ver.split(".")))
3739

3840

41+
def display_version(raw: str) -> str:
42+
match = re.match(r"\d+(?:\.\d+)?", raw)
43+
return match.group(0) if match else raw
44+
45+
3946
def should_skip(python: str, django: str) -> bool:
4047
"""Return True if the test should be skipped"""
4148

4249
if django == DJMAIN and version(python) < version(DJMAIN_MIN_PY):
4350
# Django main requires Python 3.10+
4451
return True
4552

53+
if django == DJ60 and version(python) < version(PY312):
54+
# Django 6.0 requires Python 3.12+
55+
return True
56+
4657
if django == DJ52 and version(python) < version(PY310):
47-
# Django 5.2a1 requires Python 3.10+
58+
# Django 5.2 requires Python 3.10+
4859
return True
4960

5061
if django == DJ51 and version(python) < version(PY310):

pyproject.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@ classifiers = [
3333
# import cog
3434
#
3535
# from noxfile import DJ_VERSIONS
36+
# from noxfile import display_version
3637
#
3738
# for version in DJ_VERSIONS:
3839
# if version == "main":
3940
# continue
40-
# cog.outl(f' "Framework :: Django :: {version}",')
41+
# cog.outl(f' "Framework :: Django :: {display_version(version)}",')
4142
# ]]] -->
4243
"Framework :: Django :: 4.2",
4344
"Framework :: Django :: 5.1",
4445
"Framework :: Django :: 5.2",
46+
"Framework :: Django :: 6.0",
4547
# [[[end]]]
4648
"License :: OSI Approved :: MIT License",
4749
"Operating System :: OS Independent",
@@ -74,8 +76,16 @@ description = "A Model Context Protocol (MCP) server for Django integration with
7476
license = { file = "LICENSE" }
7577
name = "mcp-django"
7678
readme = "README.md"
77-
version = "0.1.0"
79+
# [[[cog
80+
# import cog
81+
#
82+
# from noxfile import PY_DEFAULT
83+
#
84+
# cog.outl(f'requires-python = ">={PY_DEFAULT}"')
85+
# ]]] -->
7886
requires-python = ">=3.10"
87+
# [[[end]]]
88+
version = "0.1.0"
7989

8090
[project.urls]
8191
Documentation = "https://github.com/joshuadavidthomas/mcp-django#README"

0 commit comments

Comments
 (0)