From 3f742c4ddb006b82ce94ab741d04f2e745b8a42b Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 6 Aug 2024 16:43:58 +0300 Subject: [PATCH] Feat(bkmk_rrequests): Install socks dependency --- bkmk_db-venv | 2 +- doc/ANNOUNCE | 5 +++++ doc/ChangeLog | 5 +++++ robots.py | 2 +- setup.py | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bkmk_db-venv b/bkmk_db-venv index 6b8f65e..085c919 100644 --- a/bkmk_db-venv +++ b/bkmk_db-venv @@ -8,7 +8,7 @@ if [ -z "$VIRTUAL_ENV" ]; then } && . bkmk_db-venv/bin/activate && pip install --compile --upgrade beautifulsoup4 lxml m_lib.full \ - requests requests-ftp \ + "requests[socks]" requests-ftp \ pycurl certifi \ aiohttp aioftp } diff --git a/doc/ANNOUNCE b/doc/ANNOUNCE index bb7b34a..fe8cf61 100644 --- a/doc/ANNOUNCE +++ b/doc/ANNOUNCE @@ -13,6 +13,11 @@ Version 5.5.1 (2024-08-??) Do not route ftp requests via http(s) proxy; socks5 proxies are ok. + Install socks dependency for python-requests. + + Default list of robots is now curl,requests,aiohttp,forking; + aiohttp doesn't properly work with SOCKS5 proxies. + Version 5.5.0 (2024-08-06) Robot based on aiohttp. diff --git a/doc/ChangeLog b/doc/ChangeLog index 0d40430..47013f5 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -4,6 +4,11 @@ Version 5.5.1 (2024-08-??) Do not route ftp requests via http(s) proxy; socks5 proxies are ok. + Install socks dependency for python-requests. + + Default list of robots is now curl,requests,aiohttp,forking; + aiohttp doesn't properly work with SOCKS5 proxies. + Version 5.5.0 (2024-08-06) Robot based on aiohttp. diff --git a/robots.py b/robots.py index 06ce1fe..d509a2f 100644 --- a/robots.py +++ b/robots.py @@ -16,7 +16,7 @@ from os import environ from bkmk_objects import parse_params, set_params robot_names, robot_params = parse_params( - environ.get("BKMK_ROBOT", "aiohttp,curl,requests,forking")) + environ.get("BKMK_ROBOT", "curl,requests,aiohttp,forking")) def import_robot(robot_name): diff --git a/setup.py b/setup.py index f6f6e01..d604383 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ setup( ], extras_require={ 'html': ['beautifulsoup4', 'lxml'], - 'requests': ['requests', 'requests-ftp'], + 'requests': ['requests[socks]', 'requests-ftp'], 'curl': ['pycurl', 'certifi'], 'aiohttp:python_version>="3.4"': ['aiohttp', 'aioftp'], }, -- 2.39.5