Debian Codegraph @

pyproject.toml

raw ◀ ▶
1 Debian patch touch this file
1 [build-system]
2 build-backend = "setuptools.build_meta"
3 requires = [ "setuptools>=77.0.3" ]
4
5 [project]
6 name = "djangorestframework"
7 description = "Web APIs for Django, made easy."
8 readme = "README.md"
9 license = "BSD-3-Clause"
10 license-files = [ "LICENSE.md" ]
11 authors = [ { name = "Tom Christie", email = "[email protected]" } ]
12 requires-python = ">=3.10"
13 classifiers = [
14 "Development Status :: 5 - Production/Stable",
15 "Environment :: Web Environment",
16 "Framework :: Django",
17 "Framework :: Django :: 5.2",
18 "Framework :: Django :: 6.0",
19 "Framework :: Django :: 6.1",
20 "Intended Audience :: Developers",
21 "Operating System :: OS Independent",
22 "Programming Language :: Python",
23 "Programming Language :: Python :: 3 :: Only",
24 "Programming Language :: Python :: 3.10",
25 "Programming Language :: Python :: 3.11",
26 "Programming Language :: Python :: 3.12",
27 "Programming Language :: Python :: 3.13",
28 "Programming Language :: Python :: 3.14",
29 "Topic :: Internet :: WWW/HTTP",
30 ]
31 dynamic = [ "version" ]
32 dependencies = [ "django>=5.2" ]
33 urls.Changelog = "https://www.django-rest-framework.org/community/release-notes/"
34 urls.Funding = "https://fund.django-rest-framework.org/topics/funding/"
35 urls.Homepage = "https://www.django-rest-framework.org"
36 urls.Source = "https://github.com/encode/django-rest-framework"
37
38 [dependency-groups]
39 dev = [
40 { include-group = "docs" },
41 { include-group = "optional" },
42 { include-group = "test" },
43 ]
44 test = [
45 "dj-database-url>=3.1.0",
46 "importlib-metadata<10.0",
47 # Pytest for running the tests.
48 "pytest==9.*",
49 "pytest-cov==7.*",
50 "pytest-django>=4.5.2,<5",
51
52 ]
53 docs = [
54 # MkDocs to build our documentation.
55 "mkdocs==1.6.1",
56 "mkdocs-material[imaging]==9.7.7",
57 # pylinkvalidator to check for broken links in documentation.
58 "pylinkvalidator==0.3",
59 ]
60 optional = [
61 # Optional packages which may be used with REST framework.
62 "django-filter",
63 "django-guardian>=2.4.0,<3.4",
64 "inflection==0.5.1",
65 "legacy-cgi; python_version>='3.13'",
66 "markdown>=3.3.7",
67 "psycopg[binary]>=3.1.8",
•68 "pygments>=2.17,<2.21",
69 "pyyaml>=5.3.1,<6.1",
70 "requests",
71 "uritemplate",
72 ]
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" ]
77
78 [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/**/*",
90 "locale/**/*.mo",
91 ]
92
93 [tool.isort]
94 skip = [ ".tox" ]
95 atomic = true
96 multi_line_output = 5
97 extra_standard_library = [ "types" ]
98 known_third_party = [ "pytest", "_pytest", "django", "uritemplate" ]
99 known_first_party = [ "rest_framework", "tests" ]
100
101 [tool.flake8]
102 extend-ignore = [ "E501", "W503", "W504", "B" ]
103 extend-select = [ "B006" ]
104 banned-modules = "json = use from rest_framework.utils import json!"
105
106 [tool.codespell]
107 # Ref: https://github.com/codespell-project/codespell#using-a-config-file
108 skip = "*/kickstarter-announcement.md,*.js,*.map,*.po,*.css,locale"
109 ignore-words = "codespell-ignore-words.txt"
110 ignore-words-list = "commitish"
111 builtin = "clear,rare,code,names,en-GB_to_en-US"
112
113 [tool.pyproject-fmt]
114 max_supported_python = "3.14"
115 keep_full_version = true
116
117 [tool.pytest]
118 addopts = [
119 "--tb=short",
120 "--strict-markers",
121 "-ra",
122 "--no-migrations",
123 ]
124 testpaths = [ "tests" ]
125 markers = [
126 "requires_postgres: marks tests as requiring a PostgreSQL database backend",
127 ]
128 filterwarnings = [
129 "ignore:'cgi' is deprecated:DeprecationWarning",
130 ]
131
132 [tool.coverage.run]
133 # 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 = [
141 "pragma: no cover",
142 "raise NotImplementedError",
143 ]