Skip to content

Commit

Permalink
Undo a bug fix that caused a worse bug. (#11666)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
mdmintz authored Feb 17, 2023
1 parent 68c556e commit 835ee7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/selenium/webdriver/chromium/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(
DeprecationWarning,
stacklevel=2,
)
if keep_alive != DEFAULT_KEEP_ALIVE and isinstance(self, __class__):
if keep_alive != DEFAULT_KEEP_ALIVE and type(self) == __class__:
warnings.warn(
"keep_alive has been deprecated, please pass in a Service object", DeprecationWarning, stacklevel=2
)
Expand Down

0 comments on commit 835ee7e

Please sign in to comment.