SSL Certificate Error Issue before and after Python 3.11.13 with Databricks Instance
还没有人认领这个 Issue。
评估
调研方向
从提供的 pyproject.toml 设置和 main.py 入口点开始,然后针对一个在所列 Python 版本中需要 SSL 证书的 Databricks 环境运行 uv 命令。使用 results.log 和报告的 SSLVerificationError 比较行为;在受影响的版本中,示例查询返回其表的行数即表示完成。
由索引模型根据 Issue 内容生成。
描述
Overview
When I try to use different versions of python to connect to a databricks environment, I get an SSL certificate issue. It appears to be resolved in 3.11.13 but is broken in versions below (e.g. 3.11.11) and above (3.12, 3.13). Please note that you will need to test with an environment that require an ssl certificate.
Recreation Steps
- Setup environment as below
- Run script
uv run main.py --python 3.11.11
Expected - The script will output a row count for the specific table
Actual - An SSLVerificationError will happen
Hardware Info
- macOS - 15.5
- chip - Apple M4 Pro
Affected Python Version
- 3.11.11, <3.11.13
- > 3.11.13
Setup
setup uv project
uv init dbks_testing --python
sample uv project template
[project]
name = "dbks-testing"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"databricks-sqlalchemy>=2.0.6",
]
script to verify issue
you will need to change the table variable to a valid table for your schema
def main():
access_token = os.getenv("DATABRICKS_TOKEN")
server_hostname = os.getenv("DATABRICKS_SERVER_HOSTNAME")
http_path = os.getenv("DATABRICKS_HTTP_PATH")
catalog = os.getenv("DATABRICKS_CATALOG")
schema = os.getenv("DATABRICKS_SCHEMA")
engine = create_engine(
url=f"databricks://token:{access_token}@{server_hostname}?" +
f"http_path={http_path}&catalog={catalog}&schema={schema}"
)
session = Session(engine)
account = Table(table, MetaData(schema=schema), autoload_with=engine)
print(f"Table count for {account.name} is {session.query(account).count()}")
if __name__ == "__main__":
# add logging
logging.getLogger("databricks.sql").setLevel(logging.DEBUG)
logging.basicConfig(filename="results.log",
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
# set variables need for main
table = "account"
main()
Run command in project
uv run main.py --python 3.11.11
- 主要语言
- Python
- 星标
- 233
- 派生
- 152
- 平均合并
- 21 小时 5 分钟
- 30 天内合并 PR
- 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
databricks/databricks-sql-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 84/100
查看 databricks/databricks-sql-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 86/100
-
🐛 Bug 🔔 Pending processing
难度 2/5 1-3 小时 新手友好度 84/100
jumpserver/jumpserver#17584 ·