Skip to content

python-commerce 2.5.7: in-range deps + ty unpin + malformed-credential 402 fix - #89

Merged
vvillait88 merged 7 commits into
mainfrom
deps/in-range-bumps
Jul 17, 2026
Merged

python-commerce 2.5.7: in-range deps + ty unpin + malformed-credential 402 fix#89
vvillait88 merged 7 commits into
mainfrom
deps/in-range-bumps

Conversation

@vvillait88

@vvillait88 vvillait88 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

In-range dependency upgrades (uv.lock only; no pyproject constraint changes). fastapi, anyio, asgiref, solders, solana, stripe, sentry-sdk, typer, httpx2/httpcore2, ruff, etc.

ty stays pinned at 0.0.56 (deliberate hold; newer ty adds churn-prone diagnostics).

Verified locally: ruff check, ruff format --check, ty check (clean), vulture, pytest (1834 passed, 95.49% coverage).

🤖 Generated with Claude Code


Also unpins ty (==0.0.56 -> >=0.0.32) to match the rest of the python fleet. ty 0.0.60 tightened protocol-assignability checking; starlette 1.3.1 Headers.get no longer matched the HeadersLike protocol, so HeadersLike.get is narrowed to its actual single-arg usage (get(key, /) -> str | None). Full gate green at ty 0.0.60: ruff, format, ty, vulture, pytest (1834 passed, 95.49%).


Also: malformed-credential 402 fix (parity with node-commerce #82). Stripe/MPP-team store feedback: a junk or rejected payment credential on POST /purchase returned 400, which x402/MPP clients abort on. Now returns a 402 with a fresh challenge, both for the malformed-shape pre-check (emit a fresh discovery 402, stripping the junk credential so minting/compose take the fresh path; pre_validate + gate/assess stay skipped) and the MPP compose-reject path (return the challenge pympp already emitted as 402). x402 settle-verify failures (forged payTo) still 400. Rides this 2.5.7 release (no extra bump). Gate green: ruff/format/ty/vulture/pytest (1834 passed, 95.49%).

vvillait88 and others added 2 commits July 17, 2026 11:11
…sentry-sdk, etc.)

ty stays pinned at 0.0.56 (deliberate hold).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rolls out the redis 8 runtime bump plus in-range dependency maintenance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vvillait88 vvillait88 changed the title chore(deps): in-range dependency upgrades chore(deps+release): in-range upgrades -> v2.5.7 Jul 17, 2026
Brings python-commerce in line with the fleet (python-sdk, core/pipeline,
core/store all float ty>=0.0.32). ty 0.0.60 tightened protocol-assignability
checking; starlette 1.3.1's Headers.get no longer matched HeadersLike.get.
Fix: narrow the protocol's get to its actual single-arg usage
(get(key, /) -> str | None), which starlette Headers and multidict both satisfy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread agentscore_commerce/aip/request.py Fixed
vvillait88 and others added 3 commits July 17, 2026 12:17
… flag)

The bot flagged the bare '...' stub body as 'statement has no effect' on the
changed line; a docstring body is a real statement, satisfies the bot, and
self-documents the protocol methods.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Declared but never read (the Python solana MPP method is unwired), and it
configured the self-referential-split mechanism node-commerce just abandoned
(@solana/mpp 0.7.0 rejects it; the static-treasury path is the only viable one).
Drops the field, its comment, and the CLAUDE.md/README prose for parity with
node-commerce.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…not 400

Parity with node-commerce. A junk or rejected payment credential on POST
/purchase returned 400, which x402/MPP clients version-route as fatal and don't
retry. Both dead-end paths now return a 402 the agent re-pays against:

- Malformed-shape credential: emit a fresh discovery 402 via
  _emit_fresh_challenge(_discovery_view(ctx)); _discovery_view strips the junk
  credential so recipient minting + compose take their fresh path rather than
  binding garbage. pre_validate + the gate/assess stay skipped.
- MPP compose-reject on settle: return the fresh challenge pympp already emitted
  as 402 instead of 400.

x402 settle-verify failures (forged payTo) still 400 unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vvillait88 vvillait88 changed the title chore(deps+release): in-range upgrades -> v2.5.7 python-commerce 2.5.7: in-range deps + ty unpin + malformed-credential 402 fix Jul 17, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vvillait88
vvillait88 merged commit 4e4af87 into main Jul 17, 2026
7 checks passed
@vvillait88
vvillait88 deleted the deps/in-range-bumps branch July 17, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant