Skip to content

release: 0.1.2 #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 14, 2025
Merged
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.1.1"
".": "0.1.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-27f7bd641de1e4657ad8ce84a456fe0c5e8f1e14779bf1f567a4bc8667eba4da.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0c37e687e2a070abfe49501156af6d906ff166b6eaad779ee6c2b568515f2b7e.yml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.2 (2025-02-14)

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

### Features

* **api:** manual updates ([#39](https://github.com/gitpod-io/gitpod-sdk-python/issues/39)) ([31f6c01](https://github.com/gitpod-io/gitpod-sdk-python/commit/31f6c01e50663c19a4e11808458b4bbd3fb38ead))
* **api:** Organizations Open API docs ([#37](https://github.com/gitpod-io/gitpod-sdk-python/issues/37)) ([ed6623d](https://github.com/gitpod-io/gitpod-sdk-python/commit/ed6623dbad5cf3605f8d5e3d07450cc30576ad0f))

## 0.1.1 (2025-02-14)

Full Changelog: [v0.1.0-alpha.3...v0.1.1](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.0-alpha.3...v0.1.1)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

```python
from gitpod.types import (
ArbitraryData,
AutomationTrigger,
EnvironmentClass,
ErrorCode,
FieldValue,
OrganizationRole,
Principal,
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.1.1"
version = "0.1.2"
description = "The official Python library for the gitpod API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
31 changes: 30 additions & 1 deletion src/gitpod/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, Optional, cast
from typing_extensions import Literal

import httpx

from ._utils import is_dict
from ._models import construct_type
from .types.shared.error_code import ErrorCode
from .types.shared.arbitrary_data import ArbitraryData

__all__ = [
"BadRequestError",
"AuthenticationError",
Expand Down Expand Up @@ -37,12 +43,35 @@ class APIError(GitpodError):
If there was no response associated with this error then it will be `None`.
"""

def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None: # noqa: ARG002
code: Optional[ErrorCode] = None
"""
The status code, which should be an enum value of
[google.rpc.Code][google.rpc.Code].
"""
detail: Optional[ArbitraryData] = None
"""
Contains an arbitrary serialized message along with a @type that describes the
type of the serialized message.
"""
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
def __getattr__(self, attr: str) -> object: ...

def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None:
super().__init__(message)
self.request = request
self.message = message
self.body = body

if is_dict(body):
self.code = cast(Any, construct_type(type_=Optional[ErrorCode], value=body.get("code")))
self.detail = cast(Any, construct_type(type_=Optional[ArbitraryData], value=body.get("detail")))
else:
self.code = None
self.detail = None


class APIResponseValidationError(APIError):
response: httpx.Response
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.1.1" # x-release-please-version
__version__ = "0.1.2" # x-release-please-version
Loading