We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
docs: `Message` not exported from `textual.messages`
Just something minor I spotted while playing with the [Messages up](https://textual.textualize.io/guide/widgets/#messages-up) example in the docs. The code still works but my editor complains that:

> "Message" is not exported from module "textual.messages"
> Import from "textual.message" instead [reportPrivateImportUsage]

Happy to submit a quick PR if deemed worth fixing!

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/examples/guide/compound/byte02.py`
Content:
```
1 from __future__ import annotations
2 
3 from textual.app import App, ComposeResult
4 from textual.containers import Container
5 from textual.messages import Message
6 from textual.reactive import reactive
7 from textual.widget import Widget
8 from textual.widgets import Input, Label, Switch
9 
10 
11 class BitSwitch(Widget):
12     """A Switch with a numeric label above it."""
13 
14     DEFAULT_CSS = """
15     BitSwitch {
16         layout: vertical;
17         width: auto;
18         height: auto;
19     }
20     BitSwitch > Label {
21         text-align: center;
22         width: 100%;
23     }
24     """
25 
26     class BitChanged(Message):
27         """Sent when the 'bit' changes."""
28 
29         def __init__(self, bit: int, value: bool) -> None:
30             super().__init__()
31             self.bit = bit
32             self.value = value
33 
34     value = reactive(0)  # (1)!
35 
36     def __init__(self, bit: int) -> None:
37         self.bit = bit
38         super().__init__()
39 
40     def compose(self) -> ComposeResult:
41         yield Label(str(self.bit))
42         yield Switch()
43 
44     def on_switch_changed(self, event: Switch.Changed) -> None:  # (2)!
45         """When the switch changes, notify the parent via a message."""
46         event.stop()  # (3)!
47         self.value = event.value  # (4)!
48         self.post_message(self.BitChanged(self.bit, event.value))
49 
50 
51 class ByteInput(Widget):
52     """A compound widget with 8 switches."""
53 
54     DEFAULT_CSS = """
55     ByteInput {
56         width: auto;
57         height: auto;
58         border: blank;
59         layout: horizontal;
60     }
61     ByteInput:focus-within {
62         border: heavy $secondary;
63     }
64     """
65 
66     def compose(self) -> ComposeResult:
67         for bit in reversed(range(8)):
68             yield BitSwitch(bit)
69 
70 
71 class ByteEditor(Widget):
72     DEFAULT_CSS = """
73     ByteEditor > Container {
74         height: 1fr;
75         align: center middle;
76     }
77     ByteEditor > Container.top {
78         background: $boost;
79     }
80     ByteEditor Input {
81         width: 16;
82     }
83     """
84 
85     def compose(self) -> ComposeResult:
86         with Container(classes="top"):
87             yield Input(placeholder="byte")
88         with Container():
89             yield ByteInput()
90 
91     def on_bit_switch_bit_changed(self, event: BitSwitch.BitChanged) -> None:
92         """When a switch changes, update the value."""
93         value = 0
94         for switch in self.query(BitSwitch):
95             value |= switch.value << switch.bit
96         self.query_one(Input).value = str(value)
97 
98 
99 class ByteInputApp(App):
100     def compose(self) -> ComposeResult:
101         yield ByteEditor()
102 
103 
104 if __name__ == "__main__":
105     app = ByteInputApp()
106     app.run()
107
```

Path: `docs/examples/guide/compound/byte03.py`
Content:
```
1 from __future__ import annotations
2 
3 from textual.app import App, ComposeResult
4 from textual.containers import Container
5 from textual.geometry import clamp
6 from textual.messages import Message
7 from textual.reactive import reactive
8 from textual.widget import Widget
9 from textual.widgets import Input, Label, Switch
10 
11 
12 class BitSwitch(Widget):
13     """A Switch with a numeric label above it."""
14 
15     DEFAULT_CSS = """
16     BitSwitch {
17         layout: vertical;
18         width: auto;
19         height: auto;
20     }
21     BitSwitch > Label {
22         text-align: center;
23         width: 100%;
24     }
25     """
26 
27     class BitChanged(Message):
28         """Sent when the 'bit' changes."""
29 
30         def __init__(self, bit: int, value: bool) -> None:
31             super().__init__()
32             self.bit = bit
33             self.value = value
34 
35     value = reactive(0)
36 
37     def __init__(self, bit: int) -> None:
38         self.bit = bit
39         super().__init__()
40 
41     def compose(self) -> ComposeResult:
42         yield Label(str(self.bit))
43         yield Switch()
44 
45     def watch_value(self, value: bool) -> None:  # (1)!
46         """When the value changes we want to set the switch accordingly."""
47         self.query_one(Switch).value = value
48 
49     def on_switch_changed(self, event: Switch.Changed) -> None:
50         """When the switch changes, notify the parent via a message."""
51         event.stop()
52         self.value = event.value
53         self.post_message(self.BitChanged(self.bit, event.value))
54 
55 
56 class ByteInput(Widget):
57     """A compound widget with 8 switches."""
58 
59     DEFAULT_CSS = """
60     ByteInput {
61         width: auto;
62         height: auto;
63         border: blank;
64         layout: horizontal;
65     }
66     ByteInput:focus-within {
67         border: heavy $secondary;
68     }
69     """
70 
71     def compose(self) -> ComposeResult:
72         for bit in reversed(range(8)):
73             yield BitSwitch(bit)
74 
75 
76 class ByteEditor(Widget):
77     DEFAULT_CSS = """
78     ByteEditor > Container {
79         height: 1fr;
80         align: center middle;
81     }
82     ByteEditor > Container.top {
83         background: $boost;
84     }
85     ByteEditor Input {
86         width: 16;
87     }
88     """
89 
90     value = reactive(0)
91 
92     def validate_value(self, value: int) -> int:  # (2)!
93         """Ensure value is between 0 and 255."""
94         return clamp(value, 0, 255)
95 
96     def compose(self) -> ComposeResult:
97         with Container(classes="top"):
98             yield Input(placeholder="byte")
99         with Container():
100             yield ByteInput()
101 
102     def on_bit_switch_bit_changed(self, event: BitSwitch.BitChanged) -> None:
103         """When a switch changes, update the value."""
104         value = 0
105         for switch in self.query(BitSwitch):
106             value |= switch.value << switch.bit
107         self.query_one(Input).value = str(value)
108 
109     def on_input_changed(self, event: Input.Changed) -> None:  # (3)!
110         """When the text changes, set the value of the byte."""
111         try:
112             self.value = int(event.value or "0")
113         except ValueError:
114             pass
115 
116     def watch_value(self, value: int) -> None:  # (4)!
117         """When self.value changes, update switches."""
118         for switch in self.query(BitSwitch):
119             with switch.prevent(BitSwitch.BitChanged):  # (5)!
120                 switch.value = bool(value & (1 << switch.bit))  # (6)!
121 
122 
123 class ByteInputApp(App):
124     def compose(self) -> ComposeResult:
125         yield ByteEditor()
126 
127 
128 if __name__ == "__main__":
129     app = ByteInputApp()
130     app.run()
131
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docs/examples/guide/compound/byte02.py b/docs/examples/guide/compound/byte02.py
--- a/docs/examples/guide/compound/byte02.py
+++ b/docs/examples/guide/compound/byte02.py
@@ -2,7 +2,7 @@
 
 from textual.app import App, ComposeResult
 from textual.containers import Container
-from textual.messages import Message
+from textual.message import Message
 from textual.reactive import reactive
 from textual.widget import Widget
 from textual.widgets import Input, Label, Switch
diff --git a/docs/examples/guide/compound/byte03.py b/docs/examples/guide/compound/byte03.py
--- a/docs/examples/guide/compound/byte03.py
+++ b/docs/examples/guide/compound/byte03.py
@@ -3,7 +3,7 @@
 from textual.app import App, ComposeResult
 from textual.containers import Container
 from textual.geometry import clamp
-from textual.messages import Message
+from textual.message import Message
 from textual.reactive import reactive
 from textual.widget import Widget
 from textual.widgets import Input, Label, Switch

{"golden_diff": "diff --git a/docs/examples/guide/compound/byte02.py b/docs/examples/guide/compound/byte02.py\n--- a/docs/examples/guide/compound/byte02.py\n+++ b/docs/examples/guide/compound/byte02.py\n@@ -2,7 +2,7 @@\n \n from textual.app import App, ComposeResult\n from textual.containers import Container\n-from textual.messages import Message\n+from textual.message import Message\n from textual.reactive import reactive\n from textual.widget import Widget\n from textual.widgets import Input, Label, Switch\ndiff --git a/docs/examples/guide/compound/byte03.py b/docs/examples/guide/compound/byte03.py\n--- a/docs/examples/guide/compound/byte03.py\n+++ b/docs/examples/guide/compound/byte03.py\n@@ -3,7 +3,7 @@\n from textual.app import App, ComposeResult\n from textual.containers import Container\n from textual.geometry import clamp\n-from textual.messages import Message\n+from textual.message import Message\n from textual.reactive import reactive\n from textual.widget import Widget\n from textual.widgets import Input, Label, Switch\n", "issue": "docs: `Message` not exported from `textual.messages`\nJust something minor I spotted while playing with the [Messages up](https://textual.textualize.io/guide/widgets/#messages-up) example in the docs. The code still works but my editor complains that:\r\n\r\n> \"Message\" is not exported from module \"textual.messages\"\r\n> Import from \"textual.message\" instead [reportPrivateImportUsage]\r\n\r\nHappy to submit a quick PR if deemed worth fixing!\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom textual.app import App, ComposeResult\nfrom textual.containers import Container\nfrom textual.messages import Message\nfrom textual.reactive import reactive\nfrom textual.widget import Widget\nfrom textual.widgets import Input, Label, Switch\n\n\nclass BitSwitch(Widget):\n    \"\"\"A Switch with a numeric label above it.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    BitSwitch {\n        layout: vertical;\n        width: auto;\n        height: auto;\n    }\n    BitSwitch > Label {\n        text-align: center;\n        width: 100%;\n    }\n    \"\"\"\n\n    class BitChanged(Message):\n        \"\"\"Sent when the 'bit' changes.\"\"\"\n\n        def __init__(self, bit: int, value: bool) -> None:\n            super().__init__()\n            self.bit = bit\n            self.value = value\n\n    value = reactive(0)  # (1)!\n\n    def __init__(self, bit: int) -> None:\n        self.bit = bit\n        super().__init__()\n\n    def compose(self) -> ComposeResult:\n        yield Label(str(self.bit))\n        yield Switch()\n\n    def on_switch_changed(self, event: Switch.Changed) -> None:  # (2)!\n        \"\"\"When the switch changes, notify the parent via a message.\"\"\"\n        event.stop()  # (3)!\n        self.value = event.value  # (4)!\n        self.post_message(self.BitChanged(self.bit, event.value))\n\n\nclass ByteInput(Widget):\n    \"\"\"A compound widget with 8 switches.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    ByteInput {\n        width: auto;\n        height: auto;\n        border: blank;\n        layout: horizontal;\n    }\n    ByteInput:focus-within {\n        border: heavy $secondary;\n    }\n    \"\"\"\n\n    def compose(self) -> ComposeResult:\n        for bit in reversed(range(8)):\n            yield BitSwitch(bit)\n\n\nclass ByteEditor(Widget):\n    DEFAULT_CSS = \"\"\"\n    ByteEditor > Container {\n        height: 1fr;\n        align: center middle;\n    }\n    ByteEditor > Container.top {\n        background: $boost;\n    }\n    ByteEditor Input {\n        width: 16;\n    }\n    \"\"\"\n\n    def compose(self) -> ComposeResult:\n        with Container(classes=\"top\"):\n            yield Input(placeholder=\"byte\")\n        with Container():\n            yield ByteInput()\n\n    def on_bit_switch_bit_changed(self, event: BitSwitch.BitChanged) -> None:\n        \"\"\"When a switch changes, update the value.\"\"\"\n        value = 0\n        for switch in self.query(BitSwitch):\n            value |= switch.value << switch.bit\n        self.query_one(Input).value = str(value)\n\n\nclass ByteInputApp(App):\n    def compose(self) -> ComposeResult:\n        yield ByteEditor()\n\n\nif __name__ == \"__main__\":\n    app = ByteInputApp()\n    app.run()\n", "path": "docs/examples/guide/compound/byte02.py"}, {"content": "from __future__ import annotations\n\nfrom textual.app import App, ComposeResult\nfrom textual.containers import Container\nfrom textual.geometry import clamp\nfrom textual.messages import Message\nfrom textual.reactive import reactive\nfrom textual.widget import Widget\nfrom textual.widgets import Input, Label, Switch\n\n\nclass BitSwitch(Widget):\n    \"\"\"A Switch with a numeric label above it.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    BitSwitch {\n        layout: vertical;\n        width: auto;\n        height: auto;\n    }\n    BitSwitch > Label {\n        text-align: center;\n        width: 100%;\n    }\n    \"\"\"\n\n    class BitChanged(Message):\n        \"\"\"Sent when the 'bit' changes.\"\"\"\n\n        def __init__(self, bit: int, value: bool) -> None:\n            super().__init__()\n            self.bit = bit\n            self.value = value\n\n    value = reactive(0)\n\n    def __init__(self, bit: int) -> None:\n        self.bit = bit\n        super().__init__()\n\n    def compose(self) -> ComposeResult:\n        yield Label(str(self.bit))\n        yield Switch()\n\n    def watch_value(self, value: bool) -> None:  # (1)!\n        \"\"\"When the value changes we want to set the switch accordingly.\"\"\"\n        self.query_one(Switch).value = value\n\n    def on_switch_changed(self, event: Switch.Changed) -> None:\n        \"\"\"When the switch changes, notify the parent via a message.\"\"\"\n        event.stop()\n        self.value = event.value\n        self.post_message(self.BitChanged(self.bit, event.value))\n\n\nclass ByteInput(Widget):\n    \"\"\"A compound widget with 8 switches.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    ByteInput {\n        width: auto;\n        height: auto;\n        border: blank;\n        layout: horizontal;\n    }\n    ByteInput:focus-within {\n        border: heavy $secondary;\n    }\n    \"\"\"\n\n    def compose(self) -> ComposeResult:\n        for bit in reversed(range(8)):\n            yield BitSwitch(bit)\n\n\nclass ByteEditor(Widget):\n    DEFAULT_CSS = \"\"\"\n    ByteEditor > Container {\n        height: 1fr;\n        align: center middle;\n    }\n    ByteEditor > Container.top {\n        background: $boost;\n    }\n    ByteEditor Input {\n        width: 16;\n    }\n    \"\"\"\n\n    value = reactive(0)\n\n    def validate_value(self, value: int) -> int:  # (2)!\n        \"\"\"Ensure value is between 0 and 255.\"\"\"\n        return clamp(value, 0, 255)\n\n    def compose(self) -> ComposeResult:\n        with Container(classes=\"top\"):\n            yield Input(placeholder=\"byte\")\n        with Container():\n            yield ByteInput()\n\n    def on_bit_switch_bit_changed(self, event: BitSwitch.BitChanged) -> None:\n        \"\"\"When a switch changes, update the value.\"\"\"\n        value = 0\n        for switch in self.query(BitSwitch):\n            value |= switch.value << switch.bit\n        self.query_one(Input).value = str(value)\n\n    def on_input_changed(self, event: Input.Changed) -> None:  # (3)!\n        \"\"\"When the text changes, set the value of the byte.\"\"\"\n        try:\n            self.value = int(event.value or \"0\")\n        except ValueError:\n            pass\n\n    def watch_value(self, value: int) -> None:  # (4)!\n        \"\"\"When self.value changes, update switches.\"\"\"\n        for switch in self.query(BitSwitch):\n            with switch.prevent(BitSwitch.BitChanged):  # (5)!\n                switch.value = bool(value & (1 << switch.bit))  # (6)!\n\n\nclass ByteInputApp(App):\n    def compose(self) -> ComposeResult:\n        yield ByteEditor()\n\n\nif __name__ == \"__main__\":\n    app = ByteInputApp()\n    app.run()\n", "path": "docs/examples/guide/compound/byte03.py"}], "after_files": [{"content": "from __future__ import annotations\n\nfrom textual.app import App, ComposeResult\nfrom textual.containers import Container\nfrom textual.message import Message\nfrom textual.reactive import reactive\nfrom textual.widget import Widget\nfrom textual.widgets import Input, Label, Switch\n\n\nclass BitSwitch(Widget):\n    \"\"\"A Switch with a numeric label above it.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    BitSwitch {\n        layout: vertical;\n        width: auto;\n        height: auto;\n    }\n    BitSwitch > Label {\n        text-align: center;\n        width: 100%;\n    }\n    \"\"\"\n\n    class BitChanged(Message):\n        \"\"\"Sent when the 'bit' changes.\"\"\"\n\n        def __init__(self, bit: int, value: bool) -> None:\n            super().__init__()\n            self.bit = bit\n            self.value = value\n\n    value = reactive(0)  # (1)!\n\n    def __init__(self, bit: int) -> None:\n        self.bit = bit\n        super().__init__()\n\n    def compose(self) -> ComposeResult:\n        yield Label(str(self.bit))\n        yield Switch()\n\n    def on_switch_changed(self, event: Switch.Changed) -> None:  # (2)!\n        \"\"\"When the switch changes, notify the parent via a message.\"\"\"\n        event.stop()  # (3)!\n        self.value = event.value  # (4)!\n        self.post_message(self.BitChanged(self.bit, event.value))\n\n\nclass ByteInput(Widget):\n    \"\"\"A compound widget with 8 switches.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    ByteInput {\n        width: auto;\n        height: auto;\n        border: blank;\n        layout: horizontal;\n    }\n    ByteInput:focus-within {\n        border: heavy $secondary;\n    }\n    \"\"\"\n\n    def compose(self) -> ComposeResult:\n        for bit in reversed(range(8)):\n            yield BitSwitch(bit)\n\n\nclass ByteEditor(Widget):\n    DEFAULT_CSS = \"\"\"\n    ByteEditor > Container {\n        height: 1fr;\n        align: center middle;\n    }\n    ByteEditor > Container.top {\n        background: $boost;\n    }\n    ByteEditor Input {\n        width: 16;\n    }\n    \"\"\"\n\n    def compose(self) -> ComposeResult:\n        with Container(classes=\"top\"):\n            yield Input(placeholder=\"byte\")\n        with Container():\n            yield ByteInput()\n\n    def on_bit_switch_bit_changed(self, event: BitSwitch.BitChanged) -> None:\n        \"\"\"When a switch changes, update the value.\"\"\"\n        value = 0\n        for switch in self.query(BitSwitch):\n            value |= switch.value << switch.bit\n        self.query_one(Input).value = str(value)\n\n\nclass ByteInputApp(App):\n    def compose(self) -> ComposeResult:\n        yield ByteEditor()\n\n\nif __name__ == \"__main__\":\n    app = ByteInputApp()\n    app.run()\n", "path": "docs/examples/guide/compound/byte02.py"}, {"content": "from __future__ import annotations\n\nfrom textual.app import App, ComposeResult\nfrom textual.containers import Container\nfrom textual.geometry import clamp\nfrom textual.message import Message\nfrom textual.reactive import reactive\nfrom textual.widget import Widget\nfrom textual.widgets import Input, Label, Switch\n\n\nclass BitSwitch(Widget):\n    \"\"\"A Switch with a numeric label above it.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    BitSwitch {\n        layout: vertical;\n        width: auto;\n        height: auto;\n    }\n    BitSwitch > Label {\n        text-align: center;\n        width: 100%;\n    }\n    \"\"\"\n\n    class BitChanged(Message):\n        \"\"\"Sent when the 'bit' changes.\"\"\"\n\n        def __init__(self, bit: int, value: bool) -> None:\n            super().__init__()\n            self.bit = bit\n            self.value = value\n\n    value = reactive(0)\n\n    def __init__(self, bit: int) -> None:\n        self.bit = bit\n        super().__init__()\n\n    def compose(self) -> ComposeResult:\n        yield Label(str(self.bit))\n        yield Switch()\n\n    def watch_value(self, value: bool) -> None:  # (1)!\n        \"\"\"When the value changes we want to set the switch accordingly.\"\"\"\n        self.query_one(Switch).value = value\n\n    def on_switch_changed(self, event: Switch.Changed) -> None:\n        \"\"\"When the switch changes, notify the parent via a message.\"\"\"\n        event.stop()\n        self.value = event.value\n        self.post_message(self.BitChanged(self.bit, event.value))\n\n\nclass ByteInput(Widget):\n    \"\"\"A compound widget with 8 switches.\"\"\"\n\n    DEFAULT_CSS = \"\"\"\n    ByteInput {\n        width: auto;\n        height: auto;\n        border: blank;\n        layout: horizontal;\n    }\n    ByteInput:focus-within {\n        border: heavy $secondary;\n    }\n    \"\"\"\n\n    def compose(self) -> ComposeResult:\n        for bit in reversed(range(8)):\n            yield BitSwitch(bit)\n\n\nclass ByteEditor(Widget):\n    DEFAULT_CSS = \"\"\"\n    ByteEditor > Container {\n        height: 1fr;\n        align: center middle;\n    }\n    ByteEditor > Container.top {\n        background: $boost;\n    }\n    ByteEditor Input {\n        width: 16;\n    }\n    \"\"\"\n\n    value = reactive(0)\n\n    def validate_value(self, value: int) -> int:  # (2)!\n        \"\"\"Ensure value is between 0 and 255.\"\"\"\n        return clamp(value, 0, 255)\n\n    def compose(self) -> ComposeResult:\n        with Container(classes=\"top\"):\n            yield Input(placeholder=\"byte\")\n        with Container():\n            yield ByteInput()\n\n    def on_bit_switch_bit_changed(self, event: BitSwitch.BitChanged) -> None:\n        \"\"\"When a switch changes, update the value.\"\"\"\n        value = 0\n        for switch in self.query(BitSwitch):\n            value |= switch.value << switch.bit\n        self.query_one(Input).value = str(value)\n\n    def on_input_changed(self, event: Input.Changed) -> None:  # (3)!\n        \"\"\"When the text changes, set the value of the byte.\"\"\"\n        try:\n            self.value = int(event.value or \"0\")\n        except ValueError:\n            pass\n\n    def watch_value(self, value: int) -> None:  # (4)!\n        \"\"\"When self.value changes, update switches.\"\"\"\n        for switch in self.query(BitSwitch):\n            with switch.prevent(BitSwitch.BitChanged):  # (5)!\n                switch.value = bool(value & (1 << switch.bit))  # (6)!\n\n\nclass ByteInputApp(App):\n    def compose(self) -> ComposeResult:\n        yield ByteEditor()\n\n\nif __name__ == \"__main__\":\n    app = ByteInputApp()\n    app.run()\n", "path": "docs/examples/guide/compound/byte03.py"}]}