MCPcopy Create free account
hub / github.com/ResearAI/DeepReviewer-v2 / _TimeoutSession

Class _TimeoutSession

pasa/pasa/utils.py:57–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55ARXIV_NUM_RETRIES = int(os.getenv("PASA_ARXIV_NUM_RETRIES", "2"))
56
57class _TimeoutSession(requests.Session):
58 def __init__(self, timeout: float) -> None:
59 super().__init__()
60 self._timeout = timeout
61
62 def request(self, *args, **kwargs):
63 kwargs.setdefault("timeout", self._timeout)
64 return super().request(*args, **kwargs)
65
66arxiv_client = arxiv.Client(delay_seconds = ARXIV_DELAY_SECONDS, num_retries = ARXIV_NUM_RETRIES)
67arxiv_client._session = _TimeoutSession(ARXIV_TIMEOUT)

Callers 1

utils.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected