Skip to content

Commit

Permalink
requirements: pin urllib3 version to prevent request problems (#440)
Browse files Browse the repository at this point in the history
* requirements: pin urllib3 version to prevent request problems
* lint: temporary workaround for pyxdg pyright issues

Co-authored-by: Alex Lowe <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
  • Loading branch information
cmatsuoka and lengau authored May 9, 2023
1 parent 438951f commit 0ba53db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def is_rtd() -> bool:
"pyxdg",
"requests",
"requests-unixsocket",
"urllib3<2", # keep compatible API
]


Expand Down
10 changes: 8 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")})

Expand Down

0 comments on commit 0ba53db

Please sign in to comment.