Skip to content

Commit 6032f48

Browse files
authored
Merge pull request #95 from scaleapi/release-please--branches--main--changes--next
release: 0.4.11
2 parents 9665b81 + 0513a08 commit 6032f48

22 files changed

+578
-194
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
permissions:
4343
contents: read
4444
id-token: write
45-
runs-on: depot-ubuntu-24.04
45+
runs-on: ${{ github.repository == 'stainless-sdks/agentex-sdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4646
steps:
4747
- uses: actions/checkout@v4
4848

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.4.10"
2+
".": "0.4.11"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-4e747d1e081a07dcd47f7aaed0a8fc18c748658d4c8875f793daf4850e74b47c.yml
3-
openapi_spec_hash: 3a159d7dc86cae47945e678009a197be
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-6eec9554350594d13aa61f6d3c384a54cbaba95481ee06c228a9d0a0aefaeda8.yml
3+
openapi_spec_hash: 63770414d1be9807d9b7ebbef0ae9fee
44
config_hash: aeabb3a919ad2763f5d0f41961a2520a

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
22

3+
## 0.4.11 (2025-09-04)
4+
5+
Full Changelog: [v0.4.10...v0.4.11](https://github.com/scaleapi/agentex-python/compare/v0.4.10...v0.4.11)
6+
7+
### Features
8+
9+
* Guardrail support ([e3e9bf9](https://github.com/scaleapi/agentex-python/commit/e3e9bf9dd6cf16b9a783638690d4a31914be8139))
10+
* improve future compat with pydantic v3 ([f0d8624](https://github.com/scaleapi/agentex-python/commit/f0d86244065c88bb2777db8fabeb1921e7e01116))
11+
* multiple guardrails ([ea8f98a](https://github.com/scaleapi/agentex-python/commit/ea8f98a973ba486e854cf14528a88eb73a203cf8))
12+
* **templates:** add custom activity timeout guidance for temporal agents ([7658256](https://github.com/scaleapi/agentex-python/commit/765825680132677ea0351f2a9410f472ee754906))
13+
* **types:** replace List[str] with SequenceNotStr in params ([f319781](https://github.com/scaleapi/agentex-python/commit/f3197818637574cd92b2c1f710679155eddf5af7))
14+
15+
16+
### Bug Fixes
17+
18+
* Adding new example for guardrails instead of using 10_agentic ([15dc44b](https://github.com/scaleapi/agentex-python/commit/15dc44b333a977564c9974cc089d5ef578840714))
19+
* avoid newer type syntax ([6b5c82a](https://github.com/scaleapi/agentex-python/commit/6b5c82aab9ebcf755575b641aced2b77a13a71c3))
20+
21+
22+
### Chores
23+
24+
* **internal:** add Sequence related utils ([496034d](https://github.com/scaleapi/agentex-python/commit/496034db4d6cba361c1f392a4bb86f6ab057e878))
25+
* **internal:** change ci workflow machines ([7445d94](https://github.com/scaleapi/agentex-python/commit/7445d94cb860f92911ec97ecd951149557956c6a))
26+
* **internal:** move mypy configurations to `pyproject.toml` file ([e96cd34](https://github.com/scaleapi/agentex-python/commit/e96cd34629d5ea173446c3184fbfe28bd2b370a0))
27+
* **internal:** update pyright exclude list ([d952430](https://github.com/scaleapi/agentex-python/commit/d952430ab4cbc41bca06010bbcfea3eeb022073e))
28+
329
## 0.4.10 (2025-08-24)
430

531
Full Changelog: [v0.4.9...v0.4.10](https://github.com/scaleapi/agentex-python/compare/v0.4.9...v0.4.10)

mypy.ini

Lines changed: 0 additions & 50 deletions
This file was deleted.

pyproject.toml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentex-sdk"
3-
version = "0.4.10"
3+
version = "0.4.11"
44
description = "The official Python library for the agentex API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -186,6 +186,7 @@ exclude = [
186186
"_dev",
187187
".venv",
188188
".nox",
189+
".git",
189190
]
190191

191192
reportImplicitOverride = true
@@ -194,6 +195,58 @@ reportOverlappingOverload = false
194195
reportImportCycles = false
195196
reportPrivateUsage = false
196197

198+
[tool.mypy]
199+
pretty = true
200+
show_error_codes = true
201+
202+
# Exclude _files.py because mypy isn't smart enough to apply
203+
# the correct type narrowing and as this is an internal module
204+
# it's fine to just use Pyright.
205+
#
206+
# We also exclude our `tests` as mypy doesn't always infer
207+
# types correctly and Pyright will still catch any type errors.
208+
exclude = ['src/agentex/_files.py', '_dev/.*.py', 'tests/.*']
209+
210+
strict_equality = true
211+
implicit_reexport = true
212+
check_untyped_defs = true
213+
no_implicit_optional = true
214+
215+
warn_return_any = true
216+
warn_unreachable = true
217+
warn_unused_configs = true
218+
219+
# Turn these options off as it could cause conflicts
220+
# with the Pyright options.
221+
warn_unused_ignores = false
222+
warn_redundant_casts = false
223+
224+
disallow_any_generics = true
225+
disallow_untyped_defs = true
226+
disallow_untyped_calls = true
227+
disallow_subclassing_any = true
228+
disallow_incomplete_defs = true
229+
disallow_untyped_decorators = true
230+
cache_fine_grained = true
231+
232+
# By default, mypy reports an error if you assign a value to the result
233+
# of a function call that doesn't return anything. We do this in our test
234+
# cases:
235+
# ```
236+
# result = ...
237+
# assert result is None
238+
# ```
239+
# Changing this codegen to make mypy happy would increase complexity
240+
# and would not be worth it.
241+
disable_error_code = "func-returns-value,overload-cannot-match"
242+
243+
# https://github.com/python/mypy/issues/12162
244+
[[tool.mypy.overrides]]
245+
module = "black.files.*"
246+
ignore_errors = true
247+
ignore_missing_imports = true
248+
249+
197250
[tool.ruff]
198251
line-length = 120
199252
output-format = "grouped"

src/agentex/_base_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
ModelBuilderProtocol,
6060
)
6161
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
62-
from ._compat import PYDANTIC_V2, model_copy, model_dump
62+
from ._compat import PYDANTIC_V1, model_copy, model_dump
6363
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
6464
from ._response import (
6565
APIResponse,
@@ -232,7 +232,7 @@ def _set_private_attributes(
232232
model: Type[_T],
233233
options: FinalRequestOptions,
234234
) -> None:
235-
if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
235+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
236236
self.__pydantic_private__ = {}
237237

238238
self._model = model
@@ -320,7 +320,7 @@ def _set_private_attributes(
320320
client: AsyncAPIClient,
321321
options: FinalRequestOptions,
322322
) -> None:
323-
if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
323+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
324324
self.__pydantic_private__ = {}
325325

326326
self._model = model

0 commit comments

Comments
 (0)