diff --git a/.circleci/config.yml b/.circleci/config.yml index dfc766bc3..6f5283390 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 defaults: &defaults working_directory: ~/repo docker: - - image: pyodide/pyodide-env:14 + - image: pyodide/pyodide-env:15 environment: - EMSDK_NUM_CORES: 4 EMCC_CORES: 4 diff --git a/Dockerfile b/Dockerfile index d63c90e48..cb6e19c07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN pip3 --no-cache-dir install \ pytest-rerunfailures \ pytest-xdist \ pyyaml \ - "selenium~=3.141.0" + "selenium==4.0.0.b3" # Get firefox 70.0.1 and geckodriver RUN wget -qO- https://ftp.mozilla.org/pub/firefox/releases/87.0/linux-x86_64/en-US/firefox-87.0.tar.bz2 | tar jx \ diff --git a/conftest.py b/conftest.py index b4947e54b..abac22e5d 100644 --- a/conftest.py +++ b/conftest.py @@ -21,24 +21,9 @@ BUILD_PATH = ROOT_PATH / "build" sys.path.append(str(ROOT_PATH)) -from pyodide_build._fixes import _selenium_is_connectable # noqa: E402 from pyodide_build.testing import set_webdriver_script_timeout, parse_driver_timeout -def _monkeypatch_selenium(): - try: - import selenium.webdriver.common.utils # noqa: E402 - - # XXX: Temporary fix for ConnectionError in selenium - - selenium.webdriver.common.utils.is_connectable = _selenium_is_connectable - except ModuleNotFoundError: - pass - - -_monkeypatch_selenium() - - def pytest_addoption(parser): group = parser.getgroup("general") group.addoption( @@ -55,9 +40,11 @@ def pytest_addoption(parser): def pytest_configure(config): - """Monkey patch the function cwd_relative_nodeid returns the description - of a test for the short summary table. Monkey patch it to reduce the verbosity of the test names in the table. - This leaves enough room to see the information about the test failure in the summary. + """Monkey patch the function cwd_relative_nodeid + + returns the description of a test for the short summary table. Monkey patch + it to reduce the verbosity of the test names in the table. This leaves + enough room to see the information about the test failure in the summary. """ old_cwd_relative_nodeid = config.cwd_relative_nodeid diff --git a/pyodide_build/_fixes.py b/pyodide_build/_fixes.py deleted file mode 100644 index 993ce7dad..000000000 --- a/pyodide_build/_fixes.py +++ /dev/null @@ -1,23 +0,0 @@ -import socket - - -# Temporary fix from https://github.com/SeleniumHQ/selenium/pull/6480 -# to avoid ConnectionError in selenium - - -def _selenium_is_connectable(port, host="localhost"): - """ - Tries to connect to the server at port to see if it is running. - :Args: - - port - The port to connect. - """ - socket_ = None - try: - socket_ = socket.create_connection((host, port), 1) - result = True - except (socket.error, ConnectionError): - result = False - finally: - if socket_: - socket_.close() - return result diff --git a/run_docker b/run_docker index 047224170..30f92ded3 100755 --- a/run_docker +++ b/run_docker @@ -29,7 +29,7 @@ function error() { } -PYODIDE_IMAGE_TAG="14" +PYODIDE_IMAGE_TAG="15" PYODIDE_PREBUILT_IMAGE_TAG="0.17.0a2" DEFAULT_PYODIDE_DOCKER_IMAGE="pyodide/pyodide-env:${PYODIDE_IMAGE_TAG}" DEFAULT_PYODIDE_SYSTEM_PORT="8000"