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

Support v3.6 API #1006

Merged
merged 10 commits into from
Feb 18, 2018
Merged

Support v3.6 API #1006

merged 10 commits into from
Feb 18, 2018

Conversation

spontanurlaub
Copy link
Contributor

@spontanurlaub spontanurlaub commented Feb 14, 2018

Added support for connected_website from Bot API v3.6.

Update: Also added support for parse_modes in captions. I added only tests for parse_mode in captions in tests/test_photo.py, because adding a test for all kind of messages that contain a caption is redundant.

Update 2: I added the support for the parse_mode parameter in all InlineQueryResults

Update 3: Added the support streaming parameter to telegram.Bot.send_video and InputMediaVideo. The streaming parameter will not work for any videos you send by file_id, that don't support streaming already or sending by file or url for files, the telegram server already downloaded once. Anyways, Telegram won't raise an Error for that.

Fixes part 1 + 3 + 4 from issue #1005

@spontanurlaub spontanurlaub changed the title Support for connected_website Support for connected_website + parse_mode in captions Feb 14, 2018
@Eldinnie Eldinnie changed the title Support for connected_website + parse_mode in captions Support v3.6 API Feb 14, 2018
@Eldinnie
Copy link
Member

For Now I renamed the PR, since it already contains two of the newly added features. Will look in depth later.

@jeffffc
Copy link
Contributor

jeffffc commented Feb 14, 2018

I think the InlineQueryResult* objects contains new parse_mode field too

@spontanurlaub
Copy link
Contributor Author

Yeah, I just saw that parse_mode also affects InlineQueryResult*. I will add it asap

@Eldinnie Eldinnie changed the base branch from master to bot-api-3.6 February 15, 2018 20:06
@Eldinnie Eldinnie changed the base branch from bot-api-3.6 to master February 15, 2018 20:40
@Eldinnie
Copy link
Member

Ok, I finished up and made some adjustments.
Let's see what CI thinks

@codecov
Copy link

codecov bot commented Feb 15, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@9338dc4). Click here to learn what that means.
The diff coverage is 100%.

@@           Coverage Diff            @@
##             master   #1006   +/-   ##
========================================
  Coverage          ?   91.8%           
========================================
  Files             ?     103           
  Lines             ?    4136           
  Branches          ?     669           
========================================
  Hits              ?    3797           
  Misses            ?     197           
  Partials          ?     142
Impacted Files Coverage Δ
telegram/message.py 96.44% <100%> (ø)
telegram/inline/inlinequeryresultmpeg4gif.py 100% <100%> (ø)
telegram/inline/inlinequeryresultaudio.py 100% <100%> (ø)
telegram/inline/inlinequeryresultcachedmpeg4gif.py 100% <100%> (ø)
telegram/inline/inlinequeryresultgif.py 100% <100%> (ø)
telegram/bot.py 87.78% <100%> (ø)
telegram/inline/inlinequeryresultvoice.py 100% <100%> (ø)
telegram/inline/inlinequeryresultcachedphoto.py 100% <100%> (ø)
telegram/inline/inlinequeryresultcachedvoice.py 100% <100%> (ø)
telegram/inline/inlinequeryresultcachedgif.py 100% <100%> (ø)
... and 9 more

@Eldinnie Eldinnie mentioned this pull request Feb 15, 2018
@Eldinnie
Copy link
Member

Eldinnie commented Feb 16, 2018

Ok, diff coverage is up to 100%.
Review please, @tsnoam @jh0ker @bomjacob ?

Copy link
Member

@jsmnbom jsmnbom left a comment

Choose a reason for hiding this comment

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

LGTM, good work on this @code1mountain and @Eldinnie.
After a fairly quick lookover I couldn't find any errors or anything like that :)

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.

@Eldinnie @code1mountain

In general, LGTM.
However, there are three places where the new function arguments needs to be moved to the end of the function prototype in order to maintain backward compatibility:

  • send_photo
  • send_audio
  • edit_message_caption

changing that and we're good to go

@tsnoam tsnoam mentioned this pull request Feb 18, 2018
@tsnoam
Copy link
Member

tsnoam commented Feb 18, 2018

Also needs to be fixed on send_voice

@tsnoam
Copy link
Member

tsnoam commented Feb 18, 2018

@code1mountain
I've created the needed changes but i can't seem to push into your repo. Have you enabled edits by maintainers?
https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/

@Eldinnie
Copy link
Member

@tsnoam Yes, because I did too

@tsnoam
Copy link
Member

tsnoam commented Feb 18, 2018

my bad, i tried to push to the wrong branch.
now it's pushed, i'm waiting for travis and if it goes well i'll squash-merge.

@tsnoam tsnoam merged commit c152d65 into python-telegram-bot:master Feb 18, 2018
@tsnoam
Copy link
Member

tsnoam commented Feb 18, 2018

@code1mountain thanks for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants