-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (111 loc) · 3.57 KB
/
Copy pathpyproject.toml
File metadata and controls
126 lines (111 loc) · 3.57 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
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "torquests"
version = "1.0.1"
description = "A pure-Python Tor client with v3 onion-service support and a requests-compatible API"
readme = "README.md"
requires-python = ">=3.10"
license = "GPL-3.0-or-later"
license-files = ["LICENSE", "NOTICE"]
authors = [{ name = "Safwan Eljadi", email = "eljadisafwan@gmail.com" }]
keywords = ["tor", "onion", "onion-service", "privacy", "anonymity", "requests", "socks", "hidden-service"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Internet :: Proxy Servers",
"Topic :: Security",
"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",
"Typing :: Typed",
]
dependencies = [
"requests>=2.32,<3",
# urllib3 2.x: response.py builds an HTTPHeaderDict, a top-level export only
# since 2.0. requests permits 1.x, so we pin it directly.
"urllib3>=2,<3",
# cryptography 40+: Ed25519/X25519 {private,public}_bytes_raw (added in 40.0)
# are the oldest APIs the crypto layer uses.
"cryptography>=40",
"PyNaCl>=1.6",
]
[project.optional-dependencies]
dev = [
"pytest>=8",
"pytest-cov>=5",
"pytest-socket>=0.7",
"hypothesis>=6",
"pre-commit>=4",
"ruff==0.15.21",
"mypy==2.3.0",
"types-requests",
]
docs = [
# Floors, not current pins; CI resolves the latest compatible release.
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.24",
]
stealth = [
# curl_cffi reproduces a browser's TLS/JA3 and HTTP/2 fingerprint. The "tor"
# (Tor Browser) impersonation preset, which stealth mode uses by default, was
# added in 0.11 (Firefox support landed in 0.9).
"curl_cffi>=0.11",
]
[project.scripts]
torquests = "torquests.cli:main"
[project.urls]
Homepage = "https://github.com/SafwanLjd/torquests"
Documentation = "https://safwanljd.github.io/torquests/"
Repository = "https://github.com/SafwanLjd/torquests"
Issues = "https://github.com/SafwanLjd/torquests/issues"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
torquests = ["py.typed"]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "W", "F", "I", "B", "C4", "UP", "SIM", "RUF"]
# Protocol code has intentional byte-layout constants and struct formats.
ignore = []
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["B011"]
[tool.mypy]
python_version = "3.10"
strict = true
warn_unused_ignores = true
warn_redundant_casts = true
disallow_untyped_defs = true
files = ["src"]
[[tool.mypy.overrides]]
module = ["nacl.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# curl_cffi is an optional extra; treat it as opaque whether or not it is
# installed, so type-checking is identical with and without torquests[stealth].
module = ["curl_cffi.*"]
ignore_missing_imports = true
follow_imports = "skip"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra -q --disable-socket --cov=torquests --cov-report=term-missing"
markers = [
"integration: tests that require a live Tor network connection (deselected by default; run with --run-integration)",
]
[tool.coverage.run]
branch = true
source = ["src/torquests"]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
"\\.\\.\\.",
]