Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.11.0"
".": "0.12.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 193
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3dcdbd68ce4b336149d28d17ab08f211538ed6630112ae4883af2f6680643159.yml
openapi_spec_hash: 7e4333995b65cf32663166801e2444bb
config_hash: 8d7b241284195a8c51f5d670fbbe0ab4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5899adbe0e83d93afad45dbe14d4c83c92ed9a68021602f2b6a567b00471c190.yml
openapi_spec_hash: d851857366f97e4f4e9562bbea1b2219
config_hash: d73914a733b27d121d59aa43bc7c710e
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.12.0 (2026-04-09)

Full Changelog: [v0.11.0...v0.12.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.11.0...v0.12.0)

### Features

* **api:** remove terminal field from RunsOn type ([faca2b2](https://github.com/gitpod-io/gitpod-sdk-python/commit/faca2b27b88f17a759bd91c305e5ea2a856a1e2c))


### Bug Fixes

* **client:** preserve hardcoded query params when merging with user params ([b7f0b1d](https://github.com/gitpod-io/gitpod-sdk-python/commit/b7f0b1d27ef51872bf81541dd7f81a8101f856af))

## 0.11.0 (2026-04-02)

Full Changelog: [v0.10.0...v0.11.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.10.0...v0.11.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gitpod-sdk"
version = "0.11.0"
version = "0.12.0"
description = "The official Python library for the gitpod API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/gitpod/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ def _build_request(
files = cast(HttpxRequestFiles, ForceMultipartDict())

prepared_url = self._prepare_url(options.url)
# preserve hard-coded query params from the url
if params and prepared_url.query:
params = {**dict(prepared_url.params.items()), **params}
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
if "_" in prepared_url.host:
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
Expand Down
2 changes: 1 addition & 1 deletion src/gitpod/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "gitpod"
__version__ = "0.11.0" # x-release-please-version
__version__ = "0.12.0" # x-release-please-version
6 changes: 0 additions & 6 deletions src/gitpod/types/shared/runs_on.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,3 @@ class RunsOn(BaseModel):

machine: Optional[object] = None
"""Machine runs the service/task directly on the VM/machine level."""

terminal: Optional[object] = None
"""
Terminal runs the service inside a managed PTY terminal in the devcontainer.
Users can attach to the terminal interactively via the terminal API.
"""
6 changes: 0 additions & 6 deletions src/gitpod/types/shared_params/runs_on.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@ class RunsOn(TypedDict, total=False):

machine: object
"""Machine runs the service/task directly on the VM/machine level."""

terminal: object
"""
Terminal runs the service inside a managed PTY terminal in the devcontainer.
Users can attach to the terminal interactively via the terminal API.
"""
4 changes: 0 additions & 4 deletions tests/api_resources/environments/automations/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
"image": "x",
},
"machine": {},
"terminal": {},
},
"session": "session",
"spec_version": "specVersion",
Expand Down Expand Up @@ -188,7 +187,6 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
"image": "x",
},
"machine": {},
"terminal": {},
},
},
status={
Expand Down Expand Up @@ -437,7 +435,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
"image": "x",
},
"machine": {},
"terminal": {},
},
"session": "session",
"spec_version": "specVersion",
Expand Down Expand Up @@ -550,7 +547,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
"image": "x",
},
"machine": {},
"terminal": {},
},
},
status={
Expand Down
4 changes: 0 additions & 4 deletions tests/api_resources/environments/automations/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
"image": "x",
},
"machine": {},
"terminal": {},
},
},
)
Expand Down Expand Up @@ -178,7 +177,6 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
"image": "x",
},
"machine": {},
"terminal": {},
},
},
)
Expand Down Expand Up @@ -377,7 +375,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
"image": "x",
},
"machine": {},
"terminal": {},
},
},
)
Expand Down Expand Up @@ -484,7 +481,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
"image": "x",
},
"machine": {},
"terminal": {},
},
},
)
Expand Down
4 changes: 0 additions & 4 deletions tests/api_resources/environments/test_automations.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None:
"image": "x",
},
"machine": {},
"terminal": {},
},
"triggered_by": ["postDevcontainerStart"],
}
Expand All @@ -61,7 +60,6 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None:
"image": "x",
},
"machine": {},
"terminal": {},
},
"triggered_by": ["postEnvironmentStart"],
}
Expand Down Expand Up @@ -126,7 +124,6 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) ->
"image": "x",
},
"machine": {},
"terminal": {},
},
"triggered_by": ["postDevcontainerStart"],
}
Expand All @@ -143,7 +140,6 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) ->
"image": "x",
},
"machine": {},
"terminal": {},
},
"triggered_by": ["postEnvironmentStart"],
}
Expand Down
48 changes: 48 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,30 @@ def test_default_query_option(self) -> None:

client.close()

def test_hardcoded_query_params_in_url(self, client: Gitpod) -> None:
request = client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true"))
url = httpx.URL(request.url)
assert dict(url.params) == {"beta": "true"}

request = client._build_request(
FinalRequestOptions(
method="get",
url="/foo?beta=true",
params={"limit": "10", "page": "abc"},
)
)
url = httpx.URL(request.url)
assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"}

request = client._build_request(
FinalRequestOptions(
method="get",
url="/files/a%2Fb?beta=true",
params={"limit": "10"},
)
)
assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10"

def test_request_extra_json(self, client: Gitpod) -> None:
request = client._build_request(
FinalRequestOptions(
Expand Down Expand Up @@ -1363,6 +1387,30 @@ async def test_default_query_option(self) -> None:

await client.close()

async def test_hardcoded_query_params_in_url(self, async_client: AsyncGitpod) -> None:
request = async_client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true"))
url = httpx.URL(request.url)
assert dict(url.params) == {"beta": "true"}

request = async_client._build_request(
FinalRequestOptions(
method="get",
url="/foo?beta=true",
params={"limit": "10", "page": "abc"},
)
)
url = httpx.URL(request.url)
assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"}

request = async_client._build_request(
FinalRequestOptions(
method="get",
url="/files/a%2Fb?beta=true",
params={"limit": "10"},
)
)
assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10"

def test_request_extra_json(self, client: Gitpod) -> None:
request = client._build_request(
FinalRequestOptions(
Expand Down