Skip to content

Commit 6733f36

Browse files
authored
fix(sdk): align Python Fedora/Alpine image defaults with JS (#1625)
Python `from_fedora_image` defaulted to `fedora:42` (end-of-life) and `from_alpine_image` to `alpine:3.22`, while JS already pinned `fedora:44`/`alpine:3.24` — the same call produced a different base image per SDK. Aligns Python; also fixes the JS type docs, which still named the old defaults. ```python Template().from_fedora_image() # fedora:44 (was fedora:42) Template().from_alpine_image() # alpine:3.24 (was alpine:3.22) ``` Follow-up to #1612; both defaults are still unreleased.
1 parent 1504fbc commit 6733f36

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'e2b': patch
3+
'@e2b/python-sdk': patch
4+
---
5+
6+
Align the Python SDK's `from_fedora_image` and `from_alpine_image` defaults with the JS SDK: `fedora:44` and `alpine:3.24`, replacing `fedora:42` (end-of-life, so its repositories leave the normal mirror network and provisioning can fail) and `alpine:3.22`. Callers that omit the variant now get the same base image in both SDKs, and both tags are the ones the orchestrator's distro build tests cover. Also corrects the JS `TemplateFromImage` type docs, which still named the old defaults.

packages/js-sdk/src/template/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,22 +247,22 @@ export interface TemplateFromImage {
247247

248248
/**
249249
* Start from a Fedora-based Docker image.
250-
* @param variant Fedora variant (default: '42')
250+
* @param variant Fedora variant (default: '44')
251251
*
252252
* @example
253253
* ```ts
254-
* Template().fromFedoraImage('42')
254+
* Template().fromFedoraImage('44')
255255
* ```
256256
*/
257257
fromFedoraImage(variant?: string): TemplateBuilder
258258

259259
/**
260260
* Start from an Alpine-based Docker image.
261-
* @param variant Alpine variant (default: '3.22')
261+
* @param variant Alpine variant (default: '3.24')
262262
*
263263
* @example
264264
* ```ts
265-
* Template().fromAlpineImage('3.22')
265+
* Template().fromAlpineImage('3.24')
266266
* ```
267267
*/
268268
fromAlpineImage(variant?: string): TemplateBuilder

packages/python-sdk/e2b/template/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -846,32 +846,32 @@ def from_ubuntu_image(self, variant: str = "latest") -> TemplateBuilder:
846846
"""
847847
return self.from_image(f"ubuntu:{variant}")
848848

849-
def from_fedora_image(self, variant: str = "42") -> TemplateBuilder:
849+
def from_fedora_image(self, variant: str = "44") -> TemplateBuilder:
850850
"""
851851
Start template from a Fedora base image.
852852
853-
:param variant: Fedora image variant (default: '42')
853+
:param variant: Fedora image variant (default: '44')
854854
855855
:return: `TemplateBuilder` class
856856
857857
Example
858858
```python
859-
Template().from_fedora_image('42')
859+
Template().from_fedora_image('44')
860860
```
861861
"""
862862
return self.from_image(f"fedora:{variant}")
863863

864-
def from_alpine_image(self, variant: str = "3.22") -> TemplateBuilder:
864+
def from_alpine_image(self, variant: str = "3.24") -> TemplateBuilder:
865865
"""
866866
Start template from an Alpine base image.
867867
868-
:param variant: Alpine image variant (default: '3.22')
868+
:param variant: Alpine image variant (default: '3.24')
869869
870870
:return: `TemplateBuilder` class
871871
872872
Example
873873
```python
874-
Template().from_alpine_image('3.22')
874+
Template().from_alpine_image('3.24')
875875
```
876876
"""
877877
return self.from_image(f"alpine:{variant}")

0 commit comments

Comments
 (0)