{"record":{"id":"c6f81c65d270c1e7","repo":"lancedb/lancedb","slug":"read-timeout-is-deprecated-and-will-be-removed-in","errorCode":null,"errorMessage":"read_timeout is deprecated and will be removed in a future release. Please use client_config.timeout_config.read_timeout instead.","messagePattern":"read_timeout is deprecated and will be removed in a future release\\. Please use client_config\\.timeout_config\\.read_timeout instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/python/lancedb/remote/db.py","lineNumber":153,"sourceCode":"                \"a future release.\",\n                DeprecationWarning,\n                stacklevel=2,\n            )\n\n        if connection_timeout is not None:\n            warnings.warn(\n                \"connection_timeout is deprecated and will be removed in a future \"\n                \"release. Please use client_config.timeout_config.connect_timeout \"\n                \"instead.\",\n                DeprecationWarning,\n                stacklevel=2,\n            )\n            client_config.timeout_config.connect_timeout = timedelta(\n                seconds=connection_timeout\n            )\n\n        if read_timeout is not None:\n            warnings.warn(\n                \"read_timeout is deprecated and will be removed in a future release. \"\n                \"Please use client_config.timeout_config.read_timeout instead.\",\n                DeprecationWarning,\n                stacklevel=2,\n            )\n            client_config.timeout_config.read_timeout = timedelta(seconds=read_timeout)\n\n        parsed = urlparse(db_url)\n        if parsed.scheme != \"db\":\n            raise ValueError(f\"Invalid scheme: {parsed.scheme}, only accepts db://\")\n        self.db_url = db_url\n        self.api_key = api_key\n        self.region = region\n        self.host_override = host_override\n        self.sql_host_override = sql_host_override\n        self.storage_options = storage_options\n        self.db_name = parsed.netloc\n","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/lancedb/lancedb/blob/c7b051aff7039333a3f61b79217246c27676806a/python/python/lancedb/remote/db.py#L135-L171","documentation":"LanceDB's remote DB connection warns that the `read_timeout` constructor parameter is deprecated and will be removed. It still applies the value to `client_config.timeout_config.read_timeout`, so behavior is unchanged, but callers must move to the ClientConfig API before the parameter is removed.","triggerScenarios":"Calling `lancedb.connect(uri, ..., read_timeout=N)` on RemoteDBConnection (python/python/lancedb/remote/db.py __init__) with a non-None read_timeout while the deprecation shim is still in place.","commonSituations":"Upgrading lancedb in code that configured HTTP timeouts via the old keyword arguments; following older documentation or tutorials for LanceDB Cloud connection setup.","solutions":["Remove `read_timeout=N` from the connect() call.","Pass a ClientConfig instead: `client_config=ClientConfig(timeout_config=TimeoutConfig(read_timeout=timedelta(seconds=N)))`.","Suppress the DeprecationWarning only as a temporary measure while migrating."],"exampleFix":"// before\nimport lancedb\ndb = lancedb.connect('db://...', read_timeout=30)\n// after\nfrom datetime import timedelta\nfrom lancedb.remote import ClientConfig\nfrom lancedb import TimeoutConfig\ndb = lancedb.connect('db://...', client_config=ClientConfig(timeout_config=TimeoutConfig(read_timeout=timedelta(seconds=30))))","handlingStrategy":"validation","validationCode":"import warnings\nif kwargs.get('read_timeout') is not None:\n    warnings.warn('read_timeout is deprecated; use client_config.timeout_config.read_timeout', DeprecationWarning)","typeGuard":null,"tryCatchPattern":"import warnings\nwith warnings.catch_warnings():\n    warnings.filterwarnings('ignore', category=DeprecationWarning, message='read_timeout is deprecated')","preventionTips":["Configure all HTTP timeouts through ClientConfig/TimeoutConfig in new code.","Grep for `read_timeout=` in connect() calls during lancedb upgrades.","Run tests with -W error::DeprecationWarning to surface deprecated kwargs early."],"tags":["deprecation","python","http-client","configuration"],"backgroundTag":"deprecated-api-usage","analyzedSha":"c7b051aff7039333a3f61b79217246c27676806a","analyzedAt":"2026-09-08T23:42:37.579Z","contentChangedAt":"2026-09-08T23:42:37.579Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}