Bibo-Joshi · GitHub

@Bibo-Joshi

Copy link Copy Markdown

Member

See https://t.me/pythontelegrambotgroup/670240?thread=670177 for a reference.
I'll have to check if I can write a unit test for this special case …

Checklist for PRs

  • [ ] Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • [ ] Added myself alphabetically to AUTHORS.rst (optional)
  • [ ] Added new classes & modules to the docs and all suitable __all__ s

@Bibo-Joshi

# Conflicts:
#	telegram/ext/_application.py

@Bibo-Joshi

@Bibo-Joshi

harshil21

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

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

Nice. Though can't we just use asyncio.shield() in app.start()?

@Bibo-Joshi

Copy link Copy Markdown

Member Author

Though can't we just use asyncio.shield() in app.start()?

That is actually way better! Don't know why I didn't think of it :D It works in a manual test. Let's see if the CI is happy as well - I'm not on a linux machine rn …

@Bibo-Joshi

Copy link Copy Markdown

Member Author

So apparently asyncio.shield does not work on linux. TBH I'm not sure why exactly is, but I'm also not overly enthusiastic to dig into it too much when we have a working solution … So I reverted.

@Bibo-Joshi

@Bibo-Joshi

@Bibo-Joshi

Read the original on github.com ↗