Skip to content

Commit 3321239

Browse files
authored
Switch to msgspec_m fork (#6774)
Switches off `msgspec` to our `msgspec_m` fork. The 3.14 wheels aren't on PyPI yet. I'll follow up with another PR adding a smoke test for running marimo cli without `--no-build`.
1 parent 07dff1a commit 3321239

40 files changed

+62
-62
lines changed

marimo/_ai/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
cast,
1616
)
1717

18-
import msgspec
18+
import msgspec_m as msgspec
1919

2020
from marimo import _loggers
2121
from marimo._utils.parse_dataclass import parse_raw

marimo/_ast/cell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from functools import cached_property
1010
from typing import TYPE_CHECKING, Any, Literal, Optional
1111

12-
import msgspec
12+
import msgspec_m as msgspec
1313

1414
from marimo import _loggers
1515
from marimo._ast.parse import ast_parse

marimo/_cli/development/commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from typing import TYPE_CHECKING, Any
1010

1111
import click
12-
import msgspec
13-
import msgspec.json
12+
import msgspec_m as msgspec
13+
import msgspec_m.json
1414

1515
from marimo._cli.print import orange
1616
from marimo._data.models import DataType
@@ -275,7 +275,7 @@ class KnownUnions(msgspec.Struct):
275275
error: MarimoError
276276
data_type: DataType
277277

278-
specs = msgspec.json.schema_components(
278+
specs = msgspec_m.json.schema_components(
279279
MESSAGES + [KnownUnions],
280280
ref_template="#/components/schemas/{name}",
281281
)

marimo/_ipc/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import typing
55

6-
import msgspec
7-
import msgspec.json
6+
import msgspec_m as msgspec
7+
import msgspec_m.json
88

99
from marimo._ast.cell import CellConfig
1010
from marimo._config.config import MarimoConfig
@@ -40,4 +40,4 @@ def encode_json(self) -> bytes:
4040

4141
@classmethod
4242
def decode_json(cls, buf: bytes) -> KernelArgs:
43-
return msgspec.json.decode(buf, type=cls)
43+
return msgspec_m.json.decode(buf, type=cls)

marimo/_messaging/cell_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from enum import Enum
88
from typing import Any, Union
99

10-
import msgspec
10+
import msgspec_m as msgspec
1111

1212
from marimo._messaging.errors import Error
1313
from marimo._messaging.mimetypes import ConsoleMimeType, KnownMimeType

marimo/_messaging/completion_option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from typing import Optional
77

8-
import msgspec
8+
import msgspec_m as msgspec
99

1010

1111
class CompletionOption(msgspec.Struct):

marimo/_messaging/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from typing import Optional, Union
55

6-
import msgspec
6+
import msgspec_m as msgspec
77

88
from marimo._runtime.dataflow import EdgeWithVar
99
from marimo._types.ids import CellId_t

marimo/_messaging/msgspec_encoder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from pathlib import PurePath
1111
from typing import Any
1212

13-
import msgspec
14-
import msgspec.json
13+
import msgspec_m as msgspec
14+
import msgspec_m.json
1515

1616
from marimo._dependencies.dependencies import DependencyManager
1717

@@ -200,7 +200,7 @@ def enc_hook(obj: Any) -> Any:
200200
return repr(obj)
201201

202202

203-
_encoder = msgspec.json.Encoder(enc_hook=enc_hook, decimal_format="number")
203+
_encoder = msgspec_m.json.Encoder(enc_hook=enc_hook, decimal_format="number")
204204

205205

206206
def encode_json_bytes(obj: Any) -> bytes:

marimo/_messaging/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
)
2020
from uuid import uuid4
2121

22-
import msgspec
22+
import msgspec_m as msgspec
2323

2424
from marimo import _loggers as loggers
2525
from marimo._ast.app_config import _AppConfig

marimo/_plugins/ui/_impl/tables/narwhals_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from functools import cached_property
88
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, cast
99

10-
import msgspec
10+
import msgspec_m as msgspec
1111
import narwhals.stable.v2 as nw
1212
from narwhals.typing import IntoDataFrameT, IntoLazyFrameT
1313

0 commit comments

Comments
 (0)