diff --git a/dev-python/selenium/Manifest b/dev-python/selenium/Manifest index 7634781388f81..9b5408eab629f 100644 --- a/dev-python/selenium/Manifest +++ b/dev-python/selenium/Manifest @@ -4,7 +4,10 @@ DIST selenium-4.46.0.tar.gz 1006000 BLAKE2B c3277f8c98a368b3bac948e62437771231bf DIST selenium-4.46.0.tar.gz.provenance 9688 BLAKE2B de5716d5d5b1789c2ccbfaccb2934f4c76f639abf5077c7e13c4603e81104a1a32d41df2bc2da71d37d5992a1f4da5acdaa95f46a46e9233fafdff760eea1bd8 SHA512 3a22178896bbea8b8ce15fdd9f78dc977a4197354150e23659dd43bbb521228bd26a71f4132053ae5f08e5d7370cfb9246282d59bbb3294d24fb4abb4e9a272c DIST selenium-4.47.0.tar.gz 1014095 BLAKE2B 09377d2e0e7161d59e56ba9b1c4eb23295c77ef566ce7c9d046e040721f864b82b9ed56e77c2e45a1b7d168f226ae4d6557d5cdf91d0eeeb7cbf651c8d834a60 SHA512 5d71cd8e7ff916eb869296700f06080344025832397e90231713098716da1033a1b3023d1f5508a28f927e8f0981d4a5f8f83f6af57409783314919a27d3b7c2 DIST selenium-4.47.0.tar.gz.provenance 9602 BLAKE2B 26f363c77fcc2dfa1e4f65775f5cdd002c5667b1a06d6ea7ba29cd3d947afb23aca02a8c01d79c91a3d2462b46478d235bc5d371fbf3077638c381e12722e1ec SHA512 85710e3d327b1d8e4160e4245ec2e8ed2b2455dcae2439be8b476a850878a995b8ab12d6af7d4a2bf178aa824c6234a5decd76a5d721ef1e53210af918dbad7d +DIST selenium-4.48.0.tar.gz 1055269 BLAKE2B b32ee5a3173349ea84a1e02a0597c97b16bab9cf6befc06f7c25819dcb386aa6a261a31094f2f34472516b02b6ac082f025596a017f1a2fa010a8682dff7e254 SHA512 a53099b8928f34de45ebb56c2d400897997d5d3f91b9dd8d986cfc8b82fb7b4843464b5de4a5610b0741af596f23c3195fa9d2d4a20739ace48c7b8147efa289 +DIST selenium-4.48.0.tar.gz.provenance 9510 BLAKE2B 64930b11f482d836deb355698076bc7b6d69503cc71210ac287d6b666d7ba7af2a489732fbd05ecb745b4ae6d4427f10ab5417f160f9ad5bcdbaf576026620fe SHA512 39b4104f5e9bc8df64e100a20113558496913a344c27610fa558507d97c17cba78c76e181eacdcd7317c1473d09eed5946a85479fbe48402e13a923c906d5886 DIST selenium-selenium-4.34.2-python.gh.tar.gz 52515190 BLAKE2B 319a7083d5942c1962b4f48f907fea12943a403e4490f74f3cd38662f1c63f57270b27b6039a5a8f29a980540cd0dcf1d1c7560c7ac126f07e491983dc0e81ef SHA512 5ca0b6e970ded3dc93cd55a2c1af7c43063d87f57f119a011313eb7d08faa4057896a56d4eac2e13d39857c94b54f04840a053153cc39008c76cbdd33c8ddbba DIST selenium-selenium-4.35.0.gh.tar.gz 52550104 BLAKE2B b7ed0fb513cfb2ed24aa8393497b349f930739c3d24a330e5942fbaa5505f31d7086396a430776a3a28a5f65927b92bf27c0a32e8c36d893b5d62ef73151d5ef SHA512 dc73829e3b0fcb7fb7ee1cc04574b95b63d23f67974575dbd66338e14a5cb2b06f983145ce874be0d7124e8828b0a41b99c75d3befb19e04cbf8d027d0bb983a DIST selenium-selenium-4.46.0.gh.tar.gz 43968307 BLAKE2B 83554d041f8fb060d74e326494ada681c27dcf1457d705e7c6c91b92f7342cd8675c2954cf34ffabec445d542f824d88bf610e27778dd5363a713bf96b9ee89a SHA512 4a5317252dfaf90bac5689b0df83a19cb9e1dfd03fdb7de1f6d1ec03c50803c444cf89f231e34d6d26971f7275ab30179bcb35883533dc132d49beba9d96462c DIST selenium-selenium-4.47.0.gh.tar.gz 44062095 BLAKE2B d6ce15ce857d3dd0e796935981e419be5357d49921ff76d5bcdf508408022234a2f96859e961b29e62666d3f28875910384900701629a4646b809f1b9c0e8617 SHA512 bb8dc827715fcb276211dd9800e8a375fa2b59b4e42a2952091946c7df2dabe226517633191da3b134d7fdd1554b0643added277be577fe4985dc54d141fad5d +DIST selenium-selenium-4.48.0.gh.tar.gz 44169864 BLAKE2B 6c3073b38b660f73fbfd1b683403d851c62ef1fd13a8d6f4e2df60e562e895ea323cdd999686e70d22b3a40e2cd0194b27cd88a4b4bbbe2dd4795ece30496659 SHA512 f1e5a02d9b2946586263b50be33aea75c3cc98013bafcbe52f8c787f497011528c25d392c0af3af0b3a0023ddfe1a87ab10eb3e813eef6feff3bd9bbe285cd77 diff --git a/dev-python/selenium/selenium-4.48.0.ebuild b/dev-python/selenium/selenium-4.48.0.ebuild new file mode 100644 index 0000000000000..87e257bb720d2 --- /dev/null +++ b/dev-python/selenium/selenium-4.48.0.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_VERIFY_REPO=https://github.com/SeleniumHQ/selenium +PYTHON_TESTED=( python3_{12..15} ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" ) + +inherit distutils-r1 pypi + +# base releases are usually ${P}, followups ${P}-python +TEST_TAG=${P} +[[ ${PV} != *.0 ]] && TEST_TAG+=-python +TEST_P=selenium-${TEST_TAG} + +DESCRIPTION="Python language binding for Selenium Remote Control" +HOMEPAGE=" + https://seleniumhq.org/ + https://github.com/SeleniumHQ/selenium/tree/trunk/py/ + https://pypi.org/project/selenium/ +" +SRC_URI+=" + test? ( + https://github.com/SeleniumHQ/selenium/archive/${TEST_TAG}.tar.gz + -> ${TEST_P}.gh.tar.gz + ) +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86" +IUSE="test test-rust" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/certifi-2026.1.4[${PYTHON_USEDEP}] + >=dev-python/trio-0.31.0[${PYTHON_USEDEP}] + >=dev-python/trio-websocket-0.12.2[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.15.0[${PYTHON_USEDEP}] + >=dev-python/urllib3-2.6.0[${PYTHON_USEDEP}] + >=dev-python/websocket-client-1.8.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + ${RDEPEND} + $(python_gen_cond_dep " + dev-python/filetype[\${PYTHON_USEDEP}] + dev-python/pytest-mock[\${PYTHON_USEDEP}] + dev-python/rich[\${PYTHON_USEDEP}] + test-rust? ( + dev-python/pytest[\${PYTHON_USEDEP}] + dev-python/pytest-rerunfailures[\${PYTHON_USEDEP}] + >=dev-util/selenium-manager-${PV} + net-misc/geckodriver + || ( + www-client/firefox + www-client/firefox-bin + ) + ) + " "${PYTHON_TESTED[@]}") + ) +" + +src_prepare() { + distutils-r1_src_prepare + + # do not build selenium-manager implicitly + sed -e 's:\[tool\.setuptools-rust:[tool.ignore-me:' \ + -i pyproject.toml || die + # unpin deps + sed -i -e 's:,<[0-9.]*::' pyproject.toml || die + # remove nonsense typing deps + sed -i -e '/types/d' -e '/typing/d' pyproject.toml || die +} + +python_test() { + # NB: xdist is causing random pytest crashes with high job numbers + + if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then + einfo "Skipping tests on ${EPYTHON}" + return + fi + + local EPYTEST_PLUGINS=( pytest-mock ) + local EPYTEST_IGNORE=() + local EPYTEST_DESELECT=( + # expects vanilla certifi + test/unit/selenium/webdriver/remote/remote_connection_tests.py::test_get_connection_manager_for_certs_and_timeout + ) + local pytest_args=( + # https://github.com/SeleniumHQ/selenium/blob/selenium-4.8.2-python/py/test/runner/run_pytest.py#L20-L24 + # seriously? + -o "python_files=*_tests.py test_*.py" + ) + if use test-rust; then + local -x PATH=${T}/bin:${PATH} + local -x SE_MANAGER_PATH="$(type -P selenium-manager)" + + local EPYTEST_RERUNS=5 + pytest_args+=( + --driver=firefox + --browser-binary="$(type -P firefox || type -P firefox-bin)" + --driver-binary="$(type -P geckodriver)" + --headless + ) + + EPYTEST_IGNORE+=( + # throws some error that pytest doesn't even show + test/selenium/webdriver/firefox/ff_installs_addons_tests.py + test/selenium/webdriver/common/bidi/ + ) + EPYTEST_DESELECT+=( + # expects prebuilt executables for various systems + test/selenium/webdriver/common/selenium_manager_tests.py::test_uses_windows + test/selenium/webdriver/common/selenium_manager_tests.py::test_uses_linux + test/selenium/webdriver/common/selenium_manager_tests.py::test_uses_mac + test/selenium/webdriver/common/selenium_manager_tests.py::test_errors_if_invalid_os + + # TODO: these don't respect --*-binary and try to fetch versions + test/selenium/webdriver/firefox/ + test/selenium/webdriver/marionette/mn_context_tests.py::test_context_sets_correct_context_and_returns + test/selenium/webdriver/marionette/mn_context_tests.py::test_context_sets_correct_context_and_returns + test/selenium/webdriver/marionette/mn_options_tests.py::TestIntegration::test_we_can_pass_options + test/selenium/webdriver/marionette/mn_set_context_tests.py::test_we_can_switch_context_to_chrome + + # TODO + 'test/selenium/webdriver/common/devtools_tests.py::test_check_console_messages[firefox]' + test/selenium/webdriver/common/_bidi/ + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_binary + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_ctor + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_prefs + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_to_capabilities + test/selenium/webdriver/remote/remote_custom_locator_tests.py::test_find_element_with_custom_locator + test/selenium/webdriver/remote/remote_custom_locator_tests.py::test_find_elements_with_custom_locator + + # Internet + test/selenium/webdriver/remote/remote_server_tests.py::test_download_latest_server + test/selenium/webdriver/remote/remote_hub_connection_tests.py::test_command_executor_ssl_certificate_is_verified + ) + else + EPYTEST_IGNORE+=( + test/selenium + ) + fi + + cd "${WORKDIR}/${TEST_P}/py" || die + rm -rf selenium || die + epytest "${pytest_args[@]}" +}