From 994392baab1e2c50abaf00378415bd7d8ecc67dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 07:46:21 +0000 Subject: [PATCH 1/3] Initial plan From ac9cf382652de50d0ba78d7c7ea05bb02294b2f0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 07:49:27 +0000 Subject: [PATCH 2/3] Fix CLI event loop deprecation/hang on Python 3.10+ Replace deprecated `asyncio.get_event_loop_policy().get_event_loop()` with `asyncio.new_event_loop()` + `asyncio.set_event_loop()`. The old call emits DeprecationWarning on Python 3.10/3.11 and fails to create a loop on Python 3.12+ (where `get_event_loop()` no longer implicitly creates one when none is running), causing `proxybroker find` to appear stuck as seen in the reported issue. Agent-Logs-Url: https://github.com/bluet/proxybroker2/sessions/e64ce58c-346d-4c63-83d6-f9a0c61ec979 Co-authored-by: bluet <51141+bluet@users.noreply.github.com> --- proxybroker/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxybroker/cli.py b/proxybroker/cli.py index 93665c4c..f7439f7a 100644 --- a/proxybroker/cli.py +++ b/proxybroker/cli.py @@ -388,7 +388,8 @@ def cli(args=sys.argv[1:]): ns.types.remove("HTTP") ns.types.append(("HTTP", ns.anon_lvl)) - loop = asyncio.get_event_loop_policy().get_event_loop() + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) proxies = asyncio.Queue() broker = Broker( proxies, From 02403c27ca16369b63432e2e8d921cd62bad8e8a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 11:30:56 +0000 Subject: [PATCH 3/3] Fix ReadTheDocs build: support multi-line __copyright__ in conf.py metadata regex Agent-Logs-Url: https://github.com/bluet/proxybroker2/sessions/d4af710f-ebcf-4c5d-815e-76e7bc4d9410 Co-authored-by: bluet <51141+bluet@users.noreply.github.com> --- docs/source/conf.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2d80640e..48777f86 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -53,7 +53,14 @@ def get_version(): # Get metadata from __init__.py (everything except version) with codecs.open(_path_to_init, mode="r", encoding="utf-8") as f: content = f.read() - _INFO = dict(re.findall(r"__(\w+)__ = ['\"]([^'\"]+)['\"]", content, re.MULTILINE)) + # Match both `__x__ = "value"` and `__x__ = ("value")` (possibly across lines) + _INFO = dict( + re.findall( + r"__(\w+)__\s*=\s*\(?\s*['\"]([^'\"]+)['\"]\s*\)?", + content, + re.MULTILINE | re.DOTALL, + ) + ) # Get version from pyproject.toml (single source of truth) _INFO["version"] = get_version()