repositori / bagas / requests

requests public ready

https://github.com/psf/requests commit 3c7baaa 48 berkas · 374 potongan 2026-11-21T15:17:50Z
48berkas
36berkas python
374potongan
python 36 markdown 5 yaml 2 text 2 toml 1 css 1 html 1
pyproject.tomltoml 135 baris ditampilkan
1
[build-system]
2
requires = ["setuptools>=61.0"]
3
build-backend = "setuptools.build_meta"
4
5
[project]
6
name = "requests"
7
description = "Python HTTP for Humans."
8
readme = "README.md"
9
license = {text = "Apache-2.0"}
10
authors = [
11
{ name = "Kenneth Reitz", email = "me@kennethreitz.org" },
12
]
13
maintainers = [
14
{name = "Ian Stapleton Cordasco", email="graffatcolmingov@gmail.com"},
15
{name = "Nate Prewitt", email="nate.prewitt@gmail.com"}
16
]
17
requires-python = ">=3.10"
18
dependencies = [
19
"charset_normalizer>=2,<4",
20
"idna>=2.5,<4",
21
"urllib3>=1.26,<3",
22
"certifi>=2023.5.7"
23
]
24
dynamic = ["version"]
25
26
classifiers = [
27
"Development Status :: 5 - Production/Stable",
28
"Environment :: Web Environment",
29
"Intended Audience :: Developers",
30
"License :: OSI Approved :: Apache Software License",
31
"Natural Language :: English",
32
"Operating System :: OS Independent",
33
"Programming Language :: Python",
34
"Programming Language :: Python :: 3",
35
"Programming Language :: Python :: 3.10",
36
"Programming Language :: Python :: 3.11",
37
"Programming Language :: Python :: 3.12",
38
"Programming Language :: Python :: 3.13",
39
"Programming Language :: Python :: 3.14",
40
"Programming Language :: Python :: 3.15",
41
"Programming Language :: Python :: 3 :: Only",
42
"Programming Language :: Python :: Implementation :: CPython",
43
"Programming Language :: Python :: Implementation :: PyPy",
44
"Programming Language :: Python :: Free Threading :: 2 - Beta",
45
"Topic :: Internet :: WWW/HTTP",
46
"Topic :: Software Development :: Libraries"
47
]
43
"Programming Language :: Python :: Implementation :: PyPy",
44
"Programming Language :: Python :: Free Threading :: 2 - Beta",
45
"Topic :: Internet :: WWW/HTTP",
46
"Topic :: Software Development :: Libraries"
47
]
48
49
[project.urls]
50
Documentation = "https://requests.readthedocs.io"
51
Source = "https://github.com/psf/requests"
52
53
[project.optional-dependencies]
54
security = []
55
socks = ["PySocks>=1.5.6, !=1.5.7"]
56
use_chardet_on_py3 = ["chardet>=3.0.2,<8"]
57
58
[dependency-groups]
59
test = [
60
"requests[socks]",
61
"pytest-httpbin==2.1.0",
62
"httpbin~=0.10.0",
63
"pytest-cov",
64
"pytest-mock",
65
"pytest-xdist",
66
"pytest>=3",
67
"trustme",
68
]
69
typecheck = [
70
"pyright",
71
"typing_extensions",
72
"chardet",
73
"cryptography",
74
"PyOpenSSL",
75
]
76
77
[tool.setuptools]
78
license-files = ["LICENSE", "NOTICE"]
79
80
[tool.setuptools.dynamic]
81
version = {attr = "requests.__version__.__version__"}
82
83
[tool.setuptools.packages.find]
84
where = ["src"]
85
86
[tool.ruff]
87
target-version = "py310"
88
src = ["src/requests", "tests"]
89
exclude = ["docs/", "ext/"]
90
91
[tool.ruff.lint]
92
select = [
93
"E", # pycodestyle errors
94
"W", # pycodestyle warnings
95
"F", # pyflakes
96
"I", # isort
97
"UP", # pyupgrade
98
"T10", # flake8-debugger (replaces debug-statements hook)
99
]
100
ignore = ["E203", "E501", "UP031"]
101
per-file-ignores = {"src/requests/__init__.py" = ["E402", "F401"], "src/requests/compat.py" = ["E402", "F401"], "tests/compat.py" = ["F401"]}
97
"UP", # pyupgrade
98
"T10", # flake8-debugger (replaces debug-statements hook)
99
]
100
ignore = ["E203", "E501", "UP031"]
101
per-file-ignores = {"src/requests/__init__.py" = ["E402", "F401"], "src/requests/compat.py" = ["E402", "F401"], "tests/compat.py" = ["F401"]}
102
103
[tool.ruff.lint.isort]
104
known-first-party = ["requests"]
105
106
[tool.ruff.format]
107
# Use black-compatible formatting
108
quote-style = "double"
109
indent-style = "space"
110
111
[tool.pytest.ini_options]
112
addopts = "--doctest-modules"
113
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
114
minversion = "6.2"
115
testpaths = ["tests"]
116
117
118
[tool.pyright]
119
include = ["src/requests"]
120
typeCheckingMode = "strict"
121
# linting rules unrelated to type checking
122
reportPrivateUsage = false
123
reportPrivateImportUsage = false
124
reportUnnecessaryIsInstance = false
125
reportUnusedImport = false # duplicate of Ruff's F401 rule