Skip to content

Pass context of last valid update to timeout handlers #1826

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

Merged
merged 2 commits into from
Apr 10, 2020
Merged

Conversation

Bibo-Joshi
Copy link
Member

Closes #1823

Also added a test case that makes sure that the last update & context are the same as the ones in the timeout handler.

@Bibo-Joshi Bibo-Joshi added the 📋 pending-review work status: pending-review label Mar 10, 2020
@Bibo-Joshi Bibo-Joshi added this to the 12.5 milestone Mar 10, 2020
@Bibo-Joshi
Copy link
Member Author

test_set_game_score scores again …

@artemrys
Copy link
Contributor

@Bibo-Joshi regarding your comment about test_set_game_score test I have prepared a draft PR with a possible workaround for this issue. PTAL https://github.com/artemrys/python-telegram-bot/commit/3734b01898b724f41f20f27281b4b643160b0d19 It works for me locally.
Does it worth to create a separate bug for this issue and start discussing it there?

@Bibo-Joshi
Copy link
Member Author

@Bibo-Joshi regarding your comment about test_set_game_score test I have prepared a draft PR with a possible workaround for this issue. PTAL artemrys@3734b01 It works for me locally.
Does it worth to create a separate bug for this issue and start discussing it there?

The failing tests are a more general issue, see also #1759. So, yes, please go ahead and pr, so we can see, if the reordering also works in the CI. Please make sure to comment, why the reorder should help.

# Conflicts:
#	telegram/ext/conversationhandler.py
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.

LGTM. Please merge, its a bug.

@Bibo-Joshi Bibo-Joshi merged commit bdf0cb9 into master Apr 10, 2020
@Bibo-Joshi Bibo-Joshi deleted the fix-1823 branch April 10, 2020 11:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📋 pending-review work status: pending-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] context.user_data saved in a conversation is lost upon timeout.
3 participants