Skip to content

Commit 835ee7e

Browse files
authored
Undo a bug fix that caused a worse bug. (#11666)
### Undo a bug fix that caused a worse bug. Do to 3f6717d#diff-10fa59c3fd96a0c31762373ca8d7373c0ab669a437ae957b1a17ea1377b20608 a worse bug was allowed to appear that caused deprecation warnings for everyone using ``selenium`` ``4.8.1`` with unittest / pytest. ``DeprecationWarning: keep_alive has been deprecated, please pass in a Service object``, even if not setting ``keep_alive``. This temporary fix will allow the Selenium Team more time to deal with the proper fix for both bugs. (Caused by duplicate calls in Chrome / Chromium ``__init__()`` methods.
1 parent 68c556e commit 835ee7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/selenium/webdriver/chromium/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(
7474
DeprecationWarning,
7575
stacklevel=2,
7676
)
77-
if keep_alive != DEFAULT_KEEP_ALIVE and isinstance(self, __class__):
77+
if keep_alive != DEFAULT_KEEP_ALIVE and type(self) == __class__:
7878
warnings.warn(
7979
"keep_alive has been deprecated, please pass in a Service object", DeprecationWarning, stacklevel=2
8080
)

0 commit comments

Comments
 (0)