summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoofar <toofar@spalge.com>2024-09-03 18:32:57 +1200
committertoofar <toofar@spalge.com>2024-09-03 19:02:52 +1200
commit433074c6817daa2fe25b0f9609af180ce3688dbe (patch)
tree1a51ec10ee726ab5829d25cee94cee84f8a2b3b5
parent213a163623db8033a1b99b39dc737159d88ad18f (diff)
downloadqutebrowser-433074c6817daa2fe25b0f9609af180ce3688dbe.tar.gz
qutebrowser-433074c6817daa2fe25b0f9609af180ce3688dbe.zip
Add importlib_resources to tests requirements file as workaround
Currently the dependency update job is failing[1] because one of the tests installs multiple requirements files before running the tests and it claims they have conflicting versions of `importlib_resources` (6.4.0 vs 6.4.4). 6.4.0 is in the pinned files and there is a 6.4.4 available. Looking though the logs the first time I see importlib_resources==6.4.0 is when printing the requirements for the `test` requirements file. But it's not mentioned at all when installing that file. Which makes me think it found it's way into the virtualenv by some other means. Looking at git blame for the test requirements lock file, it looks like importlib_resources was introduced in https://github.com/qutebrowser/qutebrowser/pull/8269 and indeed I can see version 6.4.0 in setuptools vendored folder[2]. So it looks like this is another issue caused by setuptools adding their vendored packages into sys.path. Options I can see for resolving this: a. add importlib_resources as a dependency in requirements.txt-raw so that we always pull down the newest one, even though we don't need it b. add an @ignore line for importlib_resources * I think in the unlikely event we end up needing it then it being ignored might be hard to spot c. drop python 3.8 support d. switch to a requirements compilation method that doesn't use `pip freeze` I've chosen (a) here because I think it's less surprising than (b), less work than (c) and I already have a PR up for (d). And it's only pulled down for 3.8 anyhow, so we'll drop this workaround when we drop that. [1]: https://github.com/qutebrowser/qutebrowser/actions/runs/10660624684/job/29544897516 [2]: https://github.com/pypa/setuptools/tree/main/setuptools/_vendor
-rw-r--r--misc/requirements/requirements-tests.txt-raw7
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/requirements/requirements-tests.txt-raw b/misc/requirements/requirements-tests.txt-raw
index 54e036106..923ccf7e3 100644
--- a/misc/requirements/requirements-tests.txt-raw
+++ b/misc/requirements/requirements-tests.txt-raw
@@ -31,4 +31,11 @@ pytest-xdist
# Needed to test misc/userscripts/qute-lastpass
tldextract
+# importlib_resources==6.4.0 is being included in the lock file via
+# setuptools' vendored dependencies and conflicting with the more up to date
+# one pulled down by other requirements files. Include it here even though we
+# don't need to to make sure we at least get an up to date one.
+importlib_resources
+#@ markers: importlib_resources python_version=="3.8.*"
+
#@ ignore: Jinja2, MarkupSafe, colorama