Skip to content

Commit 2a4adae

Browse files
committed
fix: Python 3.14 compatibility
Python 3.14 introduced changes to annotations, which broke msgspec structs; unfortunately, msgspec is no longer maintained. A workaround is to import annotations from __future__. This draft commit adds this import to all Python files, but we really only need it for some subset of these files (not yet sure which subset). * issue: msgspec/msgspec#847 * example workaround: return42/searxng@3963c23
1 parent 36647e2 commit 2a4adae

90 files changed

Lines changed: 152 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎marimo/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2024 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
"""The marimo library.
35
46
The marimo library brings marimo notebooks to life with powerful

‎marimo/__main__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2024 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
from marimo._cli.cli import main
35

46
if __name__ == "__main__":

‎marimo/_ai/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2024 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
"""AI utilities."""
35

46
__all__ = [

‎marimo/_ai/_tools/tools/notebooks.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2025 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
from dataclasses import dataclass, field
35
from typing import Optional
46

‎marimo/_ai/_tools/tools/tables_and_variables.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2025 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
from dataclasses import dataclass, field
35
from typing import Optional
46

‎marimo/_ai/_tools/tools_registry.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2025 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
from typing import Any
35

46
from marimo._ai._tools.base import ToolBase

‎marimo/_ai/llm/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2025 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
from marimo._ai.llm._impl import anthropic, bedrock, google, groq, openai
35

46
__all__ = ["openai", "anthropic", "google", "groq", "bedrock"]

‎marimo/_ast/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# Copyright 2024 Marimo. All rights reserved.
2+
from __future__ import annotations

‎marimo/_ast/app_config.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2025 Marimo. All rights reserved.
2+
from __future__ import annotations
23

34
import os
45
from dataclasses import asdict, dataclass, field

‎marimo/_ast/cell_id.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright 2025 Marimo. All rights reserved.
2+
from __future__ import annotations
3+
24
import random
35
import string
46
from uuid import UUID, uuid4

0 commit comments

Comments
 (0)