Skip to content

Commit 58ba396

Browse files
authored
Remove deprecated rr.serve() (#9207)
Title. Somehow I forgot about this one in #9197.
1 parent d5b50d4 commit 58ba396

File tree

4 files changed

+4
-74
lines changed

4 files changed

+4
-74
lines changed

docs/content/reference/migration/migration-0-23.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,12 @@ Either:
8181

8282
The former is subject to (double-precision) floating point precision loss (still microsecond precision for the next century), while the latter is lossless.
8383

84-
## 🐍 Python: removed `rr.log_components()`, `rr.connect()`, and `rr.connect_tcp()`
84+
## 🐍 Python: removed `rr.log_components()`, `rr.connect()`, `rr.connect_tcp()`, and `rr.serve()`
8585

8686
These functions were [deprecated](migration-0-22.md#python-api-changes) in 0.22 and are no longer available.
8787

8888
Calls to `rr.log_components()` API are now superseded by the new partial update API. See the [documentation](../../concepts/latest-at.md#partial-updates) and the [migration instructions](migration-0-22.md#partial-updates).
8989

90-
Calls to `rr.connect()` and `rr.connect_tcp()` must be changed to [`rr.connect_grpc()`](https://ref.rerun.io/docs/python/0.22.1/common/initialization_functions/#rerun.connect_grpc?speculative-link).
90+
Calls to `rr.connect()` and `rr.connect_tcp()` must be changed to [`rr.connect_grpc()`](https://ref.rerun.io/docs/python/0.23.0/common/initialization_functions/#rerun.connect_grpc?speculative-link).
91+
92+
Calls to `rr.serve()` must be changed to [`rr.serve_web()`](https://ref.rerun.io/docs/python/0.23.0/common/initialization_functions/#rerun.serve_web?speculative-link).

rerun_py/docs/gen_common_index.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class Section:
8888
"disconnect",
8989
"save",
9090
"send_blueprint",
91-
"serve",
9291
"serve_web",
9392
"spawn",
9493
"memory_recording",

rerun_py/rerun_sdk/rerun/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@
174174
disconnect as disconnect,
175175
save as save,
176176
send_blueprint as send_blueprint,
177-
serve as serve,
178177
serve_web as serve_web,
179178
spawn as spawn,
180179
stdout as stdout,

rerun_py/rerun_sdk/rerun/sinks.py

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
import logging
44
import pathlib
5-
import warnings
65
from typing import TYPE_CHECKING
76

87
import rerun_bindings as bindings
9-
from typing_extensions import deprecated # type: ignore[misc, unused-ignore]
108

119
from rerun.blueprint.api import BlueprintLike, create_in_memory_blueprint
1210

@@ -213,74 +211,6 @@ def disconnect(recording: RecordingStream | None = None) -> None:
213211
)
214212

215213

216-
@deprecated(
217-
"""Please migrate to `rr.serve_web(…)`.
218-
See: https://www.rerun.io/docs/reference/migration/migration-0-20 for more details.""",
219-
)
220-
def serve(
221-
*,
222-
open_browser: bool = True,
223-
web_port: int | None = None,
224-
grpc_port: int | None = None,
225-
default_blueprint: BlueprintLike | None = None,
226-
recording: RecordingStream | None = None,
227-
server_memory_limit: str = "25%",
228-
) -> None:
229-
"""
230-
Serve log-data over WebSockets and serve a Rerun web viewer over HTTP.
231-
232-
!!! Warning "Deprecated"
233-
Please migrate to [rerun.serve_web][].
234-
See [the migration guide](https://www.rerun.io/docs/reference/migration/migration-0-20) for more details.
235-
236-
You can also connect to this server with the native viewer using `rerun localhost:9090`.
237-
238-
The WebSocket server will buffer all log data in memory so that late connecting viewers will get all the data.
239-
You can limit the amount of data buffered by the WebSocket server with the `server_memory_limit` argument.
240-
Once reached, the earliest logged data will be dropped.
241-
Note that this means that static data may be dropped if logged early (see <https://github.com/rerun-io/rerun/issues/5531>).
242-
243-
This function returns immediately.
244-
245-
Parameters
246-
----------
247-
open_browser:
248-
Open the default browser to the viewer.
249-
web_port:
250-
The port to serve the web viewer on (defaults to 9090).
251-
grpc_port:
252-
The port to serve the gRPC server on (defaults to 9876)
253-
default_blueprint:
254-
Optionally set a default blueprint to use for this application. If the application
255-
already has an active blueprint, the new blueprint won't become active until the user
256-
clicks the "reset blueprint" button. If you want to activate the new blueprint
257-
immediately, instead use the [`rerun.send_blueprint`][] API.
258-
recording:
259-
Specifies the [`rerun.RecordingStream`][] to use.
260-
If left unspecified, defaults to the current active data recording, if there is one.
261-
See also: [`rerun.init`][], [`rerun.set_global_data_recording`][].
262-
server_memory_limit:
263-
Maximum amount of memory to use for buffering log data for clients that connect late.
264-
This can be a percentage of the total ram (e.g. "50%") or an absolute value (e.g. "4GB").
265-
266-
"""
267-
268-
warnings.warn(
269-
message=("`serve` is deprecated. Use `serve_web` instead."),
270-
category=DeprecationWarning,
271-
stacklevel=2,
272-
)
273-
274-
return serve_web(
275-
open_browser=open_browser,
276-
web_port=web_port,
277-
grpc_port=grpc_port,
278-
default_blueprint=default_blueprint,
279-
recording=recording, # NOLINT
280-
server_memory_limit=server_memory_limit,
281-
)
282-
283-
284214
def serve_web(
285215
*,
286216
open_browser: bool = True,

0 commit comments

Comments
 (0)