@@ -140,9 +140,9 @@ def dict_to_slots_and__excluded_are_none(self, d, excluded=()):
140140CREATE_NO_WINDOW = 0x08000000
141141
142142## CREATE_NEW_PROCESS_GROUP is needed to allow killing it afterwards,
143- #seehttps ://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal
143+ #see https ://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal
144144PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess .CREATE_NEW_PROCESS_GROUP
145- if is_win
145+ if is_win and sys . version_info >= ( 2 , 7 )
146146else 0 )
147147
148148
@@ -246,7 +246,7 @@ def __del__(self):
246246return
247247
248248# can be that nothing really exists anymore ...
249- if os is None or os . kill is None :
249+ if os is None or getattr ( os , ' kill' , None ) is None :
250250return
251251
252252# try to kill it
@@ -832,8 +832,12 @@ def _call_process(self, method, *args, **kwargs):
832832 :return: Same as ``execute``"""
833833# Handle optional arguments prior to calling transform_kwargs
834834# otherwise these'll end up in args, which is bad.
835- _kwargs = {k :v for k ,v in kwargs .items ()if k in execute_kwargs }
836- kwargs = {k :v for k ,v in kwargs .items ()if k not in execute_kwargs }
835+ _kwargs = dict ()
836+ for kwarg in execute_kwargs :
837+ try :
838+ _kwargs [kwarg ]= kwargs .pop (kwarg )
839+ except KeyError :
840+ pass
837841
838842insert_after_this_arg = kwargs .pop ('insert_kwargs_after' ,None )
839843