Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion marimo/_ai/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
cast,
)

import msgspec
import msgspec_m as msgspec

from marimo import _loggers
from marimo._utils.parse_dataclass import parse_raw
Expand Down
2 changes: 1 addition & 1 deletion marimo/_ast/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from functools import cached_property
from typing import TYPE_CHECKING, Any, Literal, Optional

import msgspec
import msgspec_m as msgspec

from marimo import _loggers
from marimo._ast.parse import ast_parse
Expand Down
6 changes: 3 additions & 3 deletions marimo/_cli/development/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from typing import TYPE_CHECKING, Any

import click
import msgspec
import msgspec.json
import msgspec_m as msgspec
import msgspec_m.json

from marimo._cli.print import orange
from marimo._data.models import DataType
Expand Down Expand Up @@ -275,7 +275,7 @@ class KnownUnions(msgspec.Struct):
error: MarimoError
data_type: DataType

specs = msgspec.json.schema_components(
specs = msgspec_m.json.schema_components(
MESSAGES + [KnownUnions],
ref_template="#/components/schemas/{name}",
)
Expand Down
6 changes: 3 additions & 3 deletions marimo/_ipc/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import typing

import msgspec
import msgspec.json
import msgspec_m as msgspec
import msgspec_m.json

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

@classmethod
def decode_json(cls, buf: bytes) -> KernelArgs:
return msgspec.json.decode(buf, type=cls)
return msgspec_m.json.decode(buf, type=cls)
2 changes: 1 addition & 1 deletion marimo/_messaging/cell_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import Enum
from typing import Any, Union

import msgspec
import msgspec_m as msgspec

from marimo._messaging.errors import Error
from marimo._messaging.mimetypes import ConsoleMimeType, KnownMimeType
Expand Down
2 changes: 1 addition & 1 deletion marimo/_messaging/completion_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from typing import Optional

import msgspec
import msgspec_m as msgspec


class CompletionOption(msgspec.Struct):
Expand Down
2 changes: 1 addition & 1 deletion marimo/_messaging/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Optional, Union

import msgspec
import msgspec_m as msgspec

from marimo._runtime.dataflow import EdgeWithVar
from marimo._types.ids import CellId_t
Expand Down
6 changes: 3 additions & 3 deletions marimo/_messaging/msgspec_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from pathlib import PurePath
from typing import Any

import msgspec
import msgspec.json
import msgspec_m as msgspec
import msgspec_m.json

from marimo._dependencies.dependencies import DependencyManager

Expand Down Expand Up @@ -200,7 +200,7 @@ def enc_hook(obj: Any) -> Any:
return repr(obj)


_encoder = msgspec.json.Encoder(enc_hook=enc_hook, decimal_format="number")
_encoder = msgspec_m.json.Encoder(enc_hook=enc_hook, decimal_format="number")


def encode_json_bytes(obj: Any) -> bytes:
Expand Down
2 changes: 1 addition & 1 deletion marimo/_messaging/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
from uuid import uuid4

import msgspec
import msgspec_m as msgspec

from marimo import _loggers as loggers
from marimo._ast.app_config import _AppConfig
Expand Down
2 changes: 1 addition & 1 deletion marimo/_plugins/ui/_impl/tables/narwhals_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from functools import cached_property
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, cast

import msgspec
import msgspec_m as msgspec
import narwhals.stable.v2 as nw
from narwhals.typing import IntoDataFrameT, IntoLazyFrameT

Expand Down
2 changes: 1 addition & 1 deletion marimo/_pyodide/pyodide_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pathlib import Path
from typing import Any, Callable, TypeVar

import msgspec
import msgspec_m as msgspec

from marimo import _loggers
from marimo._ast.cell import CellConfig
Expand Down
4 changes: 2 additions & 2 deletions marimo/_runtime/packages/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
from typing import TYPE_CHECKING, Callable, Optional

import msgspec
import msgspec_m as msgspec

from marimo import _loggers
from marimo._dependencies.dependencies import DependencyManager
Expand Down Expand Up @@ -127,7 +127,7 @@ def run(

if log_callback is None:
# Original behavior - just run the command without capturing output
completed_process = subprocess.run(command) # noqa: ASYNC101
completed_process = subprocess.run(command)
return completed_process.returncode == 0

# Stream output to both the callback and the terminal
Expand Down
2 changes: 1 addition & 1 deletion marimo/_runtime/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)
from uuid import uuid4

import msgspec
import msgspec_m as msgspec

from marimo._ast.app_config import _AppConfig
from marimo._config.config import MarimoConfig
Expand Down
2 changes: 1 addition & 1 deletion marimo/_secrets/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from abc import ABC, abstractmethod
from typing import Literal

import msgspec
import msgspec_m as msgspec

SecretProviderType = Literal["env", "dotenv"]

Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/api/endpoints/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async def tutorial(
schema:
$ref: "#/components/schemas/MarimoFile"
"""
import msgspec
import msgspec_m as msgspec

# Create a new tutorial file and return the filepath
try:
Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import TYPE_CHECKING, Any

import msgspec
import msgspec_m as msgspec
from starlette.exceptions import HTTPException
from starlette.responses import JSONResponse

Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/models/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Any, Literal, Optional, Union

import msgspec
import msgspec_m as msgspec

from marimo._ai._types import ChatMessage
from marimo._server.ai.tools.types import ToolDefinition
Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/models/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Optional

import msgspec
import msgspec_m as msgspec


class ExportAsHTMLRequest(msgspec.Struct, rename="camel"):
Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/models/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Literal, Optional

import msgspec
import msgspec_m as msgspec

from marimo._server.models.models import BaseResponse

Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/models/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Optional

import msgspec
import msgspec_m as msgspec

from marimo._server.models.files import FileInfo
from marimo._tutorials import Tutorial # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
from typing import Any, Literal, Optional

import msgspec
import msgspec_m as msgspec

from marimo._ast.cell import CellConfig
from marimo._runtime.requests import (
Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/models/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Optional

import msgspec
import msgspec_m as msgspec

from marimo._runtime.packages.package_manager import PackageDescription

Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/models/secrets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2025 Marimo. All rights reserved.
from __future__ import annotations

import msgspec
import msgspec_m as msgspec

from marimo._secrets.models import SecretKeysWithProvider, SecretProviderType

Expand Down
2 changes: 1 addition & 1 deletion marimo/_server/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from marimo._messaging.msgspec_encoder import encode_json_bytes

if TYPE_CHECKING:
import msgspec
import msgspec_m as msgspec


class StructResponse(starlette.responses.Response):
Expand Down
2 changes: 1 addition & 1 deletion marimo/_snippets/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
from typing import Any, Optional

import msgspec
import msgspec_m as msgspec

from marimo import _loggers
from marimo._ast.load import load_app
Expand Down
2 changes: 1 addition & 1 deletion marimo/_sql/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import re
from typing import Literal, Optional, Union

import msgspec
import msgspec_m as msgspec

from marimo import _loggers
from marimo._dependencies.dependencies import DependencyManager
Expand Down
6 changes: 3 additions & 3 deletions marimo/_utils/dataclass_to_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

from typing import Sequence # noqa: UP035

import msgspec
import msgspec.json
import msgspec_m as msgspec
import msgspec_m.json


class PythonTypeToOpenAPI:
Expand All @@ -52,7 +52,7 @@ def convert(
Dict[str, Any]: The OpenAPI schema.
"""
if type(py_type) is type(msgspec.Struct):
return msgspec.json.schema(py_type)["$defs"][py_type.__name__] # type: ignore[no-any-return]
return msgspec_m.json.schema(py_type)["$defs"][py_type.__name__] # type: ignore[no-any-return]

origin = get_origin(py_type)
optional_name_overrides = self.optional_name_overrides
Expand Down
2 changes: 1 addition & 1 deletion marimo/_utils/msgspec_basestruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import TYPE_CHECKING, Any

import msgspec
import msgspec_m as msgspec

if TYPE_CHECKING:
from pydantic import GetCoreSchemaHandler
Expand Down
6 changes: 3 additions & 3 deletions marimo/_utils/parse_dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
get_type_hints,
)

import msgspec
import msgspec.json
import msgspec_m as msgspec
import msgspec_m.json

# Import NotRequired from typing_extensions for Python < 3.11
if sys.version_info < (3, 11):
Expand Down Expand Up @@ -206,7 +206,7 @@ def _parse_msgspec(
if isinstance(value, dict):
return msgspec.convert(value, strict=strict, type=cls)

return msgspec.json.decode(value, strict=strict, type=cls)
return msgspec_m.json.decode(value, strict=strict, type=cls)


def parse_raw(
Expand Down
24 changes: 12 additions & 12 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies = [
"narwhals>=2.0.0",
# for packaging.version; not sure what the lower bound is.
"packaging",
"msgspec>=0.19.0",
"msgspec_m>=0.19.1",
]
readme = "README.md"
license = { file = "LICENSE" }
Expand Down
Loading
Loading