-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (128 loc) · 4.19 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (128 loc) · 4.19 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
[project]
name = "descope"
version = "2.6.0"
description = "Descope Python SDK"
authors = [{ name = "Descope", email = "info@descope.com" }]
requires-python = ">=3.9,<4.0"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"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",
"Typing :: Typed",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"httpx>=0.28,<0.29",
"certifi",
"pyjwt[crypto]>=2.4.0",
"email-validator>=2,<3",
]
[project.optional-dependencies]
Flask = ["Flask>=2"]
[project.urls]
Homepage = "https://descope.com/"
Repository = "https://github.com/descope/python-sdk"
Documentation = "https://docs.descope.com"
"Bug Tracker" = "https://github.com/descope/python-sdk/issues"
[dependency-groups]
dev = [
"pre-commit==3.8.0",
"ruff==0.15.16",
]
types = [
# mypy 1.12+ requires Python 3.10+; on 3.9 we stay on the last 1.11.x line.
# mypy is only run in the lint job (Python 3.13) so 3.9 never installs it in CI.
"mypy>=1.20.1; python_version >= '3.10'",
"mypy==1.11.2; python_version < '3.10'",
]
tests = [
# pytest 9 requires Python 3.10+; on 3.9 we stay on the last 8.x line.
# The `<9` upper bound on the 3.9 entry is REQUIRED — without it renovate
# bumps the pin past 9.0 and produces an unsatisfiable lock. Keep it.
# CVE-2025-71176 (pytest <9.0.3 tmp-dir predictability) is dev-only and
# not fixable on 3.9 — risk is bounded to local CI runners.
"pytest>=9.0.3; python_version >= '3.10'",
"pytest>=8.4,<9; python_version < '3.10'",
"pytest-cov>=5",
"pytest-asyncio==1.4.0; python_version < '3.10'",
"pytest-asyncio==1.4.0; python_version >= '3.10'",
"coverage[toml]>=7.3.1,<8",
]
[tool.uv]
default-groups = "all"
[tool.uv.build-backend]
module-name = "descope"
module-root = ""
[build-system]
requires = ["uv_build>=0.11.7,<0.12.0"]
build-backend = "uv_build"
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.coverage.run]
relative_files = true
source = ["descope"]
omit = ["descope/flask/*"]
[tool.coverage.report]
fail_under = 98
skip_covered = true
skip_empty = true
[tool.ruff]
line-length = 120
[tool.ruff.lint]
# Replaces flake8 (E/W/F), isort (I), flake8-bugbear (B), pep8-naming (N), pyupgrade (UP)
select = ["E", "W", "F", "I", "B", "N", "UP"]
ignore = [
"E501", # line length is enforced by the formatter
"N818", # public exception class names predate the *Error suffix convention
"B904", # exception chaining cleanup tracked separately
# PEP 585/604 syntax requires Python 3.10+ at runtime; we still support 3.9
"UP006",
"UP007",
"UP035",
"UP045",
"UP046",
"UP047",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
# Public management APIs intentionally mirror the backend JSON schema (camelCase)
"descope/management/tenant.py" = ["N803"]
"descope/management/tenant_async.py" = ["N803"]
"descope/management/user.py" = ["N803", "N806"]
"descope/management/user_async.py" = ["N803", "N806"]
# Tests intentionally use blind exception checks and raw attribute access
"tests/**" = ["B017", "B018"]
[tool.pylic]
# License names match the long-form `License` metadata field that pylic reads
# from installed package METADATA. SPDX short names rarely match.
safe_licenses = [
"MIT License",
"MIT",
"ISC License (ISCL)",
"Apache-2.0",
"BSD License",
"BSD-2-Clause",
"BSD-3-Clause",
"Python Software Foundation License",
"PSF-2.0",
]
# Per-package allowances for non-standard licenses
# (certifi/MPL-2.0, email-validator/Unlicense — both pre-approved in the old liccheck policy;
# pathspec/MPL-2.0 is a transitive mypy dependency).
unsafe_packages = [
"certifi",
"email-validator",
"pathspec",
]