@@ -48,7 +48,6 @@ test = [
4848 " pytest==9.*" ,
4949 " pytest-cov==7.*" ,
5050 " pytest-django>=4.5.2,<5" ,
51-
5251]
5352docs = [
5453 # MkDocs to build our documentation.
@@ -57,6 +56,10 @@ docs = [
5756 # pylinkvalidator to check for broken links in documentation.
5857 " pylinkvalidator==0.3" ,
5958]
59+ django52 = [ " django>=5.2,<6.0" ]
60+ django60 = [ " django>=6.0,<6.1" ]
61+ django61 = [ " django>=6.1,<6.2" ]
62+ djangomain = [ " django @ https://github.com/django/django/archive/main.tar.gz" ]
6063optional = [
6164 # Optional packages which may be used with REST framework.
6265 " django-filter" ,
@@ -70,49 +73,39 @@ optional = [
7073 " requests" ,
7174 " uritemplate" ,
7275]
73- django52 = [ " django>=5.2,<6.0" ]
74- django60 = [ " django>=6.0,<6.1" ]
75- django61 = [ " django>=6.1,<6.2" ]
76- djangomain = [ " django @ https://github.com/django/django/archive/main.tar.gz" ]
7776
7877[tool .setuptools ]
79-
80- [tool .setuptools .dynamic ]
81- version = { attr = " rest_framework.__version__" }
82-
83- [tool .setuptools .packages .find ]
84- include = [ " rest_framework*" ]
85-
86- [tool .setuptools .package-data ]
87- "rest_framework" = [
88- " templates/**/*" ,
89- " static/**/*" ,
78+ packages.find.include = [ " rest_framework*" ]
79+ package-data.rest_framework = [
9080 " locale/**/*.mo" ,
81+ " static/**/*" ,
82+ " templates/**/*" ,
9183]
84+ dynamic.version = { attr = " rest_framework.__version__" }
9285
9386[tool .isort ]
94- skip = [ " .tox" ]
9587atomic = true
9688multi_line_output = 5
9789extra_standard_library = [ " types" ]
98- known_third_party = [ " pytest " , " _pytest " , " django " , " uritemplate" ]
90+ known_third_party = [ " _pytest " , " django " , " pytest " , " uritemplate" ]
9991known_first_party = [ " rest_framework" , " tests" ]
92+ skip = [ " .tox" ]
10093
10194[tool .flake8 ]
10295extend-ignore = [ " E501" , " W503" , " W504" , " B" ]
10396extend-select = [ " B006" ]
10497banned-modules = " json = use from rest_framework.utils import json!"
10598
10699[tool .codespell ]
107- # Ref: https://github.com/codespell-project/codespell#using-a-config-file
108- skip = " */kickstarter-announcement.md,*.js,*.map,*.po,*.css,locale"
100+ builtin = " clear,rare,code,names,en-GB_to_en-US"
109101ignore-words = " codespell-ignore-words.txt"
110102ignore-words-list = " commitish"
111- builtin = " clear,rare,code,names,en-GB_to_en-US"
103+ # Ref: https://github.com/codespell-project/codespell#using-a-config-file
104+ skip = " */kickstarter-announcement.md,*.js,*.map,*.po,*.css,locale"
112105
113106[tool .pyproject-fmt ]
114- max_supported_python = " 3.14"
115107keep_full_version = true
108+ max_supported_python = " 3.14"
116109
117110[tool .pytest ]
118111addopts = [
@@ -121,23 +114,21 @@ addopts = [
121114 " -ra" ,
122115 " --no-migrations" ,
123116]
124- testpaths = [ " tests" ]
125- markers = [
126- " requires_postgres: marks tests as requiring a PostgreSQL database backend" ,
127- ]
128117filterwarnings = [
129118 " ignore:'cgi' is deprecated:DeprecationWarning" ,
130119]
120+ markers = [
121+ " requires_postgres: marks tests as requiring a PostgreSQL database backend" ,
122+ ]
123+ testpaths = [ " tests" ]
131124
132- [tool .coverage . run ]
125+ [tool .coverage ]
133126# NOTE: source is ignored with pytest-cov (but uses the same).
134- source = [ " ." ]
135- include = [ " rest_framework/*" , " tests/*" ]
136- branch = true
137-
138- [tool .coverage .report ]
139- include = [ " rest_framework/*" , " tests/*" ]
140- exclude_lines = [
127+ run.source = [ " ." ]
128+ run.include = [ " rest_framework/*" , " tests/*" ]
129+ run.branch = true
130+ report.include = [ " rest_framework/*" , " tests/*" ]
131+ report.exclude_lines = [
141132 " pragma: no cover" ,
142133 " raise NotImplementedError" ,
143134]
0 commit comments