-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathpyproject.toml
More file actions
202 lines (187 loc) · 7.58 KB
/
Copy pathpyproject.toml
File metadata and controls
202 lines (187 loc) · 7.58 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[project]
name = "pinecone"
version = "10.0.0"
description = "Pinecone Python SDK"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
{ name = "Pinecone Systems, Inc.", email = "support@pinecone.io" },
]
keywords = ["Pinecone", "vector", "database", "cloud", "RAG", "AI"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Database",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
# Upper-bound httpx to exclude the 1.0 pre-release line (1.0.devN), which
# drops symbols (e.g. httpx.BaseTransport) the SDK relies on. Without this
# cap, `pip install --pre pinecone` resolves httpx to a broken pre-release.
"httpx[http2]>=0.27,<1.0",
"msgspec>=0.19,<0.22",
"orjson>=3.11,<4",
# Imported at module scope by pinecone/async_client/assistants.py for async
# file IO. httpx happens to require it too, but every module the package
# imports eagerly is declared here rather than left to a transitive accident
# — tests/unit/tooling/test_declared_dependencies.py enforces that.
"anyio>=4.0",
]
[project.optional-dependencies]
docs = [
"sphinx>=8.0",
"furo",
"myst-parser>=4.0",
"sphinx-copybutton",
"sphinx-tabs",
"sphinx-reredirects>=0.1.6",
"sphinx-sitemap>=2.9.0",
]
[project.urls]
Homepage = "https://www.pinecone.io"
Documentation = "https://docs.pinecone.io"
Source = "https://github.com/pinecone-io/python-sdk"
Issues = "https://github.com/pinecone-io/python-sdk/issues"
Changelog = "https://sdk.pinecone.io/python/migration/v10-migration.html"
[tool.maturin]
manifest-path = "rust/Cargo.toml"
module-name = "pinecone._grpc"
python-source = "."
# maturin 1.7.x doesn't auto-include the LICENSE file in the sdist even though
# it adds `License-File: LICENSE` to PKG-INFO from the SPDX license expression.
# The mismatch makes PyPI reject the sdist. The wheel needs no entry here: it
# gets its copy under `dist-info/licenses/` from the SPDX expression, and an
# unscoped include would also drop a bare `LICENSE` at the wheel root, which
# installs into the site-packages root.
include = [{ path = "LICENSE", format = "sdist" }]
[tool.mypy]
strict = true
python_version = "3.10"
[[tool.mypy.overrides]]
module = "tests.unit.grpc.test_retry_callback"
warn_unused_ignores = false
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = ["pinecone/__init__.pyi"]
force-exclude = true
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "B", "ASYNC", "S", "T20", "N", "C4", "SIM", "PERF", "RUF", "PT", "TID", "RET", "FURB"]
ignore = ["ASYNC109", "SIM108", "PERF203", "RUF002"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"requests".msg = "Use httpx instead of requests"
"pydantic".msg = "Use msgspec instead of pydantic"
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"E501",
"B905",
"S101",
"S105",
"S106",
"S107",
"S110",
"T20",
"PT018",
"PT019",
# Stylistic rules whose suggestions don't fit common test patterns:
"B017", # pytest.raises(Exception) is sometimes legitimately broad in tests
"B018", # "useless" attribute access used to trigger AttributeError
"PT006", # parametrize tuple/list form — both readable
"PT011", # pytest.raises(Exception) too broad — duplicate of B017 stylistically
"PT017", # assertion on exception in `except` block — common test pattern
"SIM117", # nested `with` — often clearer than combined when scopes differ
"SIM105", # try/except/pass — fine in test cleanup paths
"PERF401", # list-comprehension perf doesn't matter in tests
"ASYNC240", # os.path in async functions — fine in tests; not real async I/O
]
"docs/**" = ["E501"]
"scripts/**" = [
"T201", # print() is fine in CLI utilities
"S603", # subprocess.run with hardcoded args is trusted in our scripts
"S607", # invoking `cargo` / `git` by partial path is intentional
]
"pinecone/_internal/http_client.py" = ["S311"]
"pinecone/grpc/future.py" = ["S110", "SIM105"]
[tool.pytest.ini_options]
anyio_mode = "auto"
# 60s bounds a HUNG test — the point of pytest-timeout — without failing suites
# that are legitimately slow: the DataFrame partition property test runs 200
# Hypothesis examples (~1.4s locally, >5s on CI runners under py3.10), and the
# retry-storm tests sit in the same band.
timeout = 60
# --strict-config turns an unrecognized ini key into a startup error and
# --strict-markers does the same for an unregistered marker. Both were silent
# warnings until #306, which is how the `timeout` key and 89
# `pytest.mark.timeout` markers sat inert for four months after pytest-timeout
# went missing from the dev dependency group.
addopts = ["--strict-config", "--strict-markers"]
markers = [
"smoke: end-to-end smoke tests that hit a real Pinecone backend (see tests/smoke/README.md)",
"integration: real-API integration tests against a live Pinecone backend",
"api_op(op_id): conformance claim for a 2026-07 API operation (see tests/unit/conformance/README.md)",
]
[tool.coverage.run]
source = ["pinecone"]
# pytest-cov auto-combines per-worker data files when pytest-xdist is active,
# so this config holds even if -n is later added to the unit-test CI command.
branch = false
[tool.coverage.report]
show_missing = true
skip_covered = false
[dependency-groups]
dev = [
"anyio>=4.13.0",
# pandas/numpy back the DataFrame ingest tests, which importorskip and would
# otherwise skip silently in CI. numpy is what makes them representative of a
# real embedding frame.
"pandas>=2.0",
"numpy>=1.26",
"ipykernel>=7.2.0",
"pytest>=9.0.3",
"pytest-anyio>=0.0.0",
"pytest-asyncio>=0.23",
# Backs `timeout` in [tool.pytest.ini_options] and the `pytest.mark.timeout`
# markers in tests/. This group is the only place test dependencies are
# declared; `uv sync --group dev` installs it (#306).
"pytest-timeout>=2.3",
"python-dotenv>=1.2.2",
"pytest-benchmark>=5.0.0",
"pytest-xdist>=3.6",
"pytest-timeout>=2.3",
"pytest-cov>=7.0",
"respx>=0.22.0",
"mypy>=1.20.0",
"ruff>=0.15.9",
"hypothesis>=6.0",
# scripts/api_coverage.py parses the 2026-07 OAS specs to derive the
# conformance denominator (epoch #87 gate).
"pyyaml>=6.0",
# tests/unit/conformance/_registry.py validates response fixtures against
# the OAS response schemas vendored into the conformance manifest (#189).
"jsonschema>=4.21",
# tests/unit/conformance/_grpc_harness.py runs an in-process gRPC server so
# the db_data_grpc conformance claims capture the Rust tonic channel's real
# rpcs on the wire (#253). grpcio-tools regenerates message/service stubs
# from the vendored rust/proto/db_data_2026-07.proto at test time, so the
# server decodes with protoc-generated code, independent of prost.
"grpcio>=1.76",
"grpcio-tools>=1.76",
]