-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (123 loc) · 5.04 KB
/
pyproject.toml
File metadata and controls
135 lines (123 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[tool.poetry]
name = "databricks-sql-connector"
version = "4.3.0rc1"
description = "Databricks SQL Connector for Python"
authors = ["Databricks <databricks-sql-connector-maintainers@databricks.com>"]
license = "Apache-2.0"
readme = "README.md"
packages = [{ include = "databricks", from = "src" }]
include = ["CHANGELOG.md"]
[tool.poetry.dependencies]
python = "^3.8.0"
thrift = "~=0.22.0"
pandas = [
{ version = ">=1.2.5,<4.0.0", python = ">=3.8,<3.13" },
{ version = ">=2.2.3,<4.0.0", python = ">=3.13" }
]
lz4 = [
{ version = "^4.0.2", python = ">=3.8,<3.14" },
{ version = "^4.4.5", python = ">=3.14" }
]
requests = "^2.18.1"
oauthlib = "^3.1.0"
openpyxl = "^3.0.10"
urllib3 = ">=1.26"
python-dateutil = "^2.8.0"
pyarrow = [
# The <3.10 band is capped at <23 because pyarrow>=23 dropped
# Python 3.9 (it requires >=3.10). Without the cap, poetry tries to
# unify this entry with the kernel's transitive pyarrow>=23.0.1,<24
# across the 3.8–3.10 slice and `poetry lock` fails ("pyarrow is
# forbidden"). The cap removes no installable version — the newest
# pyarrow with a 3.9 wheel is 21.x — it just makes that explicit to
# the solver so the optional [kernel] extra (python>=3.10) can
# coexist. See the kernel dep + [kernel] extra below.
{ version = ">=14.0.1,<23", python = ">=3.8,<3.10", optional=true },
{ version = ">=14.0.1", python = ">=3.10,<3.13", optional=true },
{ version = ">=18.0.0", python = ">=3.13,<3.14", optional=true },
{ version = ">=22.0.0", python = ">=3.14", optional=true }
]
pyjwt = "^2.0.0"
pybreaker = "^1.0.0"
requests-kerberos = {version = "^0.15.0", optional = true}
# Optional Rust kernel backend for ``use_kernel=True`` (PyO3 wheel).
# Pulled in only via the ``[kernel]`` extra below. The published wheel
# is ``abi3`` with ``Requires-Python: >=3.10`` (built ``abi3-py310``),
# so the dependency is gated to Python >= 3.10: on 3.8/3.9 the
# ``[kernel]`` extra resolves to nothing and ``use_kernel=True`` raises
# a clear ImportError at runtime (see backend/kernel/_errors.py).
#
# Floor is 0.2.0 (``^0.2.0`` == ``>=0.2.0,<0.3.0``). The kernel is
# pre-1.0, so each 0.x minor may carry breaking changes — the ``<0.3.0``
# cap means we bump this deliberately when the kernel ships 0.3.0 rather
# than letting a potentially-breaking minor flow in automatically. 0.2.0
# keeps the same Requires-Python (>=3.10) and pyarrow (>=23.0.1,<24) pin
# as 0.1.x, so the gating below is unchanged.
databricks-sql-kernel = {version = "^0.2.0", optional = true, python = ">=3.10"}
[tool.poetry.extras]
pyarrow = ["pyarrow"]
# ``pip install databricks-sql-connector[kernel]`` adds the Rust kernel
# backend so ``use_kernel=True`` works. No-op on Python < 3.10 (the
# wheel's floor) — those users get a runtime ImportError if they pass
# ``use_kernel=True``.
#
# The kernel result path (``backend/kernel/result_set.py``) needs
# pyarrow, but it is NOT listed in this extra on purpose: the published
# kernel wheel declares ``pyarrow>=23.0.1,<24`` as a hard runtime
# dependency, so ``pip install ...[kernel]`` already pulls a compatible
# pyarrow transitively. Listing bare ``pyarrow`` here additionally
# forces poetry to co-resolve an unconstrained pyarrow against the
# kernel's ``>=23.0.1,<24`` (which itself requires Python >=3.10) across
# the connector's full 3.8–3.14 support matrix, which is unsatisfiable
# on 3.8/3.9 and breaks ``poetry lock``. The kernel's own dependency
# metadata is the single source of truth for the pyarrow floor.
kernel = ["databricks-sql-kernel"]
[tool.poetry.group.dev.dependencies]
pytest = "^7.1.2"
mypy = "^1.10.1"
pylint = ">=2.12.0"
black = "^22.3.0"
pytest-dotenv = "^0.5.2"
pytest-cov = "^4.0.0"
pytest-xdist = "^3.0.0"
numpy = [
{ version = ">=1.16.6", python = ">=3.8,<3.11" },
{ version = ">=1.23.4", python = ">=3.11" },
]
[tool.poetry.urls]
"Homepage" = "https://github.com/databricks/databricks-sql-python"
"Bug Tracker" = "https://github.com/databricks/databricks-sql-python/issues"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
ignore_missing_imports = "true"
exclude = ['ttypes\.py$', 'TCLIService\.py$']
[tool.black]
exclude = '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist|thrift_api)/'
[tool.pytest.ini_options]
markers = [
"reviewed: Test case has been reviewed by Databricks",
"serial: Tests that must run serially (not parallelized)",
"realkernel: Requires the real databricks-sql-kernel wheel and an unpolluted sys.modules (no fake kernel stub); must run in a separate pytest invocation from tests that fake databricks_sql_kernel (deselect with -m 'not realkernel', run alone with -m realkernel).",
]
minversion = "6.0"
log_cli = "false"
log_cli_level = "INFO"
testpaths = ["tests"]
env_files = ["test.env"]
[tool.coverage.run]
source = ["src"]
branch = true
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
"*/thrift_api/*",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
[tool.coverage.xml]
output = "coverage.xml"