diff --git a/mkdocs_build/requirements.txt b/mkdocs_build/requirements.txt index 877338adab3..364594b18c4 100644 --- a/mkdocs_build/requirements.txt +++ b/mkdocs_build/requirements.txt @@ -14,7 +14,7 @@ pathspec==0.12.1 Babel==2.17.0 paginate==0.5.7 mkdocs==1.6.1 -mkdocs-material==9.6.14 +mkdocs-material==9.6.15 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 889c540252f..7643e24e8fa 100755 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ parse>=1.20.2 parse-type>=0.6.4 colorama>=0.4.6 pyyaml>=6.0.2 -pygments>=2.19.1 +pygments>=2.19.2 pyreadline3>=3.5.3;platform_system=="Windows" tabcompleter>=1.4.0 pdbp>=1.7.0 @@ -34,7 +34,7 @@ idna==3.10 chardet==5.2.0 charset-normalizer>=3.4.2,<4 urllib3>=1.26.20,<2;python_version<"3.10" -urllib3>=1.26.20,<2.5.0;python_version>="3.10" +urllib3>=1.26.20,<2.6.0;python_version>="3.10" requests==2.32.4 sniffio==1.3.1 h11==0.16.0 @@ -55,14 +55,14 @@ iniconfig==2.1.0 pluggy==1.5.0;python_version<"3.9" pluggy==1.6.0;python_version>="3.9" pytest==8.3.5;python_version<"3.9" -pytest==8.4.0;python_version>="3.9" +pytest==8.4.1;python_version>="3.9" pytest-html==4.0.2 pytest-metadata==3.1.1 pytest-ordering==0.6 pytest-rerunfailures==14.0;python_version<"3.9" pytest-rerunfailures==15.1;python_version>="3.9" pytest-xdist==3.6.1;python_version<"3.9" -pytest-xdist==3.7.0;python_version>="3.9" +pytest-xdist==3.8.0;python_version>="3.9" parameterized==0.9.0 behave==1.2.6 soupsieve==2.7 @@ -81,9 +81,9 @@ coverage>=7.9.1;python_version>="3.9" pytest-cov>=5.0.0;python_version<"3.9" pytest-cov>=6.2.1;python_version>="3.9" flake8==5.0.4;python_version<"3.9" -flake8==7.2.0;python_version>="3.9" +flake8==7.3.0;python_version>="3.9" mccabe==0.7.0 pyflakes==2.5.0;python_version<"3.9" -pyflakes==3.3.2;python_version>="3.9" +pyflakes==3.4.0;python_version>="3.9" pycodestyle==2.9.1;python_version<"3.9" -pycodestyle==2.13.0;python_version>="3.9" +pycodestyle==2.14.0;python_version>="3.9" diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index a3b2bab9812..058370c0b67 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.39.5" +__version__ = "4.39.6" diff --git a/seleniumbase/core/browser_launcher.py b/seleniumbase/core/browser_launcher.py index 3a9c7c6c28f..d8872a8cfc7 100644 --- a/seleniumbase/core/browser_launcher.py +++ b/seleniumbase/core/browser_launcher.py @@ -580,6 +580,7 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs): headless = False headed = None xvfb = None + xvfb_metrics = None binary_location = None if hasattr(sb_config, "headless"): headless = sb_config.headless @@ -587,6 +588,8 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs): headed = sb_config.headed if hasattr(sb_config, "xvfb"): xvfb = sb_config.xvfb + if hasattr(sb_config, "xvfb_metrics"): + xvfb_metrics = sb_config.xvfb_metrics if hasattr(sb_config, "binary_location"): binary_location = sb_config.binary_location @@ -599,6 +602,7 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs): headless=headless, headed=headed, xvfb=xvfb, + xvfb_metrics=xvfb_metrics, browser_executable_path=binary_location, ) ) @@ -963,6 +967,11 @@ def __install_pyautogui_if_missing(): backend="xvfb", use_xauth=True, ) + if "--debug-display" in sys.argv: + print( + "Starting VDisplay from browser_launcher: (%s, %s)" + % (xvfb_width, xvfb_height) + ) _xvfb_display.start() sb_config._virtual_display = _xvfb_display sb_config.headless_active = True diff --git a/seleniumbase/core/sb_cdp.py b/seleniumbase/core/sb_cdp.py index 50dc7651d35..dbace979441 100644 --- a/seleniumbase/core/sb_cdp.py +++ b/seleniumbase/core/sb_cdp.py @@ -1439,6 +1439,10 @@ def __install_pyautogui_if_missing(self): shared_utils.is_linux() and (not sb_config.headed or sb_config.xvfb) and not driver.config.headless + and ( + not hasattr(sb_config, "_virtual_display") + or not sb_config._virtual_display + ) ): from sbvirtualdisplay import Display xvfb_width = 1366 @@ -1466,6 +1470,11 @@ def __install_pyautogui_if_missing(self): backend="xvfb", use_xauth=True, ) + if "--debug-display" in sys.argv: + print( + "Starting VDisplay from sb_cdp: (%s, %s)" + % (xvfb_width, xvfb_height) + ) xvfb_display.start() def __get_configured_pyautogui(self, pyautogui_copy): diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py index 7f9e159e650..8714785b2e6 100644 --- a/seleniumbase/fixtures/base_case.py +++ b/seleniumbase/fixtures/base_case.py @@ -14164,7 +14164,13 @@ def __activate_virtual_display(self): backend="xvfb", use_xauth=True, ) + if "--debug-display" in sys.argv: + print( + "Starting VDisplay from base_case: (%s, %s)" + % (self._xvfb_width, self._xvfb_height) + ) self._xvfb_display.start() + sb_config._virtual_display = self._xvfb_display if "DISPLAY" not in os.environ.keys(): print( "\nX11 display failed! Will use regular xvfb!" diff --git a/seleniumbase/undetected/cdp_driver/cdp_util.py b/seleniumbase/undetected/cdp_driver/cdp_util.py index 3173a7ae5c1..4e65f59e933 100644 --- a/seleniumbase/undetected/cdp_driver/cdp_util.py +++ b/seleniumbase/undetected/cdp_driver/cdp_util.py @@ -51,7 +51,14 @@ def __activate_virtual_display_as_needed( headless, headed, xvfb, xvfb_metrics ): """This is only needed on Linux.""" - if IS_LINUX and (not headed or xvfb): + if ( + IS_LINUX + and (not headed or xvfb) + and ( + not hasattr(sb_config, "_virtual_display") + or not sb_config._virtual_display + ) + ): from sbvirtualdisplay import Display pip_find_lock = fasteners.InterProcessLock( constants.PipInstall.FINDLOCK @@ -87,6 +94,11 @@ def __activate_virtual_display_as_needed( backend="xvfb", use_xauth=True, ) + if "--debug-display" in sys.argv: + print( + "Starting VDisplay from cdp_util: (%s, %s)" + % (_xvfb_width, _xvfb_height) + ) _xvfb_display.start() if "DISPLAY" not in os.environ.keys(): print( diff --git a/setup.py b/setup.py index 254bfcbe957..1931a3333d2 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ print("You are currently using Python %s\n" % current_ver) sys.exit() print("\n*** Checking code health with flake8:\n") - os.system("python -m pip install 'flake8==7.2.0'") + os.system("python -m pip install 'flake8==7.3.0'") flake8_status = os.system("flake8 --exclude=recordings,temp") if flake8_status != 0: print("\nERROR! Fix flake8 issues before publishing to PyPI!\n") @@ -174,7 +174,7 @@ 'parse-type>=0.6.4', 'colorama>=0.4.6', 'pyyaml>=6.0.2', - 'pygments>=2.19.1', + 'pygments>=2.19.2', 'pyreadline3>=3.5.3;platform_system=="Windows"', "tabcompleter>=1.4.0", "pdbp>=1.7.0", @@ -182,7 +182,7 @@ 'chardet==5.2.0', 'charset-normalizer>=3.4.2,<4', 'urllib3>=1.26.20,<2;python_version<"3.10"', - 'urllib3>=1.26.20,<2.5.0;python_version>="3.10"', + 'urllib3>=1.26.20,<2.6.0;python_version>="3.10"', 'requests==2.32.4', 'sniffio==1.3.1', 'h11==0.16.0', @@ -203,14 +203,14 @@ 'pluggy==1.5.0;python_version<"3.9"', 'pluggy==1.6.0;python_version>="3.9"', 'pytest==8.3.5;python_version<"3.9"', - 'pytest==8.4.0;python_version>="3.9"', + 'pytest==8.4.1;python_version>="3.9"', "pytest-html==4.0.2", # Newer ones had issues 'pytest-metadata==3.1.1', "pytest-ordering==0.6", 'pytest-rerunfailures==14.0;python_version<"3.9"', 'pytest-rerunfailures==15.1;python_version>="3.9"', 'pytest-xdist==3.6.1;python_version<"3.9"', - 'pytest-xdist==3.7.0;python_version>="3.9"', + 'pytest-xdist==3.8.0;python_version>="3.9"', 'parameterized==0.9.0', "behave==1.2.6", 'soupsieve==2.7', @@ -242,12 +242,12 @@ # Usage: flake8 "flake8": [ 'flake8==5.0.4;python_version<"3.9"', - 'flake8==7.2.0;python_version>="3.9"', + 'flake8==7.3.0;python_version>="3.9"', "mccabe==0.7.0", 'pyflakes==2.5.0;python_version<"3.9"', - 'pyflakes==3.3.2;python_version>="3.9"', + 'pyflakes==3.4.0;python_version>="3.9"', 'pycodestyle==2.9.1;python_version<"3.9"', - 'pycodestyle==2.13.0;python_version>="3.9"', + 'pycodestyle==2.14.0;python_version>="3.9"', ], # pip install -e .[ipdb] # (Not needed for debugging anymore. SeleniumBase now includes "pdbp".) @@ -275,7 +275,7 @@ # (An optional library for image-processing.) "pillow": [ 'Pillow>=10.4.0;python_version<"3.9"', - 'Pillow>=11.2.1;python_version>="3.9"', + 'Pillow>=11.3.0;python_version>="3.9"', ], # pip install -e .[pip-system-certs] # (If you see [SSL: CERTIFICATE_VERIFY_FAILED], then get this.)