Skip to content

Commit 20305ca

Browse files
release: 2.0.0-alpha.5 (#183)
* feat(api): manual updates * fix: uv v0.8.11 only has python 3.14rc, which causes issues with pydantic 2 * chore(internal): working around mypy * release: 2.0.0-alpha.5 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Samuel El-Borai <[email protected]>
1 parent ae3f5cc commit 20305ca

File tree

17 files changed

+1451
-1190
lines changed

17 files changed

+1451
-1190
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323

2424
- name: Install uv
2525
uses: astral-sh/setup-uv@v5
26-
with:
27-
version: '0.8.11'
2826

2927
- name: Install dependencies
3028
run: uv sync --all-extras
@@ -45,8 +43,6 @@ jobs:
4543

4644
- name: Install uv
4745
uses: astral-sh/setup-uv@v5
48-
with:
49-
version: '0.8.11'
5046

5147
- name: Install dependencies
5248
run: uv sync --all-extras
@@ -79,8 +75,6 @@ jobs:
7975

8076
- name: Install uv
8177
uses: astral-sh/setup-uv@v5
82-
with:
83-
version: '0.8.11'
8478

8579
- name: Bootstrap
8680
run: ./scripts/bootstrap
@@ -99,8 +93,6 @@ jobs:
9993

10094
- name: Install uv
10195
uses: astral-sh/setup-uv@v5
102-
with:
103-
version: '0.8.11'
10496

10597
- name: Bootstrap
10698
run: ./scripts/bootstrap

.release-please-manifest.json

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

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 44
1+
configured_endpoints: 43
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-e9e60279414ac3279c025d6318b5f67a8f6d01170e365612e791f3a1f259b94f.yml
33
openapi_spec_hash: 26c59292808c5ae9f222f95f056430cf
4-
config_hash: 9bdb3abc3260073f1c3dd0c52a352918
4+
config_hash: 23c87c234dd773a896773436c7eb2a28

CHANGELOG.md

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

3+
## 2.0.0-alpha.5 (2025-11-25)
4+
5+
Full Changelog: [v2.0.0-alpha.4...v2.0.0-alpha.5](https://github.com/togethercomputer/together-py/compare/v2.0.0-alpha.4...v2.0.0-alpha.5)
6+
7+
### Features
8+
9+
* **api:** manual updates ([f1b27a5](https://github.com/togethercomputer/together-py/commit/f1b27a53efeb925b6b89d3f7636c4809814347d8))
10+
11+
12+
### Bug Fixes
13+
14+
* uv v0.8.11 only has python 3.14rc, which causes issues with pydantic 2 ([981828a](https://github.com/togethercomputer/together-py/commit/981828a2f70db44845e6a1ae93d1906269d7ba5f))
15+
16+
17+
### Chores
18+
19+
* **internal:** working around mypy ([7d080fc](https://github.com/togethercomputer/together-py/commit/7d080fc748da2cf3293ddfa5b74b23e47213c77f))
20+
321
## 2.0.0-alpha.4 (2025-11-24)
422

523
Full Changelog: [v2.0.0-alpha.3...v2.0.0-alpha.4](https://github.com/togethercomputer/together-py/compare/v2.0.0-alpha.3...v2.0.0-alpha.4)

api.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,19 +295,12 @@ Methods:
295295
Types:
296296

297297
```python
298-
from together.types import (
299-
EvaluationJob,
300-
EvalCreateResponse,
301-
EvalUpdateResponse,
302-
EvalListResponse,
303-
EvalStatusResponse,
304-
)
298+
from together.types import EvaluationJob, EvalCreateResponse, EvalListResponse, EvalStatusResponse
305299
```
306300

307301
Methods:
308302

309303
- <code title="post /evaluation">client.evals.<a href="./src/together/resources/evals.py">create</a>(\*\*<a href="src/together/types/eval_create_params.py">params</a>) -> <a href="./src/together/types/eval_create_response.py">EvalCreateResponse</a></code>
310304
- <code title="get /evaluation/{id}">client.evals.<a href="./src/together/resources/evals.py">retrieve</a>(id) -> <a href="./src/together/types/evaluation_job.py">EvaluationJob</a></code>
311-
- <code title="post /evaluation/{id}/update">client.evals.<a href="./src/together/resources/evals.py">update</a>(id, \*\*<a href="src/together/types/eval_update_params.py">params</a>) -> <a href="./src/together/types/eval_update_response.py">EvalUpdateResponse</a></code>
312305
- <code title="get /evaluation">client.evals.<a href="./src/together/resources/evals.py">list</a>(\*\*<a href="src/together/types/eval_list_params.py">params</a>) -> <a href="./src/together/types/eval_list_response.py">EvalListResponse</a></code>
313306
- <code title="get /evaluation/{id}/status">client.evals.<a href="./src/together/resources/evals.py">status</a>(id) -> <a href="./src/together/types/eval_status_response.py">EvalStatusResponse</a></code>

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "together"
3-
version = "2.0.0-alpha.4"
3+
version = "2.0.0-alpha.5"
44
description = "The official Python library for the together API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -83,7 +83,8 @@ pydantic-v1 = [
8383
"pydantic>=1.9.0,<2",
8484
]
8585
pydantic-v2 = [
86-
"pydantic>=2,<3",
86+
"pydantic~=2.0 ; python_full_version < '3.14'",
87+
"pydantic~=2.12 ; python_full_version >= '3.14'",
8788
]
8889

8990
[build-system]

requirements-dev.lock

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@
33
-e .
44
aiohappyeyeballs==2.6.1
55
# via aiohttp
6-
aiohttp==3.12.13
6+
aiohttp==3.13.2
77
aiosignal==1.4.0
88
# via aiohttp
99
annotated-types==0.7.0
1010
# via pydantic
11-
anyio==4.8.0
11+
anyio==4.11.0
1212
# via
1313
# httpx
1414
# together
1515
async-timeout==5.0.1 ; python_full_version < '3.11'
1616
# via aiohttp
17-
attrs==25.3.0
17+
attrs==25.4.0
1818
# via aiohttp
19-
certifi==2024.12.14
19+
backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
20+
# via pytest-asyncio
21+
certifi==2025.11.12
2022
# via
2123
# httpcore
2224
# httpx
@@ -29,20 +31,20 @@ colorama==0.4.6 ; sys_platform == 'win32'
2931
# click
3032
# pytest
3133
# tqdm
32-
dirty-equals==0.9.0
34+
dirty-equals==0.11
3335
distro==1.9.0
3436
# via together
35-
exceptiongroup==1.2.2 ; python_full_version < '3.11'
37+
exceptiongroup==1.3.1 ; python_full_version < '3.11'
3638
# via
3739
# anyio
3840
# pytest
39-
execnet==2.1.1
41+
execnet==2.1.2
4042
# via pytest-xdist
4143
filelock==3.19.1 ; python_full_version < '3.10'
4244
# via together
4345
filelock==3.20.0 ; python_full_version >= '3.10'
4446
# via together
45-
frozenlist==1.7.0
47+
frozenlist==1.8.0
4648
# via
4749
# aiohttp
4850
# aiosignal
@@ -54,71 +56,84 @@ httpx==0.28.1
5456
# via
5557
# respx
5658
# together
57-
idna==3.10
59+
idna==3.11
5860
# via
5961
# anyio
6062
# httpx
6163
# yarl
62-
importlib-metadata==8.6.1
63-
iniconfig==2.0.0
64+
importlib-metadata==8.7.0
65+
iniconfig==2.1.0 ; python_full_version < '3.10'
6466
# via pytest
65-
markdown-it-py==3.0.0
67+
iniconfig==2.3.0 ; python_full_version >= '3.10'
68+
# via pytest
69+
markdown-it-py==3.0.0 ; python_full_version < '3.10'
70+
# via rich
71+
markdown-it-py==4.0.0 ; python_full_version >= '3.10'
6672
# via rich
6773
mdurl==0.1.2
6874
# via markdown-it-py
69-
multidict==6.6.3
75+
multidict==6.7.0
7076
# via
7177
# aiohttp
7278
# yarl
73-
mypy==1.14.1
74-
mypy-extensions==1.0.0
79+
mypy==1.18.2
80+
mypy-extensions==1.1.0
7581
# via mypy
7682
nodeenv==1.9.1
7783
# via pyright
78-
packaging==24.2
84+
packaging==25.0
7985
# via pytest
86+
pathspec==0.12.1
87+
# via mypy
8088
pillow==11.3.0 ; python_full_version < '3.10'
8189
# via together
8290
pillow==12.0.0 ; python_full_version >= '3.10'
8391
# via together
84-
pluggy==1.5.0
92+
pluggy==1.6.0
8593
# via pytest
86-
propcache==0.3.2
94+
propcache==0.4.1
8795
# via
8896
# aiohttp
8997
# yarl
90-
pydantic==2.10.3
98+
pydantic==2.12.4
9199
# via together
92-
pydantic-core==2.27.1
100+
pydantic-core==2.41.5
93101
# via pydantic
94-
pygments==2.19.1
102+
pygments==2.19.2
95103
# via
96104
# pytest
97105
# rich
98106
pyright==1.1.399
99-
pytest==8.4.1
107+
pytest==8.4.2 ; python_full_version < '3.10'
108+
# via
109+
# pytest-asyncio
110+
# pytest-mock
111+
# pytest-xdist
112+
pytest==9.0.1 ; python_full_version >= '3.10'
100113
# via
101114
# pytest-asyncio
102115
# pytest-mock
103116
# pytest-xdist
104-
pytest-asyncio==0.24.0
117+
pytest-asyncio==1.2.0 ; python_full_version < '3.10'
118+
pytest-asyncio==1.3.0 ; python_full_version >= '3.10'
105119
pytest-mock==3.15.1
106-
pytest-xdist==3.7.0
107-
python-dateutil==2.9.0.post0
120+
pytest-xdist==3.8.0
121+
python-dateutil==2.9.0.post0 ; python_full_version < '3.10'
108122
# via time-machine
109123
respx==0.22.0
110-
rich==13.9.4
111-
ruff==0.9.4
112-
six==1.17.0
124+
rich==14.2.0
125+
ruff==0.14.6
126+
six==1.17.0 ; python_full_version < '3.10'
113127
# via python-dateutil
114128
sniffio==1.3.1
115129
# via
116130
# anyio
117131
# together
118132
tabulate==0.9.0
119133
# via together
120-
time-machine==2.16.0
121-
tomli==2.2.1 ; python_full_version < '3.11'
134+
time-machine==2.19.0 ; python_full_version < '3.10'
135+
time-machine==3.1.0 ; python_full_version >= '3.10'
136+
tomli==2.3.0 ; python_full_version < '3.11'
122137
# via
123138
# mypy
124139
# pytest
@@ -130,20 +145,24 @@ types-tabulate==0.9.0.20241207
130145
# via together
131146
types-tqdm==4.67.0.20250809
132147
# via together
133-
typing-extensions==4.12.2
148+
typing-extensions==4.15.0
134149
# via
135150
# aiosignal
136151
# anyio
152+
# exceptiongroup
137153
# multidict
138154
# mypy
139155
# pydantic
140156
# pydantic-core
141157
# pyright
142-
# rich
158+
# pytest-asyncio
143159
# together
160+
# typing-inspection
161+
typing-inspection==0.4.2
162+
# via pydantic
144163
urllib3==2.5.0
145164
# via types-requests
146-
yarl==1.20.1
165+
yarl==1.22.0
147166
# via aiohttp
148-
zipp==3.21.0
167+
zipp==3.23.0
149168
# via importlib-metadata

scripts/test

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ function run_tests() {
5858
echo "==> Running tests with Pydantic v2"
5959
uv run --isolated --all-extras pytest "$@"
6060

61-
echo "==> Running tests with Pydantic v1"
62-
uv run --isolated --all-extras --group=pydantic-v1 pytest "$@"
61+
# Pydantic v1 does not support Python 3.14, skip these tests
62+
if [[ "$UV_PYTHON" != "3.14" ]]; then
63+
echo "==> Running tests with Pydantic v1"
64+
uv run --isolated --all-extras --group=pydantic-v1 pytest "$@"
65+
fi
6366
}
6467

6568
# If UV_PYTHON is already set in the environment, just run the command once
@@ -71,6 +74,6 @@ else
7174
echo "==> Running tests for Python 3.9"
7275
UV_PYTHON=3.9 run_tests "$@"
7376

74-
echo "==> Running tests for Python 3.13"
75-
UV_PYTHON=3.13 run_tests "$@"
77+
echo "==> Running tests for Python 3.14"
78+
UV_PYTHON=3.14 run_tests "$@"
7679
fi

src/together/_utils/_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def is_typeddict(tp: Type[Any]) -> bool:
3434

3535

3636
def is_literal_type(tp: Type[Any]) -> bool:
37-
return get_origin(tp) in _LITERAL_TYPES
37+
return get_origin(tp) in _LITERAL_TYPES # type: ignore[comparison-overlap]
3838

3939

4040
def parse_date(value: Union[date, StrBytesIntFloat]) -> date:

src/together/_utils/_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@ def get_required_header(headers: HeadersLike, header: str) -> str:
373373
lower_header = header.lower()
374374
if is_mapping_t(headers):
375375
# mypy doesn't understand the type narrowing here
376-
for k, v in headers.items(): # type: ignore
377-
if k.lower() == lower_header and isinstance(v, str):
378-
return v
376+
for k, v in headers.items(): # type: ignore[misc, has-type]
377+
if k.lower() == lower_header and isinstance(v, str): # type: ignore[has-type]
378+
return v # type: ignore[has-type]
379379

380380
# to deal with the case where the header looks like Stainless-Event-Id
381381
intercaps_header = re.sub(r"([^\w])(\w)", lambda pat: pat.group(1) + pat.group(2).upper(), header.capitalize())

0 commit comments

Comments
 (0)