Skip to content

Commit

Permalink
Merge pull request #2783 from seleniumbase/refresh-dependencies-and-f…
Browse files Browse the repository at this point in the history
…ix-wire-mode

Refresh dependencies and fix Wire Mode
  • Loading branch information
mdmintz authored May 16, 2024
2 parents 00add3a + 301e544 commit 83a51d0
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 14 deletions.
4 changes: 2 additions & 2 deletions mkdocs_build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mkdocs dependencies for generating the seleniumbase.io website
# Minimum Python version: 3.8 (for generating docs only)

regex>=2024.5.10
regex>=2024.5.15
pymdown-extensions>=10.8.1
pipdeptree>=2.20.0
python-dateutil>=2.8.2
Expand All @@ -20,7 +20,7 @@ lxml==5.2.2
pyquery==2.0.0
readtime==3.0.0
mkdocs==1.6.0
mkdocs-material==9.5.22
mkdocs-material==9.5.23
mkdocs-exclude-search==0.6.6
mkdocs-simple-hooks==0.1.5
mkdocs-material-extensions==1.3.1
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exceptiongroup>=1.2.1
filelock>=3.12.2;python_version<"3.8"
filelock>=3.14.0;python_version>="3.8"
platformdirs>=4.0.0;python_version<"3.8"
platformdirs>=4.2.1;python_version>="3.8"
platformdirs>=4.2.2;python_version>="3.8"
typing-extensions>=4.11.0;python_version>="3.8"
parse>=1.20.1
parse-type>=0.6.2
Expand All @@ -27,11 +27,11 @@ sniffio==1.3.1
h11==0.14.0
outcome==1.3.0.post0
trio==0.22.2;python_version<"3.8"
trio==0.25.0;python_version>="3.8"
trio==0.25.1;python_version>="3.8"
trio-websocket==0.11.1
wsproto==1.2.0
selenium==4.11.2;python_version<"3.8"
selenium==4.20.0;python_version>="3.8"
selenium==4.21.0;python_version>="3.8"
cssselect==1.2.0
sortedcontainers==2.4.0
fasteners==0.19
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.26.4"
__version__ = "4.27.0"
36 changes: 32 additions & 4 deletions seleniumbase/core/browser_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1772,14 +1772,28 @@ def get_remote_driver(
pip_find_lock = fasteners.InterProcessLock(
constants.PipInstall.FINDLOCK
)
with pip_find_lock:
with pip_find_lock: # Prevent issues with multiple processes
try:
from seleniumwire import webdriver
import blinker
try:
use_blinker_ver = constants.SeleniumWire.BLINKER_VER
if blinker.__version__ != use_blinker_ver:
shared_utils.pip_install(
"blinker", version=use_blinker_ver
)
except Exception:
pass
del blinker
except Exception:
shared_utils.pip_install(
"blinker", version=constants.SeleniumWire.BLINKER_VER
)
shared_utils.pip_install(
"selenium-wire", version=constants.SeleniumWire.VER
)
from seleniumwire import webdriver
warnings.simplefilter("ignore", category=DeprecationWarning)
else:
from selenium import webdriver

Expand Down Expand Up @@ -2186,17 +2200,31 @@ def get_local_driver(
downloads_path = DOWNLOADS_FOLDER
b_path = binary_location
if use_wire:
driver_fixing_lock = fasteners.InterProcessLock(
constants.MultiBrowser.DRIVER_FIXING_LOCK
pip_find_lock = fasteners.InterProcessLock(
constants.PipInstall.FINDLOCK
)
with driver_fixing_lock: # Prevent multi-processes mode issues
with pip_find_lock: # Prevent issues with multiple processes
try:
from seleniumwire import webdriver
import blinker
try:
use_blinker_ver = constants.SeleniumWire.BLINKER_VER
if blinker.__version__ != use_blinker_ver:
shared_utils.pip_install(
"blinker", version=use_blinker_ver
)
except Exception:
pass
del blinker
except Exception:
shared_utils.pip_install(
"blinker", version=constants.SeleniumWire.BLINKER_VER
)
shared_utils.pip_install(
"selenium-wire", version=constants.SeleniumWire.VER
)
from seleniumwire import webdriver
warnings.simplefilter("ignore", category=DeprecationWarning)
else:
from selenium import webdriver

Expand Down
1 change: 1 addition & 0 deletions seleniumbase/fixtures/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ class ProxyPy:
class SeleniumWire:
# The version installed if selenium-wire is not installed
VER = "5.1.0"
BLINKER_VER = "1.7.0" # The "blinker" dependency version


class Mobile:
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
'filelock>=3.12.2;python_version<"3.8"',
'filelock>=3.14.0;python_version>="3.8"',
'platformdirs>=4.0.0;python_version<"3.8"',
'platformdirs>=4.2.1;python_version>="3.8"',
'platformdirs>=4.2.2;python_version>="3.8"',
'typing-extensions>=4.11.0;python_version>="3.8"',
'parse>=1.20.1',
'parse-type>=0.6.2',
Expand All @@ -175,11 +175,11 @@
'h11==0.14.0',
'outcome==1.3.0.post0',
'trio==0.22.2;python_version<"3.8"',
'trio==0.25.0;python_version>="3.8"',
'trio==0.25.1;python_version>="3.8"',
'trio-websocket==0.11.1',
'wsproto==1.2.0',
'selenium==4.11.2;python_version<"3.8"',
'selenium==4.20.0;python_version>="3.8"',
'selenium==4.21.0;python_version>="3.8"',
'cssselect==1.2.0',
"sortedcontainers==2.4.0",
'fasteners==0.19',
Expand Down Expand Up @@ -297,7 +297,8 @@
'hpack==4.0.0',
'hyperframe==6.0.1',
'kaitaistruct==0.10',
'pyasn1==0.5.1',
'pyasn1==0.5.1;python_version<"3.8"',
'pyasn1==0.6.0;python_version>="3.8"',
'zstandard==0.22.0',
],
},
Expand Down

0 comments on commit 83a51d0

Please sign in to comment.