-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathpyproject.toml
More file actions
183 lines (168 loc) · 6.06 KB
/
Copy pathpyproject.toml
File metadata and controls
183 lines (168 loc) · 6.06 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
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[project]
name = "pinecone"
version = "9.1.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",
"orjson",
# Imported unconditionally at module scope by
# pinecone/_internal/indexes_helpers.py for `NotRequired` (added in 4.0),
# so `import pinecone` needs it on every interpreter. It reached 3.10-3.12
# transitively through anyio, whose own requirement carries a
# `python_full_version < '3.13'` marker -- so the accident evaporated on
# 3.13+ and every published wheel failed to import there.
"typing-extensions>=4.0",
]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-asyncio",
"pytest-timeout",
"respx",
"mypy",
"ruff",
]
docs = [
"sphinx>=8.0",
"furo",
"myst-parser>=4.0",
"sphinx-copybutton",
"sphinx-tabs",
]
[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"
[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. Explicit include fixes both forms.
include = ["LICENSE"]
[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
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",
"preview_integration: real-API tests against 2026-01.alpha preview endpoints (not CI-gating)",
]
[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",
"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",
]