Remove standalone Telegram/Naver clients from public API - #189
Merged
Conversation
Drop top-level re-exports + __all__ entries for Telegram/Naver (datamaxi) and AsyncTelegram/AsyncNaver (datamaxi.aio); bind aio mount imports privately so the names aren't importable. Impl classes kept, reachable only via maxi.telegram / maxi.naver. Tests source the classes from their package modules / mounts. Closes #188
martinkersner
force-pushed
the
issue-188-remove-standalone-telegram-naver
branch
from
July 6, 2026 05:04
d702907 to
5555d3d
Compare
docs/{telegram,naver-trend,async}.md showed the removed standalone
imports (from datamaxi import Telegram, from datamaxi.aio import
AsyncTelegram, ...) — repoint to maxi.telegram / client.telegram.
Split the not-top-level-importable assertion per resource file.
Mirrors sync layout (Datamaxi in resources/): aio/__init__.py is now a pure re-export file, so the impl classes import normally in _client.py instead of the _AsyncTelegram/_AsyncNaver alias hack. Telegram/Naver stay off the public aio surface; client.telegram/.naver unchanged. Closes #190
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drops the standalone
Telegram/Naver/AsyncTelegram/AsyncNaverclients as a public access path. After #186 mounted them asmaxi.telegram/maxi.naver(sharing the client'sSession), the standalone path was redundant and bypassed the shared retry/return-shape config. One access path — via the client — is the intended surface.__all__entries indatamaxi/__init__.py.Datamaxialready lives in thedatamaxi/resources/submodule, so the top-level init never bindsTelegram/Naver.AsyncDatamaxiinto a privatedatamaxi/aio/_client.py(mirroring the syncresourceslayout) sodatamaxi/aio/__init__.pybecomes a pure re-export file. The impl classes now import normally in_client.py— no_AsyncTelegram/_AsyncNaveralias hack — andTelegram/Naversimply aren't re-exported, sofrom datamaxi.aio import AsyncTelegramno longer resolves.maxi.telegram/maxi.naver. Mounts unchanged.datamaxi.telegrametc.); livetelegram/naverconftest fixtures now use the mounts. Added surface tests asserting the standalone names are no longer top-level importable.Breaking change
from datamaxi import Telegram/Naverandfrom datamaxi.aio import AsyncTelegram/AsyncNaverstop working. UseDatamaxi(...).telegram/.naver(async twins onAsyncDatamaxi).Test plan
uv run pytest tests/ -m "not integration"— 236 passed, 11 skipped.[async]extra):datamaxi.Telegram/Naveranddatamaxi.aio.AsyncTelegram/AsyncNaverraise;Datamaxi/AsyncDatamaxi+ mounts still work.Closes #188
Closes #190