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

Make CallbackContext.job_queue raise a warning when job_queue is None #3391

Closed
harshil21 opened this issue Nov 25, 2022 · 0 comments · Fixed by #3393
Closed

Make CallbackContext.job_queue raise a warning when job_queue is None #3391

harshil21 opened this issue Nov 25, 2022 · 0 comments · Fixed by #3393

Comments

@harshil21
Copy link
Member

When a user doesn't have APScheduler installed, doing something like context.job_queue.run_repeating will fail since job_queue is None. So we should:

  1. raise a warning inside the context.job_queue property telling the user to run pip install python-telegram-bot[job-queue]
  2. add the same note to each example which uses an optional dependency.
@harshil21 harshil21 added this to the v20.0 milestone Nov 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant