Skip to content

Deprecate v2#991

Draft
habara-k wants to merge 1 commit intoadd-unified-clientfrom
deprecate-v2
Draft

Deprecate v2#991
habara-k wants to merge 1 commit intoadd-unified-clientfrom
deprecate-v2

Conversation

@habara-k
Copy link
Copy Markdown
Contributor

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

Motivation

With LineBotClient / AsyncLineBotClient available as the recommended entry point, the legacy linebot (v2) modules should be explicitly marked as deprecated to guide users toward
migration.

What's changed

Deprecation annotations

  • linebot/api.py: Updated all @deprecated messages on LineBotApi class and every method to point to LineBotClient instead of individual v3 API classes (e.g., MessagingApi)
  • linebot/async_api.py: Same treatment for AsyncLineBotApi, pointing to AsyncLineBotClient
  • linebot/models/*.py (13 files): Added @deprecated decorator to all model classes (Action, PostbackAction, FlexMessage, RichMenuSize, etc.) pointing to their
    linebot.v3.messaging / linebot.v3.webhooks equivalents
  • linebot/http_client.py, linebot/async_http_client.py, linebot/aiohttp_async_http_client.py: Added @deprecated to HttpClient, RequestsHttpClient,
    AsyncHttpClient, etc.
  • linebot/exceptions.py: Added @deprecated to BaseError and LineBotApiError
  • linebot/constants/postback_input_option.py: Added @deprecated

MIGRATION.md

Comprehensive migration guide covering:

  • Client construction (before/after)
  • Import mapping (linebot.modelslinebot.v3.messaging / linebot.v3.webhooks)
  • Method name mapping with examples
  • Error handling changes
  • Full before/after echo-bot example

README.rst

  • Added link to MIGRATION.md in the Version 3.x section

@habara-k habara-k changed the base branch from master to add-unified-client April 14, 2026 07:49
@habara-k habara-k force-pushed the add-unified-client branch from 998f73d to 47a6acb Compare April 14, 2026 08:21
@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