From 9aaa662f0bb3e9c1f002fa573863fd57bb9c45f2 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 16 May 2024 19:37:41 -0400 Subject: [PATCH 1/3] Refresh Python dependencies --- mkdocs_build/requirements.txt | 4 ++-- requirements.txt | 6 +++--- setup.py | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/mkdocs_build/requirements.txt b/mkdocs_build/requirements.txt index 47f86c52f6e..c0f42779273 100644 --- a/mkdocs_build/requirements.txt +++ b/mkdocs_build/requirements.txt @@ -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 @@ -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 diff --git a/requirements.txt b/requirements.txt index 85f5acba230..cafec698bcf 100755 --- a/requirements.txt +++ b/requirements.txt @@ -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 @@ -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 diff --git a/setup.py b/setup.py index c2b4db9ec39..7c549e61cb5 100755 --- a/setup.py +++ b/setup.py @@ -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', @@ -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', @@ -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', ], }, From 62ac9f47e45751cdfa88b8807bc27e2ef9ed26ce Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 16 May 2024 19:39:18 -0400 Subject: [PATCH 2/3] Force the "blinker" version in Wire Mode --- seleniumbase/core/browser_launcher.py | 36 ++++++++++++++++++++++++--- seleniumbase/fixtures/constants.py | 1 + 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/seleniumbase/core/browser_launcher.py b/seleniumbase/core/browser_launcher.py index 74ffcce97f4..77f8258210b 100644 --- a/seleniumbase/core/browser_launcher.py +++ b/seleniumbase/core/browser_launcher.py @@ -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 @@ -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 diff --git a/seleniumbase/fixtures/constants.py b/seleniumbase/fixtures/constants.py index fd920bbfbfa..8f9b805c0ac 100644 --- a/seleniumbase/fixtures/constants.py +++ b/seleniumbase/fixtures/constants.py @@ -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: From 301e54433d45dced49cec66411567125ee9e82f8 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 16 May 2024 19:40:51 -0400 Subject: [PATCH 3/3] Version 4.27.0 --- seleniumbase/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 9cbf6d3308a..c74a820f3df 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.26.4" +__version__ = "4.27.0"