release: 3.0.0 — public-API rename release (#348, #349, #351)#378
Conversation
First major release in the v3 line. Three breaking-rename issues deferred from the v2.7.0 audit closure land with one-release deprecation aliases. Both old and new spellings work in v3.0.0; old names emit DeprecationWarning and will be removed no sooner than v3.1.0. Wire protocol unchanged from v2.7.0; v3 is purely a Python-API ergonomics break. - CommunicationsResource flat methods split into rfqs/quotes sub-namespaces (#348). 12 forwarders deprecated; new sub-resource classes exported from kalshi.__init__. - MarketsResource.list_trades_all → list_all_trades (#349) standardizing on the list_all_<noun> form used by Communications/Subaccounts. - OrdersResource.fills / fills_all → PortfolioResource.fills / fills_all (#351) aligning the SDK layout with the endpoint URL family. Migration guide at docs/migrations/v2-to-v3.md with BEFORE/AFTER snippets and a search-and-replace cheat sheet for downstream callers. Main is mypy --strict clean, ruff clean, 2954 unit tests passing.
Code Review — PR #378: release: 3.0.0OverviewThis is a release-coordination PR — it bumps the version, adds the changelog entry, migration docs, and roadmap update. The actual implementation (deprecation aliases, sub-namespaces, ✅ What's done well
|
|
Round-2 review addressed: corrected v3.0.0 release date in CHANGELOG and ROADMAP from 2026-05-23 to 2026-05-22 (the actual release date). Deferring: gitnexus relationship count delta (-51) is an indexing artifact from this run's scope-extraction warnings on test files; the 8568 symbol count correctly reflects the new sub-resource classes added. Deprecation window timeline note will be added when v3.1.0 lands. |
Code Review — PR #378: release: 3.0.0Overall: This is a clean release-packaging PR. The actual code changes (deprecation aliases, sub-namespaces, fills relocation) already landed in #376 and #377 and are verifiable in the working tree. Review here focuses on the docs/metadata changes in scope. Bug (should fix before merge)
# kalshi/__init__.py line 354 — currently
__version__ = "2.6.0"The version hardcoded in from importlib.metadata import version, PackageNotFoundError
try:
__version__ = version("kalshi-sdk")
except PackageNotFoundError:
__version__ = "unknown"Nit (minor, worth fixing)Regex inconsistency in The two filterwarnings examples use different regex patterns for the module selector: # TOML example — line 138
"error::DeprecationWarning:kalshi.*" # '.' matches any char, not literal dot# Python example — line 148
module=r"kalshi(\..*)?" # correct: escapes the literal dotThe TOML example's filterwarnings = [
"error::DeprecationWarning:kalshi(\\..*)?",
]Observations (no action needed)
Verdict: Block on the |
v3.0.0 — First major release in the v3 line
Three breaking-rename issues (#348, #349, #351) deferred from the v2.7.0 audit closure now land with one-release deprecation aliases. Wire protocol unchanged from v2.7.0; v3 is purely a Python-API ergonomics break.
Pipeline
Single wave (W4) of the Round-3 audit closure plan. 2 parallel PRs in disjoint worktrees:
list_all_<noun>standardizationfillsrelocation orders → portfolioEach ran through the
claude-code-reviewbot loop (2 rounds each) before squash-merge.Breaking changes
All three ship with
@typing_extensions.deprecatedaliases on old names — existing v2.x callers continue to work but getDeprecationWarningon every call. Aliases removed no sooner than v3.1.0.1. CommunicationsResource sub-namespaces (#348)
12 forwarders total split across
rfqsandquotessub-resources. The miscclient.communications.get_id(...)stays at the top level. New sub-resource classes (RFQsResource,QuotesResource, async variants) exported fromkalshi/__init__.py.2.
*_allnaming standardization (#349)3.
fillsrelocation: orders → portfolio (#351)What's in this commit
CHANGELOG.md— full 3.0.0 entry with BEFORE/AFTER snippets for each renamedocs/migration.md— v2.7 → v3.0 section added at the topdocs/migrations/v2-to-v3.md— new dedicated migration guide with search-and-replace cheat sheetROADMAP.md— v3.0.0 shipped entrymkdocs.yml— Migration nav expanded with v2 → v3 sub-entrypyproject.toml— version bump2.7.0→3.0.0AGENTS.md+CLAUDE.md— gitnexus stats refreshed (8568 symbols, 17351 relationships, 300 flows)Verification
uv run ruff check kalshi/ tests/ docs/— cleanuv run mypy kalshi/— clean (76 source files, --strict)uv run pytest tests/— 2954 passed, 258 skipped (69 expected DeprecationWarnings from alias coverage tests)Removal schedule
The v3.0.0 deprecation aliases will be removed no sooner than v3.1.0. Each deprecated method uses
@typing_extensions.deprecated(PEP 702) so type checkers and IDEs surface the warning at the call site.