Mv `._clustering` -> `.experimental._cluster`

Move clustering API to experimental subpkg since it's not
yet stabilized for public use.

Deats,
- rename mod as `._clustering.py` -> ._cluster.py`.
- drop `open_actor_cluster` from `tractor.__init__`
- add `open_actor_cluster` to `tractor.experimental.__init__`
- update imports in rest of repo.
- fix typo in `tractor.__init__` doc-string: "structurred"
  -> "structured"
- use multiline import style for `._pubsub` in experimental
  `__init__`

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
clustering_to_experimental
Gud Boi 2026-02-11 14:26:59 -05:00
parent 99076e0eae
commit e5f765f29c
5 changed files with 9 additions and 8 deletions

View File

@ -19,7 +19,7 @@ async def main():
# look at this hip new syntax! # look at this hip new syntax!
async with ( async with (
tractor.open_actor_cluster( tractor.experimental.open_actor_cluster(
modules=[__name__] modules=[__name__]
) as portal_map, ) as portal_map,

View File

@ -3,7 +3,7 @@ import itertools
import pytest import pytest
import trio import trio
import tractor import tractor
from tractor import open_actor_cluster from tractor.experimental import open_actor_cluster
from tractor.trionics import gather_contexts from tractor.trionics import gather_contexts
from tractor._testing import tractor_test from tractor._testing import tractor_test

View File

@ -15,13 +15,9 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
""" """
tractor: structured concurrent ``trio``-"actors". tractor: distributed structurred concurrency
""" """
from ._clustering import (
open_actor_cluster as open_actor_cluster,
)
from ._context import ( from ._context import (
Context as Context, # the type Context as Context, # the type
context as context, # a func-decorator context as context, # a func-decorator

View File

@ -21,7 +21,12 @@ built-ins.
This is a staging area for ``tractor.builtin``. This is a staging area for ``tractor.builtin``.
''' '''
from ._pubsub import pub as msgpub from ._cluster import (
open_actor_cluster as open_actor_cluster,
)
from ._pubsub import (
pub as msgpub,
)
__all__ = [ __all__ = [