Merged
Conversation
Bibo-Joshi
commented
May 29, 2020
Member
Author
Bibo-Joshi
left a comment
There was a problem hiding this comment.
The changes is Message lead to errors when trying to access message._default_quote after unplicking. Need to make that backwards compatible.
Also, we might wanna mark the default_quote arg (maybe even the attribute, too) for deprecation.
Member
Author
|
Latests commits
|
Member
Author
|
We should postpone this after #1994 |
2a9a5b0 to
1fdc197
Compare
b3e9be1 to
b7e635b
Compare
Member
Author
|
Also, we could/should raise a warning, if both |
* Unify kwargs handling in Bot methods * Remove Request.get, make api_kwargs an explicit argument, move note to head of Bot class * Fix test_official * Update get_file methods
* First go on refactoring JobQueue * Temporarily enable tests for the v13 branch * Work on tests * Temporarily enable tests for the v13 branch * Increase coverage * Remove JobQueue.tick() # Was intended for interal use anyways # Fixes tests * Address review * Temporarily enable tests for the v13 branch * Address review * Dispatch errors * Fix handling of job_kwargs * Remove possibility to pass a Bot to JobQueue
* Refactor persistence of bots * User BP.set_bot in Dispatcher * Temporarily enable tests for the v13 branch * Add documentation
# Conflicts: # telegram/bot.py
Poolitzer
requested changes
Jul 19, 2020
telegram/ext/updater.py
Outdated
Comment on lines
122
to
123
| warnings.warn('Passing defaults to an Updater has no effect, if a Bot is passed, ' | ||
| 'too. Pass it to the Bot instead.', |
Member
There was a problem hiding this comment.
Suggested change
| warnings.warn('Passing defaults to an Updater has no effect, if a Bot is passed, ' | |
| 'too. Pass it to the Bot instead.', | |
| warnings.warn('Passing defaults to an Updater has no effect when a Bot is passed' | |
| 'as well. Pass them to the Bot instead.', |
Member
|
In here are a lot of changes which I reviewed in different PRs, like the refactor of the jobqueue, the api kwargs or the persistence part. Is that intended? |
# Conflicts: # telegram/bot.py # tests/test_persistence.py
Bibo-Joshi
added a commit
that referenced
this pull request
Aug 13, 2020
* Refactor handling of `default_quote` * Make it a breaking change * Pickle a bots defaults * Temporarily enable tests for the v13 branch * Temporarily enable tests for the v13 branch * Refactor handling of kwargs in Bot methods (#1924) * Unify kwargs handling in Bot methods * Remove Request.get, make api_kwargs an explicit argument, move note to head of Bot class * Fix test_official * Update get_file methods * Refactor JobQueue (#1981) * First go on refactoring JobQueue * Temporarily enable tests for the v13 branch * Work on tests * Temporarily enable tests for the v13 branch * Increase coverage * Remove JobQueue.tick() # Was intended for interal use anyways # Fixes tests * Address review * Temporarily enable tests for the v13 branch * Address review * Dispatch errors * Fix handling of job_kwargs * Remove possibility to pass a Bot to JobQueue * Refactor persistence of Bot instances (#1994) * Refactor persistence of bots * User BP.set_bot in Dispatcher * Temporarily enable tests for the v13 branch * Add documentation * Add warning to Updater for passing both defaults and bot * Address review * Fix test
Bibo-Joshi
added a commit
that referenced
this pull request
Aug 16, 2020
* Refactor handling of `default_quote` * Make it a breaking change * Pickle a bots defaults * Temporarily enable tests for the v13 branch * Temporarily enable tests for the v13 branch * Refactor handling of kwargs in Bot methods (#1924) * Unify kwargs handling in Bot methods * Remove Request.get, make api_kwargs an explicit argument, move note to head of Bot class * Fix test_official * Update get_file methods * Refactor JobQueue (#1981) * First go on refactoring JobQueue * Temporarily enable tests for the v13 branch * Work on tests * Temporarily enable tests for the v13 branch * Increase coverage * Remove JobQueue.tick() # Was intended for interal use anyways # Fixes tests * Address review * Temporarily enable tests for the v13 branch * Address review * Dispatch errors * Fix handling of job_kwargs * Remove possibility to pass a Bot to JobQueue * Refactor persistence of Bot instances (#1994) * Refactor persistence of bots * User BP.set_bot in Dispatcher * Temporarily enable tests for the v13 branch * Add documentation * Add warning to Updater for passing both defaults and bot * Address review * Fix test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now,
bot.defaults.quoteis passed through the json data when decoding an update for it to be stored inMessage.default_quote. As @n5y pointed out offline, it would be cleaner to just useMessage.bot.defaults.quote. This is, what this PR does.To not break backwards compatibility, I left some optional
default_quoteargs in the Webhook classes untouched and also keptdefault_quoteas argument forMessage(with a warning that it will override the bots settings). That's discussable though, as nobody should have actually used that …Closes parts of #1797