# @e2b/python-sdk@2.52.1

Category: agent-infrastructure
Published: 2026-10-05T12:41:22Z
Source: [E2B releases](https://github.com/e2b-dev/E2B/releases/tag/%40e2b%2Fpython-sdk%402.52.1)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-10-06T18:17:51.480Z
Tags: sandbox, code-execution, agents

## Human Summary
E2B updated its SDK with BuildKit-compliant .dockerignore filtering and safer HTTP 502 retry handling to prevent duplicate resource creation.

## Agent Summary
E2B Python SDK v2.52.1 restricts automatic HTTP 502 retries to replay-safe operations to prevent duplicate sandbox creations or secret versions, and updates template context .dockerignore parsing to align with BuildKit.

## Body
Release @e2b/python-sdk@2.52.1 introduces two key patch changes. First, template build context filtering with .dockerignore now matches BuildKit behavior: leading literal characters match at any depth, negated patterns matching only a parent directory no longer re-include the path, and wildcard/bracket expressions properly match non-BMP characters as single units. Second, the SDK alters its retry logic for HTTP 502 Bad Gateway responses. Because gateways may return 502 after the API processes a request, resource-creating POST requests (such as sandbox creation, fork, snapshot, and secret updates via POST /secrets/{id}) are no longer retried on 502 or dropped connections to prevent duplicate entities or unwanted version increments. HTTP 503 responses continue to be retried across all operations.

## Recommended actions
- Upgrade to @e2b/python-sdk@2.52.1.
- Verify application-level error handling for 502 Bad Gateway responses during sandbox creation, forking, snapshots, or secret updates, as the SDK no longer retries them automatically.
- Review .dockerignore files used in template builds to ensure compatibility with updated BuildKit-aligned pattern parsing rules.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.