Skip to content

Commit e5fe771

Browse files
committed
info instead of warning
1 parent 014c06f commit e5fe771

3 files changed

Lines changed: 44 additions & 40 deletions

File tree

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,35 @@
44
</a>
55
</div>
66

7-
> [!CAUTION]
8-
> ## ⚠️ DEPRECATION NOTICE
7+
> [!NOTE]
8+
> ## 🚀 Together Python SDK 2.0 is now available!
99
>
10-
> **This package (`together`) is deprecated and will no longer be maintained after January 2026.**
11-
>
12-
> Please migrate to the new SDK: **[together-ai](https://github.com/togethercomputer/together-py)**
10+
> Check out the new SDK: **[together-py](https://github.com/togethercomputer/together-py)**
1311
>
1412
> 📖 **Migration Guide:** [https://docs.together.ai/docs/pythonv2-migration-guide](https://docs.together.ai/docs/pythonv2-migration-guide)
1513
>
14+
> ### Install the Beta
15+
>
16+
> **Using uv (Recommended):**
17+
> ```bash
18+
> # Install uv if you haven't already
19+
> curl -LsSf https://astral.sh/uv/install.sh | sh
20+
>
21+
> # Install together python SDK
22+
> uv add together --prerelease allow
23+
>
24+
> # Or upgrade an existing installation
25+
> uv sync --upgrade-package together --prerelease allow
26+
> ```
27+
>
28+
> **Using pip:**
1629
> ```bash
17-
> pip uninstall together
18-
> pip install together-ai
30+
> pip install --pre together
1931
> ```
32+
>
33+
> This package will be maintained until January 2026.
2034
21-
# Together Python API library (DEPRECATED)
35+
# Together Python API library
2236
2337
[![PyPI version](https://img.shields.io/pypi/v/together.svg)](https://pypi.org/project/together/)
2438
[![Discord](https://dcbadge.limes.pink/api/server/https://discord.gg/9Rk6sSeWEG?style=flat&theme=discord-inverted)](https://discord.com/invite/9Rk6sSeWEG)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build-backend = "poetry.masonry.api"
1414
name = "together"
1515
version = "1.5.31"
1616
authors = ["Together AI <support@together.ai>"]
17-
description = "[DEPRECATED - Use together-py instead] Python client for Together's Cloud Platform. See https://github.com/togethercomputer/together-py for the new SDK."
17+
description = "Python client for Together's Cloud Platform! Note: SDK 2.0 is now available at https://github.com/togethercomputer/together-py"
1818
readme = "README.md"
1919
license = "Apache-2.0"
2020
classifiers = [

src/together/__init__.py

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,48 @@
22

33
import os
44
import sys
5-
import warnings
65

76
# =============================================================================
8-
# DEPRECATION NOTICE
7+
# SDK 2.0 ANNOUNCEMENT
98
# =============================================================================
10-
_DEPRECATION_MESSAGE = """
9+
_ANNOUNCEMENT_MESSAGE = """
1110
================================================================================
12-
DEPRECATION WARNING: The 'together' package is deprecated and will no longer
13-
be maintained after January 2026.
14-
15-
Please migrate to the new SDK: https://github.com/togethercomputer/together-py
11+
Together Python SDK 2.0 is now available!
1612
13+
Install: pip install --pre together
14+
New SDK: https://github.com/togethercomputer/together-py
1715
Migration guide: https://docs.together.ai/docs/pythonv2-migration-guide
16+
17+
This package will be maintained until January 2026.
1818
================================================================================
1919
"""
2020

21-
# Show deprecation warning (visible to developers with warnings enabled)
22-
warnings.warn(
23-
"The 'together' package is deprecated and will no longer be maintained after "
24-
"January 2026. Please migrate to the new SDK: "
25-
"https://github.com/togethercomputer/together-py "
26-
"Migration guide: https://docs.together.ai/docs/pythonv2-migration-guide",
27-
DeprecationWarning,
28-
stacklevel=2,
29-
)
30-
31-
# Also print a visible notice to stderr (unless suppressed)
32-
if not os.environ.get("TOGETHER_SUPPRESS_DEPRECATION_WARNING"):
21+
# Show info banner (unless suppressed)
22+
if not os.environ.get("TOGETHER_NO_BANNER"):
3323
try:
3424
from rich.console import Console
3525
from rich.panel import Panel
3626

3727
console = Console(stderr=True)
3828
console.print(
3929
Panel(
40-
"[bold yellow]DEPRECATION WARNING[/bold yellow]\n\n"
41-
"The [cyan]together[/cyan] package is deprecated and will no longer "
42-
"be maintained after [bold]January 2026[/bold].\n\n"
43-
"Please migrate to the new SDK:\n"
44-
"[link=https://github.com/togethercomputer/together-py]"
45-
"https://github.com/togethercomputer/together-py[/link]\n\n"
46-
"Migration guide:\n"
47-
"[link=https://docs.together.ai/docs/pythonv2-migration-guide]"
30+
"[bold cyan]Together Python SDK 2.0 is now available![/bold cyan]\n\n"
31+
"Install the beta:\n"
32+
"[green]pip install --pre together[/green] or "
33+
"[green]uv add together --prerelease allow[/green]\n\n"
34+
"New SDK: [link=https://github.com/togethercomputer/together-py]"
35+
"https://github.com/togethercomputer/together-py[/link]\n"
36+
"Migration guide: [link=https://docs.together.ai/docs/pythonv2-migration-guide]"
4837
"https://docs.together.ai/docs/pythonv2-migration-guide[/link]\n\n"
49-
"[dim]Set TOGETHER_SUPPRESS_DEPRECATION_WARNING=1 to hide this message.[/dim]",
50-
title="⚠️ Deprecation Notice",
51-
border_style="yellow",
38+
"[dim]This package will be maintained until January 2026.\n"
39+
"Set TOGETHER_NO_BANNER=1 to hide this message.[/dim]",
40+
title="🚀 New SDK Available",
41+
border_style="cyan",
5242
)
5343
)
5444
except ImportError:
5545
# Fallback if rich is not available
56-
print(_DEPRECATION_MESSAGE, file=sys.stderr)
46+
print(_ANNOUNCEMENT_MESSAGE, file=sys.stderr)
5747

5848
# =============================================================================
5949

0 commit comments

Comments
 (0)