Uh oh!
There was an error while loading. Please reload this page.
Synchronous connection pools without timeout fail in 1.0.1 #845
Answered
bykarpetrosyan
ToBeReplaced
asked this question in
Potential Issue
>>>importhttpcore, itertools; fromconcurrent.futuresimportThreadPoolExecutor>>>print(httpcore.__version__)
1.0.1>>>pool=httpcore.ConnectionPool(max_connections=1)
>>>gets=itertools.repeat("GET", 3)
>>>urls=itertools.repeat("https://github.com/encode/httpcore", 3)
>>>list(ThreadPoolExecutor().map(pool.request, gets, urls))
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/usr/local/lib/python3.11/concurrent/futures/_base.py", line619, inresult_iteratoryield_result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/concurrent/futures/_base.py", line317, in_result_or_cancelreturnfut.result(timeout)
^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/concurrent/futures/_base.py", line449, inresultreturnself.__get_result()
^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/concurrent/futures/_base.py", line401, in__get_resultraiseself._exceptionFile"/usr/local/lib/python3.11/concurrent/futures/thread.py", line58, inrunresult=self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/site-packages/httpcore/_sync/interfaces.py", line43, inrequestresponse=self.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line248, inhandle_requestraiseexcFile"/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line239, inhandle_requestconnection=status.wait_for_connection(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line36, inwait_for_connectionself._connection_acquired.wait(timeout=timeout)
File"/usr/local/lib/python3.11/site-packages/httpcore/_synchronization.py", line229, inwaitifnotself._event.wait(timeout=timeout):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/threading.py", line629, inwaitsignaled=self._cond.wait(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/threading.py", line331, inwaitgotit=waiter.acquire(True, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^OverflowError: timestampoutofrangeforplatformtime_tI believe the issue is caused by #823 , specifically f8ff1c4#diff-5713be2b281222b211bec1272100cb70677f728181a11c4ff06e6a10ae3c30d2R230 |
Answered by
karpetrosyan
Nov 8, 2023
Replies: 1 comment 2 replies
Whoops! Forgot to add... Thank you for maintaining this project. It is my tool of choice for reliable HTTP where having confidence in what is happening is paramount. |
2 replies
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Resolved in #846