|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
3 | 3 | # Import submodules |
4 | | -from capnp import lib as lib |
5 | | -from capnp import version as version |
6 | | -from capnp.lib.capnp import ( |
7 | | - # Public classes |
8 | | - AsyncIoStream as AsyncIoStream, |
9 | | -) |
| 4 | +from capnp import lib, version |
10 | 5 |
|
11 | | -# Re-export everything from lib.capnp that's part of the public API |
| 6 | +# Import the types module from lib.capnp where it's actually defined |
12 | 7 | from capnp.lib.capnp import ( |
| 8 | + # Public classes |
| 9 | + AsyncIoStream, |
13 | 10 | # Exception classes |
14 | | - KjException as KjException, |
15 | | -) |
16 | | -from capnp.lib.capnp import ( |
17 | | - SchemaLoader as SchemaLoader, |
18 | | -) |
19 | | -from capnp.lib.capnp import ( |
20 | | - SchemaParser as SchemaParser, |
21 | | -) |
22 | | -from capnp.lib.capnp import ( |
23 | | - TwoPartyClient as TwoPartyClient, |
24 | | -) |
25 | | -from capnp.lib.capnp import ( |
26 | | - TwoPartyServer as TwoPartyServer, |
27 | | -) |
28 | | -from capnp.lib.capnp import ( |
29 | | - # Internal classes that are re-exported |
30 | | - _CapabilityClient as _CapabilityClient, |
31 | | -) |
32 | | -from capnp.lib.capnp import ( |
33 | | - _DynamicCapabilityClient as _DynamicCapabilityClient, |
34 | | -) |
35 | | -from capnp.lib.capnp import ( |
36 | | - _DynamicListBuilder as _DynamicListBuilder, |
37 | | -) |
38 | | -from capnp.lib.capnp import ( |
39 | | - _DynamicListReader as _DynamicListReader, |
40 | | -) |
41 | | -from capnp.lib.capnp import ( |
42 | | - _DynamicOrphan as _DynamicOrphan, |
43 | | -) |
44 | | -from capnp.lib.capnp import ( |
45 | | - _DynamicResizableListBuilder as _DynamicResizableListBuilder, |
46 | | -) |
47 | | -from capnp.lib.capnp import ( |
48 | | - _DynamicStructBuilder as _DynamicStructBuilder, |
49 | | -) |
50 | | -from capnp.lib.capnp import ( |
51 | | - _DynamicStructReader as _DynamicStructReader, |
52 | | -) |
53 | | -from capnp.lib.capnp import ( |
54 | | - _EventLoop as _EventLoop, |
55 | | -) |
56 | | -from capnp.lib.capnp import ( |
57 | | - _init_capnp_api as _init_capnp_api, |
58 | | -) |
59 | | -from capnp.lib.capnp import ( |
60 | | - _InterfaceModule as _InterfaceModule, |
61 | | -) |
62 | | -from capnp.lib.capnp import ( |
63 | | - _ListSchema as _ListSchema, |
64 | | -) |
65 | | -from capnp.lib.capnp import ( |
66 | | - _MallocMessageBuilder as _MallocMessageBuilder, |
67 | | -) |
68 | | -from capnp.lib.capnp import ( |
69 | | - _PackedFdMessageReader as _PackedFdMessageReader, |
70 | | -) |
71 | | -from capnp.lib.capnp import ( |
72 | | - _PyCustomMessageBuilder as _PyCustomMessageBuilder, |
73 | | -) |
74 | | -from capnp.lib.capnp import ( |
75 | | - _StreamFdMessageReader as _StreamFdMessageReader, |
76 | | -) |
77 | | -from capnp.lib.capnp import ( |
78 | | - _StructModule as _StructModule, |
79 | | -) |
80 | | -from capnp.lib.capnp import ( |
81 | | - _write_message_to_fd as _write_message_to_fd, |
82 | | -) |
83 | | -from capnp.lib.capnp import ( |
84 | | - _write_packed_message_to_fd as _write_packed_message_to_fd, |
85 | | -) |
86 | | -from capnp.lib.capnp import ( |
| 11 | + KjException, |
| 12 | + SchemaLoader, |
| 13 | + SchemaParser, |
| 14 | + TwoPartyClient, |
| 15 | + TwoPartyServer, |
| 16 | + # Internal classes and functions that are re-exported |
| 17 | + _CapabilityClient, |
| 18 | + _DynamicCapabilityClient, |
| 19 | + _DynamicListBuilder, |
| 20 | + _DynamicListReader, |
| 21 | + _DynamicOrphan, |
| 22 | + _DynamicResizableListBuilder, |
| 23 | + _DynamicStructBuilder, |
| 24 | + _DynamicStructReader, |
| 25 | + _EventLoop, |
| 26 | + _init_capnp_api, |
| 27 | + _InterfaceModule, |
| 28 | + _ListSchema, |
| 29 | + _MallocMessageBuilder, |
| 30 | + _PackedFdMessageReader, |
| 31 | + _PyCustomMessageBuilder, |
| 32 | + _StreamFdMessageReader, |
| 33 | + _StructModule, |
| 34 | + _write_message_to_fd, |
| 35 | + _write_packed_message_to_fd, |
87 | 36 | # Public functions |
88 | | - add_import_hook as add_import_hook, |
89 | | -) |
90 | | -from capnp.lib.capnp import ( |
91 | | - cleanup_global_schema_parser as cleanup_global_schema_parser, |
92 | | -) |
93 | | -from capnp.lib.capnp import ( |
94 | | - deregister_all_types as deregister_all_types, |
95 | | -) |
96 | | -from capnp.lib.capnp import ( |
97 | | - fill_context as fill_context, |
98 | | -) |
99 | | -from capnp.lib.capnp import ( |
100 | | - kj_loop as kj_loop, |
101 | | -) |
102 | | -from capnp.lib.capnp import ( |
103 | | - load as load, |
104 | | -) |
105 | | -from capnp.lib.capnp import ( |
106 | | - read_multiple_bytes_packed as read_multiple_bytes_packed, |
107 | | -) |
108 | | -from capnp.lib.capnp import ( |
109 | | - register_type as register_type, |
110 | | -) |
111 | | -from capnp.lib.capnp import ( |
112 | | - remove_import_hook as remove_import_hook, |
113 | | -) |
114 | | -from capnp.lib.capnp import ( |
115 | | - run as run, |
116 | | -) |
117 | | - |
118 | | -# Import the types module from lib.capnp where it's actually defined |
119 | | -from capnp.lib.capnp import types as types |
120 | | -from capnp.lib.capnp import ( |
121 | | - void_task_done_callback as void_task_done_callback, |
| 37 | + add_import_hook, |
| 38 | + cleanup_global_schema_parser, |
| 39 | + deregister_all_types, |
| 40 | + fill_context, |
| 41 | + kj_loop, |
| 42 | + load, |
| 43 | + read_multiple_bytes_packed, |
| 44 | + register_type, |
| 45 | + remove_import_hook, |
| 46 | + run, |
| 47 | + types, |
| 48 | + void_task_done_callback, |
122 | 49 | ) |
123 | 50 |
|
| 51 | +# Re-export everything from lib.capnp that's part of the public API |
124 | 52 | # Version string |
125 | 53 | from capnp.version import version as __version__ |
126 | 54 |
|
|
0 commit comments