Skip to content

Commit 2643c21

Browse files
Merge pull request #125 from cleanlab/release-please--branches--main--changes--next
release: 0.1.0-alpha.26
2 parents c006787 + 0aa647b commit 2643c21

36 files changed

+887
-252
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/codex-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.1.0-alpha.25"
2+
".": "0.1.0-alpha.26"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
configured_endpoints: 55
2-
openapi_spec_hash: 7daf4896ba4932714f8fe4fff277d7c7
3-
config_hash: bed87752f4056d0c4bf2ddf856307800
1+
configured_endpoints: 56
2+
openapi_spec_hash: 12260ab88069ff15d254606e041debfb
3+
config_hash: 6c3ad84d97bf1d0989ad2ec0cae64078

CHANGELOG.md

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

3+
## 0.1.0-alpha.26 (2025-09-05)
4+
5+
Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/cleanlab/codex-python/compare/v0.1.0-alpha.25...v0.1.0-alpha.26)
6+
7+
### Features
8+
9+
* **api:** api update ([3b745af](https://github.com/cleanlab/codex-python/commit/3b745afa4569af091b3a62228af62c036c84718d))
10+
* **api:** api update ([9bb8f17](https://github.com/cleanlab/codex-python/commit/9bb8f17149849ea312caf7b895f02a2c38ac3270))
11+
* **api:** api update ([ecbda1c](https://github.com/cleanlab/codex-python/commit/ecbda1ca9f1aaf40a325e105cc0659ea0e318511))
12+
* **api:** api update ([4151cf2](https://github.com/cleanlab/codex-python/commit/4151cf288ea4f75ac7c6eb5c07c9861d67b5ad92))
13+
* **api:** api update ([cfc87fb](https://github.com/cleanlab/codex-python/commit/cfc87fb65a3a29f0584b7dffccc79f2442307fa9))
14+
* **api:** manual updates ([5a4e424](https://github.com/cleanlab/codex-python/commit/5a4e424744a6a0e8efc8e6d96c1472508bcc3b00))
15+
* improve future compat with pydantic v3 ([d9ffa38](https://github.com/cleanlab/codex-python/commit/d9ffa3812e5eb836fc85532d57a92937ef3ad7ec))
16+
* **types:** replace List[str] with SequenceNotStr in params ([07bdde8](https://github.com/cleanlab/codex-python/commit/07bdde83153c609ff2b86a4190911cab160aaae2))
17+
18+
19+
### Bug Fixes
20+
21+
* avoid newer type syntax ([7a7b9a3](https://github.com/cleanlab/codex-python/commit/7a7b9a3ee6cfed2e57359a54c1b9292f06cc71b6))
22+
23+
24+
### Chores
25+
26+
* **internal:** add Sequence related utils ([ead0105](https://github.com/cleanlab/codex-python/commit/ead0105a68c77ae308cc0d40c34245265e9cb2b6))
27+
* **internal:** change ci workflow machines ([052599a](https://github.com/cleanlab/codex-python/commit/052599aee2e484d9cc305983da900878374db17d))
28+
* **internal:** move mypy configurations to `pyproject.toml` file ([6285dbe](https://github.com/cleanlab/codex-python/commit/6285dbe7fdc7e6eede39d589ac92d8481595e5e3))
29+
* **internal:** update pyright exclude list ([cc58363](https://github.com/cleanlab/codex-python/commit/cc58363a9c78ce08437508d3c64cb9b29b43e9bd))
30+
331
## 0.1.0-alpha.25 (2025-08-22)
432

533
Full Changelog: [v0.1.0-alpha.24...v0.1.0-alpha.25](https://github.com/cleanlab/codex-python/compare/v0.1.0-alpha.24...v0.1.0-alpha.25)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ from codex.types.projects import (
206206
QueryLogListByGroupResponse,
207207
QueryLogListGroupsResponse,
208208
QueryLogStartRemediationResponse,
209+
QueryLogUpdateMetadataResponse,
209210
)
210211
```
211212

@@ -217,6 +218,7 @@ Methods:
217218
- <code title="get /api/projects/{project_id}/query_logs/logs_by_group">client.projects.query_logs.<a href="./src/codex/resources/projects/query_logs.py">list_by_group</a>(project_id, \*\*<a href="src/codex/types/projects/query_log_list_by_group_params.py">params</a>) -> <a href="./src/codex/types/projects/query_log_list_by_group_response.py">QueryLogListByGroupResponse</a></code>
218219
- <code title="get /api/projects/{project_id}/query_logs/groups">client.projects.query_logs.<a href="./src/codex/resources/projects/query_logs.py">list_groups</a>(project_id, \*\*<a href="src/codex/types/projects/query_log_list_groups_params.py">params</a>) -> <a href="./src/codex/types/projects/query_log_list_groups_response.py">SyncOffsetPageQueryLogGroups[QueryLogListGroupsResponse]</a></code>
219220
- <code title="post /api/projects/{project_id}/query_logs/{query_log_id}/start_remediation">client.projects.query_logs.<a href="./src/codex/resources/projects/query_logs.py">start_remediation</a>(query_log_id, \*, project_id) -> <a href="./src/codex/types/projects/query_log_start_remediation_response.py">QueryLogStartRemediationResponse</a></code>
221+
- <code title="put /api/projects/{project_id}/query_logs/{query_log_id}/metadata">client.projects.query_logs.<a href="./src/codex/resources/projects/query_logs.py">update_metadata</a>(query_log_id, \*, project_id, \*\*<a href="src/codex/types/projects/query_log_update_metadata_params.py">params</a>) -> <a href="./src/codex/types/projects/query_log_update_metadata_response.py">QueryLogUpdateMetadataResponse</a></code>
220222

221223
## Remediations
222224

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 = "codex-sdk"
3-
version = "0.1.0-alpha.25"
3+
version = "0.1.0-alpha.26"
44
description = "Internal SDK used within cleanlab-codex package. Refer to https://pypi.org/project/cleanlab-codex/ instead."
55
dynamic = ["readme"]
66
license = "MIT"
@@ -148,6 +148,7 @@ exclude = [
148148
"_dev",
149149
".venv",
150150
".nox",
151+
".git",
151152
]
152153

153154
reportImplicitOverride = true
@@ -156,6 +157,58 @@ reportOverlappingOverload = false
156157
reportImportCycles = false
157158
reportPrivateUsage = false
158159

160+
[tool.mypy]
161+
pretty = true
162+
show_error_codes = true
163+
164+
# Exclude _files.py because mypy isn't smart enough to apply
165+
# the correct type narrowing and as this is an internal module
166+
# it's fine to just use Pyright.
167+
#
168+
# We also exclude our `tests` as mypy doesn't always infer
169+
# types correctly and Pyright will still catch any type errors.
170+
exclude = ['src/codex/_files.py', '_dev/.*.py', 'tests/.*']
171+
172+
strict_equality = true
173+
implicit_reexport = true
174+
check_untyped_defs = true
175+
no_implicit_optional = true
176+
177+
warn_return_any = true
178+
warn_unreachable = true
179+
warn_unused_configs = true
180+
181+
# Turn these options off as it could cause conflicts
182+
# with the Pyright options.
183+
warn_unused_ignores = false
184+
warn_redundant_casts = false
185+
186+
disallow_any_generics = true
187+
disallow_untyped_defs = true
188+
disallow_untyped_calls = true
189+
disallow_subclassing_any = true
190+
disallow_incomplete_defs = true
191+
disallow_untyped_decorators = true
192+
cache_fine_grained = true
193+
194+
# By default, mypy reports an error if you assign a value to the result
195+
# of a function call that doesn't return anything. We do this in our test
196+
# cases:
197+
# ```
198+
# result = ...
199+
# assert result is None
200+
# ```
201+
# Changing this codegen to make mypy happy would increase complexity
202+
# and would not be worth it.
203+
disable_error_code = "func-returns-value,overload-cannot-match"
204+
205+
# https://github.com/python/mypy/issues/12162
206+
[[tool.mypy.overrides]]
207+
module = "black.files.*"
208+
ignore_errors = true
209+
ignore_missing_imports = true
210+
211+
159212
[tool.ruff]
160213
line-length = 120
161214
output-format = "grouped"

src/codex/_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)