Skip to content

Remove all deprecated codes#992

Draft
habara-k wants to merge 2 commits intodeprecate-v2from
remove-v2
Draft

Remove all deprecated codes#992
habara-k wants to merge 2 commits intodeprecate-v2from
remove-v2

Conversation

@habara-k
Copy link
Copy Markdown
Contributor

@habara-k habara-k commented Apr 14, 2026

Motivation

With LineBotClient / AsyncLineBotClient established as the single entry point and all legacy code already marked @deprecated in the previous PR, the v2 linebot modules are no longer needed. Removing them reduces the package size, eliminates confusion between two parallel APIs, and ensures new users only see the supported path.

What's changed

Deleted

  • linebot/api.py, linebot/async_api.py — legacy LineBotApi / AsyncLineBotApi classes
  • linebot/models/ (26 files) — all v2 model classes (Action, FlexMessage, RichMenu, Template, etc.)
  • linebot/constants/ — v2 constants
  • linebot/http_client.py, linebot/async_http_client.py, linebot/aiohttp_async_http_client.py — v2 HTTP client layer
  • linebot/exceptions.py — v2 BaseError, LineBotApiError
  • linebot/utils.py, linebot/webhook.py — v2 utilities and webhook (v3 has its own at linebot/v3/webhook.py)
  • linebot/deprecations.py — deprecation warning classes (no longer needed)
  • tests/api/, tests/async_api/, tests/models/, tests/test_*.py, tests/text/ — all v2 tests
  • docs/source/linebot.rst, docs/source/linebot.models.rst — v2 Sphinx docs

Modified

  • linebot/__init__.py — stripped down to only export __version__
  • setup.py — removed CodegenCommand (generated async_api.py from api.py) and subprocess import
  • requirements.txt — removed Deprecated package dependency
  • README.rst — replaced "How to suppress deprecation warnings" section with a note that v2 modules have been removed
  • docs/source/index.rst — removed linebot from toctree (only linebot.v3 remains)

@habara-k habara-k force-pushed the remove-v2 branch 2 times, most recently from 5bfc364 to 6c580dc Compare April 14, 2026 08:25
@habara-k habara-k self-assigned this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant