Skip to content
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
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: CI
on:
push:
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
Expand Down
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.0.3"
".": "0.1.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: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-a69e6793d72c7f91069972b64ff2e35b4ddfa62cd35d6451b7d63f95d5957951.yml
openapi_spec_hash: 8a77eef26c37dc2b63110169f0eef1f6
config_hash: b47de5a3580d529a9ae2e5d03d950ce7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-c5d5abb4b31f6e352e3e02b47120e3f444377c1c564f141ebe0988b86ba5932e.yml
openapi_spec_hash: 8ef4803fbe33ae6472a4b8f660be7921
config_hash: a144af00e5e74176674d0ea954cc02c5
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 0.1.0 (2026-03-18)

Full Changelog: [v0.0.3...v0.1.0](https://github.com/brand-dot-dev/context-python-sdk/compare/v0.0.3...v0.1.0)

### Features

* **api:** api update ([5cc1e7d](https://github.com/brand-dot-dev/context-python-sdk/commit/5cc1e7d56a2bc8210d4b2b06c581459cea572210))


### Bug Fixes

* **deps:** bump minimum typing-extensions version ([4695dbc](https://github.com/brand-dot-dev/context-python-sdk/commit/4695dbc34b87e85188379626840776680c6bb9b6))
* **pydantic:** do not pass `by_alias` unless set ([b1723b9](https://github.com/brand-dot-dev/context-python-sdk/commit/b1723b9dcac429353c6d02808e6d795e5ed5caa3))


### Chores

* **internal:** tweak CI branches ([0dbacf7](https://github.com/brand-dot-dev/context-python-sdk/commit/0dbacf7d2c95a87668cd1fc052378984ca1a865e))

## 0.0.3 (2026-03-14)

Full Changelog: [v0.0.2...v0.0.3](https://github.com/brand-dot-dev/context-python-sdk/compare/v0.0.2...v0.0.3)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "context.dev"
version = "0.0.3"
version = "0.1.0"
description = "The official Python library for the context.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand All @@ -11,7 +11,7 @@ authors = [
dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"typing-extensions>=4.14, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
Expand Down
11 changes: 9 additions & 2 deletions src/context/dev/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload
from datetime import date, datetime
from typing_extensions import Self, Literal
from typing_extensions import Self, Literal, TypedDict

import pydantic
from pydantic.fields import FieldInfo
Expand Down Expand Up @@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:
return model.model_dump_json(indent=indent)


class _ModelDumpKwargs(TypedDict, total=False):
by_alias: bool


def model_dump(
model: pydantic.BaseModel,
*,
Expand All @@ -142,14 +146,17 @@ def model_dump(
by_alias: bool | None = None,
) -> dict[str, Any]:
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
kwargs: _ModelDumpKwargs = {}
if by_alias is not None:
kwargs["by_alias"] = by_alias
return model.model_dump(
mode=mode,
exclude=exclude,
exclude_unset=exclude_unset,
exclude_defaults=exclude_defaults,
# warnings are not supported in Pydantic v1
warnings=True if PYDANTIC_V1 else warnings,
by_alias=by_alias,
**kwargs,
)
return cast(
"dict[str, Any]",
Expand Down
2 changes: 1 addition & 1 deletion src/context/dev/_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__ = "context.dev"
__version__ = "0.0.3" # x-release-please-version
__version__ = "0.1.0" # x-release-please-version
Loading
Loading