Repository navigation
feat: make pytest-base-url an optional dependency - #334
Merged
Merged
Conversation
Pavel Feldman (pavelfeldman)
added this pull request to stack #335
October 7, 2026 23:05
Pavel Feldman (pavelfeldman)
force-pushed
the
feat-137-api-request-tracing
branch
from
October 8, 2026 01:32
56ce3c6 to
cf5d5ac
Compare
Pavel Feldman (pavelfeldman)
force-pushed
the
feat-311-optional-base-url
branch
from
October 8, 2026 01:32
ded5299 to
8cb8033
Compare
Pavel Feldman (pavelfeldman)
force-pushed
the
feat-311-optional-base-url
branch
5 times, most recently
from
October 8, 2026 02:12
1060d41 to
e0f9557
Compare
pytest-base-url (MPL-2.0) and its transitive requests/certifi dependencies get flagged by license scanners. Move it to an optional extra (pytest-playwright[base-url]). When it is not installed, or disabled with -p no:base_url, the plugin provides --base-url (defaulting to $PYTEST_BASE_URL), the base_url ini option and the base_url fixture itself. Only --verify-base-url requires the extra. Fixes #311
…est with plugin autoload disabled, run the base-url tests without pytest-base-url in CI
Pavel Feldman (pavelfeldman)
force-pushed
the
feat-311-optional-base-url
branch
from
October 8, 2026 02:18
e0f9557 to
688cb5d
Compare
Pavel Feldman (pavelfeldman)
removed this pull request from stack #335
October 8, 2026 02:19
Pavel Feldman (pavelfeldman)
changed the base branch from
feat-137-api-request-tracing
to
main
October 8, 2026 02:21
…ntain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pytest-base-url (MPL-2.0) and its transitive
requests/certifidependencies get flagged by license scanners. It's now an optional extra,pip install pytest-playwright[base-url].When pytest-base-url is not in use, the plugin itself provides
--base-url(defaulting to$PYTEST_BASE_URL), thebase_urlini option and thebase_urlfixture. Only--verify-base-urlneeds the extra. Whether pytest-base-url is in use is decided inpytest_load_initial_conftests, once every plugin from-p, entry points and the initial conftests is registered, and the options are added there (the command line is parsed afterwards). This covers an installed but not loaded plugin (PYTEST_DISABLE_PLUGIN_AUTOLOAD=1),-p no:base_url, and-p base_urlor-p pytest_base_url.pluginin any order relative to this plugin. Environments that already have pytest-base-url installed behave as before.Tests:
--base-url, the ini option, the env var, and no value at all, each with pytest-base-url disabled; and plugin autoload disabled with and without pytest-base-url loaded explicitly (sync + async). A new CI job uninstalls pytest-base-url and runs the base-url tests, so the "not installed" path is covered as well. A fresh install no longer pulls in pytest-base-url, requests or certifi.Release note: anyone relying on
--verify-base-urlneedspytest-playwright[base-url]. Docs follow-up: the "Configure base-url" section on playwright.dev should mention the extra.Fixes #311
Stack created with GitHub Stacks CLI • Give Feedback 💬