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

fix: added optional context param for tasks #1523

Merged
merged 10 commits into from
Aug 14, 2024

Conversation

hallvictoria
Copy link
Contributor

@hallvictoria hallvictoria commented Jul 1, 2024

Description

Python 3.11+ introduced a context parameter that can be passed when creating a task. This change enables the ContextEnabledTask class to accept this parameter. Since the param is only available for 3.11+, there is a conditional check inside the ContextEnabledTask init() method to send the param based on python version.

Added tests for creating a task with context (3.11+), creating a task without context (all versions), and creating a ContextEnabledTask.

Fixes #1508


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@hallvictoria hallvictoria marked this pull request as ready for review July 2, 2024 19:06
@hallvictoria hallvictoria merged commit f4c9c2d into dev Aug 14, 2024
27 checks passed
@hallvictoria hallvictoria deleted the hallvictoria/context-param branch August 14, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] dispatcher.py task factory doesn't allow for optional context parameter
1 participant