Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
SeleniumHQ
GitHub Repository: SeleniumHQ/Selenium
Path: blob/trunk/py/pyproject.toml
1856 views
1
[build-system]
2
requires = ["setuptools", "setuptools-rust"]
3
build-backend = "setuptools.build_meta"
4
5
[project]
6
name = "selenium"
7
version = "4.36.0.202508121825"
8
license = "Apache-2.0"
9
license-files = ["LICENSE", "NOTICE"]
10
description = "Official Python bindings for Selenium WebDriver."
11
readme = "README.rst"
12
requires-python = "~=3.9"
13
classifiers = [
14
"Development Status :: 5 - Production/Stable",
15
"Intended Audience :: Developers",
16
"Operating System :: POSIX",
17
"Operating System :: Microsoft :: Windows",
18
"Operating System :: MacOS :: MacOS X",
19
"Topic :: Software Development :: Testing",
20
"Topic :: Software Development :: Libraries",
21
"Programming Language :: Python",
22
"Programming Language :: Python :: 3.9",
23
"Programming Language :: Python :: 3.10",
24
"Programming Language :: Python :: 3.11",
25
"Programming Language :: Python :: 3.12",
26
"Programming Language :: Python :: 3.13",
27
]
28
dependencies = [
29
"urllib3[socks]>=2.5.0,<3.0",
30
"trio>=0.30.0,<1.0",
31
"trio-websocket>=0.12.2,<1.0",
32
"certifi>=2025.6.15",
33
"typing_extensions>=4.14.0,<5.0",
34
"websocket-client>=1.8.0,<2.0",
35
]
36
37
[project.urls]
38
homepage = "https://www.selenium.dev"
39
source = "https://github.com/SeleniumHQ/selenium/tree/trunk/py"
40
download = "https://pypi.org/project/selenium"
41
changelog = "https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES"
42
documentation = "https://www.selenium.dev/documentation/webdriver"
43
issues = "https://github.com/SeleniumHQ/selenium/issues"
44
45
[tool.setuptools]
46
zip-safe = false
47
48
[tool.setuptools.packages.find]
49
include = ["selenium*"]
50
exclude = ["test*"]
51
namespaces = true
52
# include-package-data is `true` by default in pyproject.toml
53
54
[[tool.setuptools-rust.ext-modules]]
55
target = "selenium.webdriver.common.selenium-manager"
56
binding = "Exec"
57
58
[tool.setuptools.package-data]
59
"*" = [
60
"*.py",
61
"*.rst",
62
"*.json",
63
"*.xpi",
64
"*.js",
65
"py.typed",
66
"prune*",
67
"selenium.egg-info*",
68
"selenium-manager",
69
"selenium-manager.exe",
70
"CHANGES",
71
"LICENSE",
72
"NOTICE",
73
]
74
75
[tool.pytest.ini_options]
76
console_output_style = "progress"
77
faulthandler_timeout = 60
78
log_cli = true
79
trio_mode = true
80
markers = [
81
"xfail_chrome: Tests expected to fail in Chrome",
82
"xfail_edge: Tests expected to fail in Edge",
83
"xfail_firefox: Tests expected to fail in Firefox",
84
"xfail_ie: Tests expected to fail in IE",
85
"xfail_remote: Tests expected to fail with Remote webdriver",
86
"xfail_safari: Tests expected to fail in Safari",
87
"xfail_webkitgtk: Tests expected to fail in WebKitGTK",
88
"xfail_wpewebkit: Tests expected to fail in WPEWebKit",
89
"no_driver_after_test: If there are no drivers after the test it will create a new one."
90
]
91
python_files = ["test_*.py", "*_test.py", "*_tests.py"]
92
testpaths = ["test"]
93
94
# mypy global options
95
[tool.mypy]
96
exclude = "selenium/webdriver/common/devtools"
97
# The aim in future here is we would be able to turn (most) of these flags on, however the typing technical
98
# debt is quite colossal right now. For now we should maybe get everything working with the config here
99
# then look at going after partially or completely untyped defs as a phase-2.
100
files = "selenium"
101
# warn about per-module sections in the config file that do not match any files processed.
102
warn_unused_configs = true
103
# disallows subclassing of typing.Any.
104
disallow_subclassing_any = false
105
# disallow usage of generic types that do not specify explicit type parameters.
106
disallow_any_generics = false
107
# disallow calling functions without type annotations from functions that have type annotations.
108
disallow_untyped_calls = false
109
# disallow defining functions without type annotations or with incomplete annotations.
110
disallow_untyped_defs = false
111
# disallow defining functions with incomplete type annotations.
112
disallow_incomplete_defs = false
113
# type-checks the interior of functions without type annotations.
114
check_untyped_defs = false
115
# reports an error whenever a function with type annotations is decorated with a decorator without annotations.
116
disallow_untyped_decorators = false
117
# changes the treatment of arguments with a default value of None by not implicitly making their type `typing.Optional`.
118
no_implicit_optional = false
119
# warns about casting an expression to it's inferred type.
120
warn_redundant_casts = true
121
# warns about unneeded `# type: ignore` comments.
122
warn_unused_ignores = true
123
# warns when returning a value with typing.Any from a function with a non typing.Any return type.
124
warn_return_any = false
125
# Shows a warning when encountering any code inferred to be unreachable after performing type analysis.
126
warn_unreachable = false
127
128
# mypy module specific options
129
[[tool.mypy.trio_websocket]]
130
# suppress error messages about imports that cannot be resolved.
131
ignore_missing_imports = true
132
133
[[tool.mypy._winreg]]
134
# suppress error messages about imports that cannot be resolved.
135
ignore_missing_imports = true
136
137
[tool.ruff]
138
extend-exclude = [
139
"selenium/webdriver/common/devtools/",
140
"generate.py",
141
]
142
line-length = 120
143
respect-gitignore = true
144
target-version = "py39"
145
146
[tool.ruff.lint]
147
extend-select = ["E4", "E7", "E9", "F", "I", "E501", "RUF022"]
148
fixable = ["ALL"]
149
150
[tool.ruff.format]
151
docstring-code-format = true
152
docstring-code-line-length = 120
153
154