crate / crate-python

Python DB API client library for CrateDB, using HTTP.
https://cratedb.com/docs/python/
Apache License 2.0
79 stars 30 forks source link

Permit `urllib3.Timeout` instances for defining timeout values #603

Closed amotl closed 7 months ago

amotl commented 7 months ago

About

Permit urllib3.Timeout instances for defining timeout values. Using that, you can configure both the socket connect and read timeout settings, in seconds.

Problem

When defining the timeout value as urllib3.Timeout instance,

HttpClient(crate_host, timeout=urllib3.Timeout(connect=0.01, read=None))

this error is raised:

float() argument must be a string or a real number, not 'Timeout'

References