Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[py] Remove deprecated code in driver classes (#12030)
* [py] remove chrome w3c warnings * [py] this constant is always true for supported versions of Python * [py] remove deprecations * [py] Fixing linting issues --------- Co-authored-by: Diego Molina <diemol@gmail.com> Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
- Loading branch information
1 parent
abad15e
commit 9f5801c
Showing
17 changed files
with
124 additions
and
705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,9 +35,6 @@ | |
logger = logging.getLogger(__name__) | ||
|
||
|
||
_HAS_NATIVE_DEVNULL = True | ||
|
||
|
||
class Service(ABC): | ||
"""The abstract base class for all service objects. Services typically | ||
launch a child program in a new process as an interim process to | ||
|
@@ -61,7 +58,7 @@ def __init__( | |
) -> None: | ||
self._path = executable | ||
self.port = port or utils.free_port() | ||
self.log_file = open(os.devnull, "wb") if not _HAS_NATIVE_DEVNULL and log_file == DEVNULL else log_file | ||
self.log_file = open(os.devnull, "wb") if not log_file == DEVNULL else log_file | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
titusfortner
Author
Member
|
||
self.start_error_message = start_error_message or "" | ||
# Default value for every python subprocess: subprocess.Popen(..., creationflags=0) | ||
self.popen_kw = kwargs.pop("popen_kw", {}) | ||
|
@@ -132,7 +129,7 @@ def send_remote_shutdown_command(self) -> None: | |
|
||
def stop(self) -> None: | ||
"""Stops the service.""" | ||
if self.log_file != PIPE and not (self.log_file == DEVNULL and _HAS_NATIVE_DEVNULL): | ||
if self.log_file != PIPE and not (self.log_file == DEVNULL): | ||
try: | ||
# Todo: Be explicit in what we are catching here. | ||
if hasattr(self.log_file, "close"): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
The conditional expression is wrong.