Skip to content

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

@harshil21

Description

@harshil21

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions