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 4.8 #1917

Merged
merged 7 commits into from
May 2, 2020
Merged

Api 4.8 #1917

merged 7 commits into from
May 2, 2020

Conversation

Bibo-Joshi
Copy link
Member

@Bibo-Joshi Bibo-Joshi commented Apr 24, 2020

Pure API changes

  • Bot.send_poll: explanation, explanation_parse_mode,
  • Poll.{explanation, explanation_entities, open_period, close_date}
  • Bot.send_dice: emoji (for whatever reason, sending a 'darts' is considered a die now …
  • Dice.emoji

Convenience stuff

  • Poll.parse_explanation_entity/ies
  • Filters.dice.dice and Filters.dice.darts for filtering only the corresponding emojis. Allow the Filters.dice.*([1, 2]) syntax for both

Todo

  • Release notification should maybe include a statemant, that Dice a second positional argument.
  • Telegram seems to have changed something with the photos. Getting telegram.error.BadRequest: Type of file mismatch. Need to investigate

@Bibo-Joshi Bibo-Joshi added the API label Apr 24, 2020
Copy link
Member

@Bibo-Joshi Last time I faced this error in the support groups I suggested checking the dimensions of it. Maybe try uploading said photo as document, if that works, that might be it?

Copy link
Member Author

@Poolitzer Problem seems to be sending a photo via

with open('tests/data/thumb.jpg', 'rb') as f:
    bot.send_photo(chat_id, f)

Problem persists, if I swat tests/data/telegram.jpg with telegram.png or thumb.jpg. However, I have no problems sending the to myself with a personal bot(token). Could that be a type of flood control? We have been getting some flooding errors in the tests recently … @tsnoam maybe we can add new/replace the existing tests bots?

Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

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

great PR, slight improvement

telegram/dice.py Outdated Show resolved Hide resolved
@Poolitzer
Copy link
Member

One thing: What about adding the emojis from Dice as constants? We normally do that. Right now we only have a list.

@Bibo-Joshi
Copy link
Member Author

One thing: What about adding the emojis from Dice as constants? We normally do that. Right now we only have a list.

Added that. Still kept the ALL_EMOJI list, though

Copy link
Member

@Bibo-Joshi Sure, didnt complain about that ;P

@Bibo-Joshi
Copy link
Member Author

CI Fail: test_max_caption_length gives an Internal server error for some reason. seems unrelated.
Coverage: can't test utf-16 encoding, that's basically it. Still, codecov is satisfied.

Copy link
Member

@tsnoam tsnoam left a comment

Choose a reason for hiding this comment

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

In general looks good. A small comment on docstring.

However, I did not understand the following action item in the PR description:

Release notification should maybe include a statemant, that Dice a second positional argument.

telegram/bot.py Outdated Show resolved Hide resolved
Co-authored-by: Noam Meltzer <tsnoam@gmail.com>
@Bibo-Joshi Bibo-Joshi merged commit c7c56ad into master May 2, 2020
@Bibo-Joshi Bibo-Joshi deleted the api-4.8 branch May 2, 2020 09:56
@Bibo-Joshi Bibo-Joshi mentioned this pull request May 12, 2020
6 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2020
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