File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
selenium/webdriver/common Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
Selenium 4.8.3
2
- * More fine grained control for `Service` subprocesses is now available via passing a `popen_kw` keyed map to any `Service` instance.
3
- * `Service` classes can now control `close_fds` and `creationflags` via `**kwargs` on any `Service` instance.
4
- * Setting `timeouts` on an `Options` instance no longer raises an exception for subsets of supported timeouts. (#11623)
2
+ * Add fine grained control for arguments provided to service subprocesses by passing a `popen_kw` mapping for all services.
3
+ * `Options` classes now allow `timeout` to be set partially and no longer raise an exception when all values are not provided. (#11623)
5
4
* No longer sending `SIGKILL` to subprocesses in instances where `SIGTERM` was successful within 60 seconds.
6
5
7
6
Selenium 4.8.2
Original file line number Diff line number Diff line change @@ -65,10 +65,9 @@ def __init__(
65
65
self .log_file = open (os .devnull , "wb" ) if not _HAS_NATIVE_DEVNULL and log_file == DEVNULL else log_file
66
66
self .start_error_message = start_error_message or ""
67
67
# Default value for every python subprocess: subprocess.Popen(..., creationflags=0)
68
- self .creation_flags = kwargs .pop ("creation_flags" , 0 )
69
- self .close_fds = kwargs .pop ("close_fds" ) or system () != "Windows"
70
- self .env = env or os .environ
71
68
self .popen_kw = kwargs .pop ("popen_kw" , {})
69
+ self .creation_flags = self .popen_kw .pop ("creation_flags" , 0 )
70
+ self .env = env or os .environ
72
71
73
72
@property
74
73
def service_url (self ) -> str :
@@ -199,11 +198,12 @@ def _start_process(self, path: str) -> None:
199
198
"""
200
199
cmd = [path ]
201
200
cmd .extend (self .command_line_args ())
201
+ close_file_descriptors = self .popen_kw .pop ("close_fds" ) or system () != "Windows"
202
202
try :
203
203
self .process = subprocess .Popen (
204
204
cmd ,
205
205
env = self .env ,
206
- close_fds = self . close_fds ,
206
+ close_fds = close_file_descriptors ,
207
207
stdout = self .log_file ,
208
208
stderr = self .log_file ,
209
209
stdin = PIPE ,
You can’t perform that action at this time.
0 commit comments