@@ -1772,14 +1772,28 @@ def get_remote_driver(
17721772 pip_find_lock = fasteners .InterProcessLock (
17731773 constants .PipInstall .FINDLOCK
17741774 )
1775- with pip_find_lock :
1775+ with pip_find_lock : # Prevent issues with multiple processes
17761776 try :
17771777 from seleniumwire import webdriver
1778+ import blinker
1779+ try :
1780+ use_blinker_ver = constants .SeleniumWire .BLINKER_VER
1781+ if blinker .__version__ != use_blinker_ver :
1782+ shared_utils .pip_install (
1783+ "blinker" , version = use_blinker_ver
1784+ )
1785+ except Exception :
1786+ pass
1787+ del blinker
17781788 except Exception :
1789+ shared_utils .pip_install (
1790+ "blinker" , version = constants .SeleniumWire .BLINKER_VER
1791+ )
17791792 shared_utils .pip_install (
17801793 "selenium-wire" , version = constants .SeleniumWire .VER
17811794 )
17821795 from seleniumwire import webdriver
1796+ warnings .simplefilter ("ignore" , category = DeprecationWarning )
17831797 else :
17841798 from selenium import webdriver
17851799
@@ -2186,17 +2200,31 @@ def get_local_driver(
21862200 downloads_path = DOWNLOADS_FOLDER
21872201 b_path = binary_location
21882202 if use_wire :
2189- driver_fixing_lock = fasteners .InterProcessLock (
2190- constants .MultiBrowser . DRIVER_FIXING_LOCK
2203+ pip_find_lock = fasteners .InterProcessLock (
2204+ constants .PipInstall . FINDLOCK
21912205 )
2192- with driver_fixing_lock : # Prevent multi-processes mode issues
2206+ with pip_find_lock : # Prevent issues with multiple processes
21932207 try :
21942208 from seleniumwire import webdriver
2209+ import blinker
2210+ try :
2211+ use_blinker_ver = constants .SeleniumWire .BLINKER_VER
2212+ if blinker .__version__ != use_blinker_ver :
2213+ shared_utils .pip_install (
2214+ "blinker" , version = use_blinker_ver
2215+ )
2216+ except Exception :
2217+ pass
2218+ del blinker
21952219 except Exception :
2220+ shared_utils .pip_install (
2221+ "blinker" , version = constants .SeleniumWire .BLINKER_VER
2222+ )
21962223 shared_utils .pip_install (
21972224 "selenium-wire" , version = constants .SeleniumWire .VER
21982225 )
21992226 from seleniumwire import webdriver
2227+ warnings .simplefilter ("ignore" , category = DeprecationWarning )
22002228 else :
22012229 from selenium import webdriver
22022230
0 commit comments