Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

API 4.5#1508

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 38 commits intomasterfromnested-entities
Mar 28, 2020
Merged

API 4.5#1508

Bibo-Joshi merged 38 commits intomasterfromnested-entities
Mar 28, 2020

Conversation

Bibo-Joshi
Copy link
Member

@Bibo-JoshiBibo-Joshi commentedSep 6, 2019
edited
Loading

PR for the API 4.5 changes.Closes#1689

  • Two new messageEntities, strikethrough and underline
  • nested messageEntities
  • New parsemode, MardownV2
  • New file_unique_id for Animation, Audio, Document, PassportFile, PhotoSize, Sticker, Video, VideoNote, Voice, File
  • small_file_unique_id and big_file_unique_id to the object ChatPhoto.
  • custom_title for ChatMember
  • new method setChatAdministratorCustomTitle
  • new slow_mode_delay for Chat object
  • Before merge, merge master and reverttemporarily skip tests failing b/c missing api 4.5 #1738
  • When merged, update thiswiki page.

Original description:

Cherry-picked from#1464 since we're not sure yet how Telegram will actually handle nested entities in API 4.5.

This only allows something like_bold *within* italic_ and not*bold _overlapping* italic_. The announcement is not every clear, if that is also allowed …

Leaving this here as a reminder, that we already have some code for that case.

gpchelkin reacted with thumbs up emoji
@Bibo-JoshiBibo-Joshi mentioned this pull requestSep 6, 2019
@Bibo-JoshiBibo-Joshi added the ⚙️ bot-apiaffected functionality: bot-api labelSep 6, 2019
@EldinnieEldinnie added the 📋 do-not-merge-yetwork status: do-not-merge-yet labelSep 9, 2019
@Bibo-JoshiBibo-Joshi mentioned this pull requestJan 2, 2020
8 tasks
dmytrohoiand others added2 commitsJanuary 3, 2020 01:45
Changes: - custom_title for ChatMember - new method setChatAdministratorCustomTitle for Bot - new slow_mode_delay for ChatUpdate due to new API future `custom_title` from API 4.5 (https://core.telegram.org/bots/api#december-31-2019)
@Bibo-JoshiBibo-Joshi changed the titleAPI 4.5: Nested entitiesAPI 4.5Jan 3, 2020
@Bibo-JoshiBibo-Joshi removed the 📋 do-not-merge-yetwork status: do-not-merge-yet labelJan 3, 2020
@Bibo-Joshi
Copy link
MemberAuthor

The PR is ready for review now. The test failures seem unrelated (TestBot.test_pin_and_unpin_message andTestConversationHandler.test_per_message_false_warning_is_only_shown_once are nothing we fiddled with)

dmytrohoi reacted with thumbs up emoji

@Bibo-JoshiBibo-Joshi requested review fromEldinnie andtsnoam and removed request forEldinnieJanuary 8, 2020 19:29
Copy link
Contributor

@dmytrohoidmytrohoi left a comment
edited
Loading

Choose a reason for hiding this comment

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

Reviewers, what do you think:

  1. Should we add a shortcut forbot.set_chat_administrator_custom_title() to ChatMember class from chatmember.py?
  2. I think because of this description,This is an obsolete mode saved for backward compatibility. To use this mode, pass Markdown to the parse_mode field fromchapter "Markdown" in Telegram Bot API documentation, we need to useMarkdownV2 as * default * option in all related to markdown functions.
  3. Instead of themarkdown_smt_v2 statements, perhaps we need to use the markdown_v2_smt? (one of them is commented in this review)

@Bibo-Joshi
Copy link
MemberAuthor

  1. Should we add a shortcut forbot.set_chat_administrator_custom_title() to ChatMember class from chatmember.py?
  2. I think because of this description,This is an obsolete mode saved for backward compatibility. To use this mode, pass Markdown to the parse_mode field fromchapter "Markdown" in Telegram Bot API documentation, we need to useMarkdownV2 as * default * option in all related to markdown functions.
  3. Instead of themarkdown_smt_v2 statements, perhaps we need to use the markdown_v2_smt? (one of them is commented in this review)
  1. and 3. sound good to me. Could do it in the next days, but if you want to, please go ahead.

  2. There is no default value forparse_mode anywhere, there is onlyMessage.reply_markdown (correct me, if I'm missing something). For the latter, there isMessage.reply_markdown_v2 now. For the former,Add default values #1490 is the PR, but it's left to the user to choose a default value, which makes sense because just puttingMarkdownV2 as default would break backwards compitibility since it requires more characters to be escaped than v1

@Eldinnie
Copy link
Member

Overall looking good. Just some questions and remarks added

@Eldinnie
Copy link
Member

Codecov, mainly is unhappy because of the added checks for py2 (in parse_entities) which are never hit, because we don't test 2.7 anymore. You can ignore it

Copy link
MemberAuthor

@Bibo-JoshiBibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thanks for the review@Eldinnie! Will try to incorporate the changes on the WE at the latest

@PoolitzerTelegram GithubBot Revised
Copy link
Member

@Bibo-Joshi Since we want to get this done asap, I guess I can chime in this afternoon for me, if thats alright with you

@Bibo-Joshi
Copy link
MemberAuthor

Latest commit closes#1654 . Put this here since we're fiddling with_parse_markdown anyway and we would have merge conflicts else …

@PoolitzerPoolitzer mentioned this pull requestFeb 17, 2020
2 tasks
@gpchelkin
Copy link

Just a friendly reminder, I think it better belongs here. Please bump supported Bot API version number inhttps://github.com/python-telegram-bot/python-telegram-bot/blob/master/README.rst

It says 4.1 now, but one could tell from the changelogs, that actually it is 4.4 now. I think it might be repelling or misleading for new users of this great wrapper :-)

@Bibo-Joshi
Copy link
MemberAuthor

Bibo-Joshi commentedMar 6, 2020
edited
Loading

pytest failures seem unrelated (test_conversation_timeout_cancel_conflict)
codecov complains that inMessage._parse_*, the parts forif sys.maxunicode == 0xffff are not hit, but I woudn't know how to test that …

@Bibo-JoshiBibo-Joshi mentioned this pull requestMar 28, 2020
@Bibo-JoshiBibo-Joshi merged commit8d2c7af intomasterMar 28, 2020
@Bibo-JoshiBibo-Joshi deleted the nested-entities branchMarch 28, 2020 17:13
blueset added a commit to ehForwarderBot/efb-telegram-master that referenced this pull requestApr 3, 2020
…ique_id`` attribute.NOTE: this will only work when `PTB supports Bot API 4.5`__.__python-telegram-bot/python-telegram-bot#1508
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsAug 18, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@PoolitzerPoolitzerPoolitzer left review comments

@EldinnieEldinnieEldinnie requested changes

@dmytrohoidmytrohoidmytrohoi approved these changes

@tsnoamtsnoamAwaiting requested review from tsnoam

Assignees
No one assigned
Labels
⚙️ bot-apiaffected functionality: bot-api
Projects
None yet
Milestone
12.4.3
Development

Successfully merging this pull request may close these issues.

4.5 bot api update arrived
5 participants
@Bibo-Joshi@Eldinnie@Poolitzer@gpchelkin@dmytrohoi

[8]ページ先頭

©2009-2025 Movatter.jp