From d399ef05d124e455049082f2180111744039eb16 Mon Sep 17 00:00:00 2001 From: Alexandre Muller Date: Mon, 4 Sep 2023 09:52:20 +0200 Subject: [PATCH 1/3] chore: remove py dependency --- .../drivers/crossbrowsertesting.py | 18 ++++------ src/pytest_selenium/drivers/saucelabs.py | 33 +++++++------------ src/pytest_selenium/drivers/testingbot.py | 20 ++++------- 3 files changed, 26 insertions(+), 45 deletions(-) diff --git a/src/pytest_selenium/drivers/crossbrowsertesting.py b/src/pytest_selenium/drivers/crossbrowsertesting.py index 9c9683c..7cbffc5 100644 --- a/src/pytest_selenium/drivers/crossbrowsertesting.py +++ b/src/pytest_selenium/drivers/crossbrowsertesting.py @@ -2,7 +2,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -from py.xml import html +import html import pytest from pytest_selenium.drivers.cloud import Provider @@ -113,13 +113,9 @@ def driver_kwargs(request, test, capabilities, **kwargs): def _video_html(video): - html.__tagspec__.update(dict([(x, 1) for x in ("video", "source")])) - video_attrs = { - "controls": "", - "poster": video.get("image"), - "play-pause-on-click": "", - "style": "border:1px solid #e6e6e6; float:right; height:240px; " - "margin-left:5px; overflow:hidden; width:320px", - } - source_attrs = {"src": video.get("video"), "type": "video/mp4"} - return str(html.video(html.source(**source_attrs), **video_attrs)) + return ( + f'" + ) diff --git a/src/pytest_selenium/drivers/saucelabs.py b/src/pytest_selenium/drivers/saucelabs.py index dff8abe..10abc84 100644 --- a/src/pytest_selenium/drivers/saucelabs.py +++ b/src/pytest_selenium/drivers/saucelabs.py @@ -5,7 +5,6 @@ import os import json -from py.xml import html import pytest from pytest_selenium.drivers.cloud import Provider @@ -151,26 +150,18 @@ def _video_html(session): session=session ) - return str( - html.div( - html.object( - html.param(value="true", name="allowfullscreen"), - html.param(value="always", name="allowscriptaccess"), - html.param(value="high", name="quality"), - html.param(value="#000000", name="bgcolor"), - html.param(value=flash_vars.replace(" ", ""), name="flashvars"), - width="100%", - height="100%", - type="application/x-shockwave-flash", - data="https://cdn1.saucelabs.com/sauce_skin_deprecated/lib/" - "flowplayer/flowplayer-3.2.17.swf", - name="player_api", - id="player_api", - ), - id="player{session}".format(session=session), - style="border:1px solid #e6e6e6; float:right; height:240px;" - "margin-left:5px; overflow:hidden; width:320px", - ) + return ( + f'
' + '' + '' + '' + '' + '' + f'' + "" + "
" ) diff --git a/src/pytest_selenium/drivers/testingbot.py b/src/pytest_selenium/drivers/testingbot.py index b9fa89f..3f0ee82 100644 --- a/src/pytest_selenium/drivers/testingbot.py +++ b/src/pytest_selenium/drivers/testingbot.py @@ -5,7 +5,6 @@ from hashlib import md5 import pytest -from py.xml import html from pytest_selenium.drivers.cloud import Provider @@ -107,18 +106,13 @@ def driver_kwargs(request, test, capabilities, host, port, **kwargs): def _video_html(video_url, session): - return str( - html.div( - html.video( - html.source(src=video_url, type="video/mp4"), - width="100%", - height="100%", - controls="controls", - ), - id="mediaplayer{session}".format(session=session), - style="border:1px solid #e6e6e6; float:right; height:240px;" - "margin-left:5px; overflow:hidden; width:320px", - ) + return ( + f'
' + '" + "
" ) From 788c76268242dd67add532541d86cad6760de3d8 Mon Sep 17 00:00:00 2001 From: Alexandre Muller Date: Mon, 4 Sep 2023 16:31:34 +0200 Subject: [PATCH 2/3] docker: fix context path --- docker/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 146d794..c51a6e1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -67,7 +67,7 @@ services: webserver: container_name: webserver build: - context: docker + context: . environment: - PYTHONDONTWRITEBYTECODE=1 networks: From 965bd12738aa7d9c69eda1700e17d3cecd90bf9e Mon Sep 17 00:00:00 2001 From: Alexandre Muller Date: Mon, 4 Sep 2023 14:34:13 +0200 Subject: [PATCH 3/3] Release v4.0.2 --- docs/news.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/news.rst b/docs/news.rst index 16627c0..1b29360 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,15 @@ Release Notes ============= +4.0.2 (2023-09-13) +------------------ + +* Remove py dependency + + * Thanks to `@treiher `_ for reporting the issue. + + * Thanks to `@sandre35 `_ for the PR. + 4.0.1 (2023-05-28) ------------------