Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/py/pyproject.toml
4500 views
1
[build-system]
2
requires = ["setuptools", "setuptools-rust"]
3
build-backend = "setuptools.build_meta"
4
5
[project]
6
name = "selenium"
7
version = "4.41.0.202601181916"
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.10"
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.10",
23
"Programming Language :: Python :: 3.11",
24
"Programming Language :: Python :: 3.12",
25
"Programming Language :: Python :: 3.13",
26
"Programming Language :: Python :: 3.14",
27
]
28
dependencies = [
29
"certifi>=2026.1.4",
30
"trio>=0.31.0,<1.0",
31
"trio-websocket>=0.12.2,<1.0",
32
"typing_extensions>=4.15.0,<5.0",
33
"urllib3[socks]>=2.6.3,<3.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
[dependency-groups]
46
lint = [
47
"ruff==0.14.14",
48
]
49
validate = [
50
"validate-pyproject==0.24.1",
51
"packaging==25.0",
52
]
53
54
[tool.setuptools]
55
zip-safe = false
56
57
[tool.setuptools.packages.find]
58
include = ["selenium*"]
59
exclude = ["test*"]
60
namespaces = true
61
# include-package-data is `true` by default in pyproject.toml
62
63
[[tool.setuptools-rust.ext-modules]]
64
target = "selenium.webdriver.common.selenium-manager"
65
binding = "Exec"
66
67
[tool.setuptools.package-data]
68
"*" = [
69
"*.py",
70
"*.rst",
71
"*.json",
72
"*.xpi",
73
"*.js",
74
"py.typed",
75
"prune*",
76
"selenium.egg-info*",
77
"selenium-manager",
78
"selenium-manager.exe",
79
"CHANGES",
80
"LICENSE",
81
"NOTICE",
82
]
83
84
[tool.pytest]
85
console_output_style = "progress"
86
faulthandler_timeout = "60"
87
log_cli = true
88
trio_mode = true
89
addopts = ["-s", "--tb=no"]
90
filterwarnings = [
91
"ignore::DeprecationWarning",
92
]
93
markers = [
94
"xfail_chrome: Tests expected to fail in Chrome",
95
"xfail_edge: Tests expected to fail in Edge",
96
"xfail_firefox: Tests expected to fail in Firefox",
97
"xfail_ie: Tests expected to fail in IE",
98
"xfail_remote: Tests expected to fail with Remote webdriver",
99
"xfail_safari: Tests expected to fail in Safari",
100
"xfail_webkitgtk: Tests expected to fail in WebKitGTK",
101
"xfail_wpewebkit: Tests expected to fail in WPEWebKit",
102
"no_driver_after_test: If there are no drivers after the test it will create a new one.",
103
"needs_fresh_driver: Mark tests that may need a fresh driver instance for proper isolation."
104
]
105
python_files = ["test_*.py", "*_test.py", "*_tests.py"]
106
testpaths = ["test"]
107
108
# mypy global options
109
[tool.mypy]
110
exclude = "selenium/webdriver/common/devtools"
111
# The aim in future is we would be able to turn (most) of these flags on
112
# warn about per-module sections in the config file that do not match any files processed.
113
warn_unused_configs = true
114
# disallows subclassing of typing.Any.
115
disallow_subclassing_any = true
116
# disallow usage of generic types that do not specify explicit type parameters.
117
disallow_any_generics = false
118
# disallow calling functions without type annotations from functions that have type annotations.
119
disallow_untyped_calls = false
120
# disallow defining functions without type annotations or with incomplete annotations.
121
disallow_untyped_defs = false
122
# disallow defining functions with incomplete type annotations.
123
disallow_incomplete_defs = false
124
# type-checks the interior of functions without type annotations.
125
check_untyped_defs = false
126
# reports an error whenever a function with type annotations is decorated with a decorator without annotations.
127
disallow_untyped_decorators = false
128
# changes the treatment of arguments with a default value of None by not implicitly making their type `typing.Optional`.
129
no_implicit_optional = true
130
# warns about casting an expression to it's inferred type.
131
warn_redundant_casts = true
132
# warns about unneeded `# type: ignore` comments.
133
warn_unused_ignores = true
134
# warns when returning a value with typing.Any from a function with a non typing.Any return type.
135
warn_return_any = false
136
# Shows a warning when encountering any code inferred to be unreachable after performing type analysis.
137
warn_unreachable = false
138
139
[tool.ruff]
140
extend-exclude = [
141
"selenium/webdriver/common/devtools/",
142
]
143
line-length = 120
144
respect-gitignore = true
145
target-version = "py310"
146
147
[tool.ruff.lint]
148
extend-select = ["D", "E", "F", "I", "PT", "UP", "RUF", "TID252"]
149
fixable = ["ALL"]
150
extend-ignore = [
151
"D100", # Missing docstring in public module
152
"D101", # Missing docstring in public class
153
"D102", # Missing docstring in public method
154
"D103", # Missing docstring in public function
155
"D104", # Missing docstring in public package
156
"D105", # Missing docstring in magic method
157
"D107", # Missing docstring in `__init__`
158
"D212", # Multi-line docstring summary should start at the first line
159
"PT011", # Use of `pytest.raises({exception})` is too broad
160
"PT012", # `pytest.raises()` block should contain a single simple statement
161
"RUF005", # Uses of the + operator to concatenate collections
162
"RUF012", # Mutable default values in class attributes
163
"RUF059", # Unpacked variable is never used
164
]
165
166
[tool.ruff.format]
167
docstring-code-format = true
168
docstring-code-line-length = 120
169
170
[tool.ruff.lint.isort]
171
known-first-party = ["selenium", "test"]
172
known-third-party = []
173
known-local-folder = ["conftest"]
174
175
[tool.ruff.lint.pydocstyle]
176
convention = "google"
177
178