-
Notifications
You must be signed in to change notification settings - Fork 851
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (144 loc) · 4.86 KB
/
Copy pathpyproject.toml
File metadata and controls
157 lines (144 loc) · 4.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "django-oauth-toolkit"
dynamic = ["version"]
requires-python = ">=3.10"
authors = [
{name = "Federico Frenguelli"},
{name = "Massimiliano Pippi"},
{email = "synasius@gmail.com"},
]
description = "OAuth 2.0 authorization server for Django"
keywords = ["django", "oauth", "oauth2", "oauthlib", "authorization-server", "oidc", "mcp", "pkce"]
license = {file = "LICENSE"}
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet :: WWW/HTTP",
]
dependencies = [
"django >= 4.2",
"requests >= 2.13.0",
"urllib3 >= 1.26",
"oauthlib >= 3.3.0",
"jwcrypto >= 1.5.0",
]
[project.optional-dependencies]
dev = [
"myst-parser",
"sphinx==7.2.6",
"sphinx-rtd-theme==2.0.0",
"djangorestframework",
"django-ninja",
"coverage",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-xdist",
"pytest-mock",
"ruff",
]
docs = [
"myst-parser",
"sphinx==7.2.6",
"sphinx-rtd-theme==2.0.0",
]
test = [
"djangorestframework",
"django-ninja",
"coverage",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-xdist",
"pytest-mock",
]
[project.urls]
Homepage = "https://django-oauth-toolkit.readthedocs.io/"
Repository = "https://github.com/django-oauth/django-oauth-toolkit"
[tool.setuptools.dynamic]
version = {attr = "oauth2_provider.__version__"}
[tool.setuptools.packages.find]
include = ["oauth2_provider", "oauth2_provider.*"]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
[tool.codespell]
skip = '.git,package-lock.json,locale,AUTHORS,tox.ini,rfcs'
check-hidden = true
ignore-regex = '.*pragma: codespell-ignore.*'
ignore-words-list = 'assertIn'
[tool.coverage.run]
source = ["oauth2_provider"]
omit = ["*/migrations/*"]
[tool.coverage.report]
show_missing = true
[tool.pytest.ini_options]
django_find_project = false
addopts = [
# Run the suite in parallel across all available cores. pytest-xdist is a
# declared test dependency; pytest-cov combines per-worker coverage data at the
# end, so coverage (enabled only on the designated cell via PYTEST_ADDOPTS in
# tox) still works under xdist.
#
# `--dist loadfile` keeps every test in a given file on the same worker and runs
# them in collection order. Several test modules mutate process-global state
# (e.g. swapping OAUTH2_PROVIDER_ACCESS_TOKEN_MODEL via override_settings), so the
# suite relies on within-file ordering; loadfile preserves that while still
# parallelizing across files.
"-n", "auto",
"--dist", "loadfile",
# The black-box end-to-end / compliance suite boots a live server and is run
# separately via `tox -e e2e` (which clears addopts). Keep it out of the
# in-process unit-test collection.
"--ignore=tests/e2e",
]
markers = [
"oauth2_settings: Custom OAuth2 settings to use - use with oauth2_settings fixture",
"nologinrequiredmiddleware",
# End-to-end / compliance suite (tests/e2e) markers.
"compliance: bind a test to a specification requirement (spec, section, requirement)",
"deprecated: flow discouraged by OAuth 2.1 (implicit, ROPC)",
"browser: requires a real browser (Playwright) + the SvelteKit RP",
"spec_rfc6749: RFC 6749 (OAuth 2.0 core grants)",
"spec_rfc7636: RFC 7636 (PKCE)",
"spec_rfc7009: RFC 7009 (token revocation)",
"spec_rfc7662: RFC 7662 (token introspection)",
"spec_rfc8414: RFC 8414 (authorization server metadata)",
"spec_rfc9728: RFC 9728 (protected resource metadata)",
"spec_rfc8628: RFC 8628 (device authorization grant)",
"spec_rfc7591: RFC 7591/7592 (dynamic client registration)",
"spec_cimd: OAuth Client ID Metadata Documents (draft-ietf-oauth-client-id-metadata-document)",
"spec_oidc_core: OpenID Connect Core 1.0",
"spec_oidc_discovery: OpenID Connect Discovery 1.0",
"spec_oidc_rp_logout: OpenID Connect RP-Initiated Logout 1.0",
"spec_browser_rp: Browser RP (SvelteKit) end-to-end",
]
[tool.ruff]
line-length = 110
exclude = [".tox", "build/", "dist/", "docs/", "oauth2_provider/migrations/", "tests/migrations/", "manage.py", "rfcs/"]
[tool.ruff.lint]
select = ["E", "F", "I", "Q", "W"]
[tool.ruff.lint.isort]
lines-after-imports = 2
known-first-party = ["oauth2_provider"]
[tool.uv.workspace]
members = [
"tests/app/idp",
]