Commit 6947870
Reverts the v3.1.0-beta.1 client surface from PR #747. The Python SDK
will follow the TypeScript pattern instead: stay clean on 5.x against
AdCP 3.0.x, cut a new major (6.0) when AdCP 3.1 stable lands and run
codegen against the clean spec. Hand-rolled 3.1 types in preview.py
would diverge from the TS approach and accumulate drift as 3.x evolves;
two-surface confusion (``adcp.types`` vs ``adcp.preview``) is exactly
what pre-bid / sales-agent adopters can't afford.
PR #747 was never released to PyPI — v5.6.0 was tagged before #747
merged, so the preview surface only ever existed on ``main`` between
#747 (14:18 UTC) and this revert (~17:30 UTC). No downstream wheel
ever carried it.
Removes:
- src/adcp/preview.py (1079 lines)
- tests/test_preview.py, tests/test_preview_e2e.py (914 lines)
- ADCPClient.preview property and catalog_change_feed_client() method
- README v3.1 preview-surface quick-start section
- schemas/cache/3.1.0-beta.1/ (vendored bundle, 40MB, 661 files)
The bundle was kept in the initial revert PR as 6.0-prep convenience,
but expert review caught a real DX trap: with the bundle on disk but
no v3.1 Pydantic types, ``schema_loader._ensure_state`` would route
v3.1 wire responses to JSON-Schema validation against 3.1 schemas
that then parse through v3.0 types. Silent validate-against-different-
types is worse than no validation. Dropping the bundle makes the SDK
treat v3.1 like any unknown future version: skip validation, parse
through v3.0 with extras preserved (loud failure when an unsupported
attribute is accessed). Re-sync at 6.0 prep with one command.
Keeps:
- src/adcp/validation/version.py wire-format prerelease resolution
(pure infrastructure; resolves ``3.1-beta.1`` -> ``3.1.0-beta.1``
bundle key, used generally for any prerelease normalization)
- tests/test_validation_version.py
- scripts/sync_schemas.py multi-bundle machinery
(PREVIEW_VERSIONS = () so no extra bundles sync; flipping it back
on is one line when 6.0 prep starts)
- README ``## AdCP version support`` tombstone pointing at 6.0 and
#741
Codegen workarounds I built while trying to put 3.1.0-beta.1 through
codegen are captured in .context/codegen-prep/ for 6.0 prep (not in
this PR — they're prep notes, not production code). Companion upstream
issues filed at:
- koxudaxi/datamodel-code-generator#3158 (allOf+oneOf drops oneOf)
- koxudaxi/datamodel-code-generator#3159 (nested $ref via allOf)
- koxudaxi/datamodel-code-generator#3160 (fabricated Literal['reuse'])
- adcontextprotocol/adcp#4859 (bundled mega-schema inlining)
Expert reviews (code-reviewer-deep, security-reviewer-deep, adtech-
product-expert, dx-expert) recommended dropping the bundle and adding
the tombstone; both addressed here.
Test plan:
- ruff check src/ -> clean
- mypy src/adcp/ -> clean (806 source files)
- pytest tests/ -> 4883 passed, 0 failed, 26 skipped, 1 xfailed
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e973864 commit 6947870
667 files changed
Lines changed: 18 additions & 554359 deletions
File tree
- schemas/cache/3.1.0-beta.1
- a2ui
- account
- brand
- bundled
- content-standards
- core
- creative
- media-buy
- property
- protocol
- signals
- sponsored-intelligence
- collection
- compliance
- content-standards
- core
- assets
- requirements
- creative
- asset-types
- enums
- error-details
- extensions
- formats/canonical
- governance
- media-buy
- pricing-options
- property
- protocol
- registries
- signals
- sponsored-intelligence
- tmp
- scripts
- src/adcp
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
258 | 219 | | |
259 | 220 | | |
260 | 221 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments