Use non-deprecated user_agent_entry param in DatabricksSqlHook - #72103
Conversation
e81f760 to
f9f08e0
Compare
f9f08e0 to
c569929
Compare
|
cc @moomindani for Databricks review |
moomindani
left a comment
There was a problem hiding this comment.
LGTM — approving.
Checked the part that actually decides whether this is safe, namely whether the new spelling exists at the provider's declared connector floor. In databricks-sql-connector v4.3.0 and v4.4.0, Session.__init__ reads kwargs.get("user_agent_entry") first and only falls back to _user_agent_entry, emitting the deprecation warning you describe when it has to. This provider requires databricks-sql-connector>=4.4.0 (pyproject.toml:66), so every version it can install accepts the new name — the change cannot silently drop the user-agent entry on a supported connector.
Also confirmed this was the only occurrence: _user_agent_entry appears exactly once in the provider, at the line you changed, and no test asserts the kwarg name, so nothing else needs updating.
Drafted-by: Claude Code (Opus 5); reviewed by @moomindani before posting
databricks-sql-connector renamed _user_agent_entry to user_agent_entry and only keeps the old name for backward compatibility, logging a deprecation warning on every connection opened through DatabricksSqlHook.get_conn(). Pass the current parameter name instead.
c569929 to
3de2506
Compare
…e#72103) databricks-sql-connector renamed _user_agent_entry to user_agent_entry and only keeps the old name for backward compatibility, logging a deprecation warning on every connection opened through DatabricksSqlHook.get_conn(). Pass the current parameter name instead.
…e#72103) databricks-sql-connector renamed _user_agent_entry to user_agent_entry and only keeps the old name for backward compatibility, logging a deprecation warning on every connection opened through DatabricksSqlHook.get_conn(). Pass the current parameter name instead.
closes: #72102
databricks-sql-connector'sSessionrenamed_user_agent_entrytouser_agent_entryand only keeps the old name for backward compatibility,logging a deprecation warning on every connection opened through
DatabricksSqlHook.get_conn(). This switches the hook to the currentparameter name.
No behavior change:
user_agent_entryis supported by everydatabricks-sql-connector version this provider currently allows
(>=4.4.0).
Was generative AI tooling used to co-author this PR?