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

Refactor Bot persistence#1994

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 6 commits intov13frombot-persistence
Jul 13, 2020
Merged

Refactor Bot persistence#1994

Bibo-Joshi merged 6 commits intov13frombot-persistence
Jul 13, 2020

Conversation

Bibo-Joshi
Copy link
Member

@Bibo-JoshiBibo-Joshi commentedJun 11, 2020
edited
Loading

Closes#1992

I went for the__new__ approach, but that's up for discussion.

Handling arbitrary collections that may contain bots is really not easy. For example, how would one replace a non-mutableMapping subclass that contains a bot with an corresponding object, where the bot is replaced, if one does not know how it was initialized? Therefore I'm currently only handling the built-in types ((default)dict,list,tuple,(frozen)set). IMO that should suffice, as the more important use case is a bot as ordinary attribute (which is far easier to handle via__dict__ and__slots__). Still, we'll need a proper documentation for that, if that's approved.

Copy link
Member

@PoolitzerPoolitzer left a comment

Choose a reason for hiding this comment

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

What about putting a warning in the docstring, that we replace tokens when they change in pickling, but that this might result in Chat not found errors?

Code looks good!

@Bibo-Joshi
Copy link
MemberAuthor

py3.7 fail unrelated and codacy has problems with the v13 branch (we'll see any problems in#1982, though). Merging.

@Bibo-JoshiBibo-Joshi merged commit21f6fbf intov13Jul 13, 2020
@Bibo-JoshiBibo-Joshi deleted the bot-persistence branchJuly 13, 2020 19:52
Bibo-Joshi added a commit that referenced this pull requestJul 14, 2020
* Refactor persistence of bots* User BP.set_bot in Dispatcher* Temporarily enable tests for the v13 branch* Add documentation
Bibo-Joshi added a commit that referenced this pull requestJul 19, 2020
* Refactor persistence of bots* User BP.set_bot in Dispatcher* Temporarily enable tests for the v13 branch* Add documentation
Bibo-Joshi added a commit that referenced this pull requestJul 19, 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 requestAug 13, 2020
* Refactor persistence of bots* User BP.set_bot in Dispatcher* Temporarily enable tests for the v13 branch* Add documentation
Bibo-Joshi added a commit that referenced this pull requestAug 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 requestAug 16, 2020
* Refactor persistence of bots* User BP.set_bot in Dispatcher* Temporarily enable tests for the v13 branch* Add documentation
Bibo-Joshi added a commit that referenced this pull requestAug 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
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsAug 17, 2020
@Bibo-JoshiBibo-Joshi added 🔌 bugpr description: bug 🔌 enhancementpr description: enhancement and removed bug 🐛 labelsNov 3, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@PoolitzerPoolitzerPoolitzer left review comments

@EldinnieEldinnieAwaiting requested review from Eldinnie

Assignees
No one assigned
Labels
🔌 bugpr description: bug🔌 enhancementpr description: enhancement
Projects
None yet
Milestone
13.0
Development

Successfully merging this pull request may close these issues.

2 participants
@Bibo-Joshi@Poolitzer

[8]ページ先頭

©2009-2025 Movatter.jp