Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 5.3 #2572

Merged
merged 25 commits into from
Jul 1, 2021
Merged

API 5.3 #2572

merged 25 commits into from
Jul 1, 2021

Conversation

Bibo-Joshi
Copy link
Member

@Bibo-Joshi Bibo-Joshi commented Jun 25, 2021

  • BotCommandScope* is just for input, never output (at least for now), so we don't really need a proper de_json. But I realized that only after I had implemented it … If you think it's superfluous, we can remove
  • Leaving the checklists empty for now so we can go over them once in the end.

Checklist for PRs

  • Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Added myself alphabetically to AUTHORS.rst (optional)

If the PR contains API changes (otherwise, you can delete this passage)

  • New classes:

    • Added self._id_attrs and corresponding documentation
    • __init__ accepts **_kwargs
  • Added new shortcuts:

    • In Chat & User for all methods that accept chat/user_id -> We need to deprecate Chat.get_members_count in favor of a new Chat.get_member_count and the same for kick_chat_member -> ban_chat_member
    • [ ] In Message for all methods that accept chat_id and message_id
    • [ ] For new Message shortcuts: Added quote argument if methods accepts reply_to_message_id
    • [ ] In CallbackQuery for all methods that accept either chat_id and message_id or inline_message_id
  • If relevant:

    • Added new constants at telegram.constants and shortcuts to them as class variables
    • [ ] Added new handlers for new update types
    • [ ] Added new filters for new message (sub)types
    • Added or updated documentation for the changed class(es) and/or method(s)
    • Updated the Bot API version number in all places: README.rst and README_RAW.rst (including the badge), as well as telegram.constants.BOT_API_VERSION
    • [ ] Added logic for arbitrary callback data in tg.ext.Bot for new methods that either accept a reply_markup in some form or have a return type that is/contains telegram.Message

@Bibo-Joshi Bibo-Joshi added the API label Jun 25, 2021
@Bibo-Joshi Bibo-Joshi changed the title BotCommandScopes API 5.3 Jun 25, 2021
@Bibo-Joshi Bibo-Joshi marked this pull request as ready for review June 25, 2021 19:42
Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scopes look good - one tiny doc fix.

telegram/botcommandscope.py Outdated Show resolved Hide resolved
Bibo-Joshi and others added 6 commits June 26, 2021 08:35
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there. Relax, I am just a little warning for the maintainers to release directly after merging your PR, otherwise we have broken examples and people might get confused :)

telegram/bot.py Outdated Show resolved Hide resolved
telegram/bot.py Outdated Show resolved Hide resolved
telegram/forcereply.py Outdated Show resolved Hide resolved
telegram/forcereply.py Show resolved Hide resolved
telegram/replykeyboardmarkup.py Show resolved Hide resolved
telegram/replykeyboardmarkup.py Outdated Show resolved Hide resolved
'i will not go away' has gone away 😢
telegram/bot.py Outdated Show resolved Hide resolved
telegram/bot.py Outdated Show resolved Hide resolved
telegram/bot.py Outdated Show resolved Hide resolved
harshil21 and others added 2 commits June 27, 2021 00:47
Signed-off-by: starry69 <starry369126@outlook.com>
@harshil21 harshil21 added this to the v13.7 milestone Jun 27, 2021
Bibo-Joshi and others added 3 commits June 28, 2021 08:53
# Conflicts:
#	tests/test_bot.py
Signed-off-by: starry69 <starry369126@outlook.com>
tests/test_chatmember.py Outdated Show resolved Hide resolved
telegram/chatmember.py Show resolved Hide resolved
telegram/chatmember.py Outdated Show resolved Hide resolved
telegram/chatmember.py Outdated Show resolved Hide resolved
telegram/chatmember.py Show resolved Hide resolved
docs/source/telegram.chatmemberadministrator.rst Outdated Show resolved Hide resolved
telegram/chatmember.py Outdated Show resolved Hide resolved
tests/test_chatmember.py Outdated Show resolved Hide resolved
telegram/chatmember.py Outdated Show resolved Hide resolved
Signed-off-by: starry69 <starry369126@outlook.com>
tests/test_chatmember.py Outdated Show resolved Hide resolved
@Bibo-Joshi
Copy link
Member Author

Note about slots: I had remove the test lines that @harshil21 pointed out, b/c we are adding new classes and I thought that we don't need to have __dict__ for them. But that's already added in the TelegramObject base class and it's more trouble to try & remove that for the new classes than to just have the deprecation warning raised :)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Looks like you edited README.rst or README_RAW.rst. I'm just a friendly reminder to apply relevant changes to both of those files :)

telegram/chatmember.py Outdated Show resolved Hide resolved
harshil21 and others added 4 commits June 29, 2021 23:32
Signed-off-by: starry69 <starry369126@outlook.com>
Signed-off-by: starry69 <starry369126@outlook.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants