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() 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,