refactor: rename sessions submodule to _sessions to avoid shadowing sessions()

wabot/__init__.py defines def sessions(...) and also had a sessions.py
submodule, so wabot.sessions (attribute) resolved to the function,
shadowing the module for import wabot.sessions as m style access. This
is the same class of collision that browser.py -> _browser.py already
fixed. Renaming to _sessions.py removes the ambiguity and lets
docs/api.rst drop the :no-index: Sphinx workaround in favor of plain
autoclass directives on the public SessionRecord/SessionStore
re-exports.
This commit is contained in:
Mathew Sir Guest the best
2026-07-12 15:37:56 -06:00
parent 68978a34e7
commit 154344e94a
8 changed files with 26 additions and 21 deletions
+1 -1
View File
@@ -36,6 +36,6 @@ def site_url():
@pytest.fixture
def store(tmp_path):
from wabot.sessions import SessionStore
from wabot import SessionStore
return SessionStore(path=tmp_path / "sessions.json")
+1 -1
View File
@@ -15,7 +15,7 @@ REATTACH_SCRIPT = textwrap.dedent(
"""
import json, sys
import wabot
from wabot.sessions import SessionStore
from wabot import SessionStore
store = SessionStore(path=sys.argv[1])
bot = wabot.browser(session=sys.argv[2], pacing=wabot.NoPacing(), store=store)