From 18d92776e64980ed53d161efd02a780bf38f941f Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Fri, 5 May 2023 09:35:59 -0300 Subject: [PATCH 1/2] requirements: pin urllib3 version to prevent request problems Signed-off-by: Claudio Matsuoka --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 8718046a9..e86579935 100644 --- a/setup.py +++ b/setup.py @@ -47,6 +47,7 @@ def is_rtd() -> bool: "pyxdg", "requests", "requests-unixsocket", + "urllib3<2", # keep compatible API ] From 7269d6ff265520ef78f1dce3cdc146414b2fc999 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Tue, 9 May 2023 14:25:52 -0300 Subject: [PATCH 2/2] lint: temporary workaround for pyxdg pyright issues Co-authored-by: Alex Lowe Signed-off-by: Claudio Matsuoka --- tests/conftest.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 74baea2fc..a83a55cd3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -72,10 +72,16 @@ def temp_xdg(tmpdir, mocker): mocker.patch("xdg.BaseDirectory.xdg_data_home", new=os.path.join(tmpdir, ".local")) mocker.patch("xdg.BaseDirectory.xdg_cache_home", new=os.path.join(tmpdir, ".cache")) mocker.patch( - "xdg.BaseDirectory.xdg_config_dirs", new=[xdg.BaseDirectory.xdg_config_home] + "xdg.BaseDirectory.xdg_config_dirs", + new=[ + xdg.BaseDirectory.xdg_config_home # pyright: ignore[reportGeneralTypeIssues] + ], ) mocker.patch( - "xdg.BaseDirectory.xdg_data_dirs", new=[xdg.BaseDirectory.xdg_data_home] + "xdg.BaseDirectory.xdg_data_dirs", + new=[ + xdg.BaseDirectory.xdg_data_home # pyright: ignore[reportGeneralTypeIssues] + ], ) mocker.patch.dict(os.environ, {"XDG_CONFIG_HOME": os.path.join(tmpdir, ".config")})