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 compatibility with cythonized tasks. #3246

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

MichaelGrupp
Copy link
Contributor

Description

types.GeneratorType is not compatible with the generator type of Cython. This leads to _run_get_new_deps() returning directly when the task is from a cythonized module and yields dynamic dependencies.

Motivation and Context

We have cythonized modules with luigi tasks and noticed that the tasks immediately switch to DONE without doing anything, without logging any error or having any task output.

Have you tested this? If so, how?

I successfully ran cythonized and non-cythonized tasks with this patch.


Side note: I originally wanted to use typing.Generator, but this now deprecated.

There were also no other uses of types in the code base.

`types.GeneratorType` is not compatible with the generator type of
Cython. This leads to `_run_get_new_deps()` returning directly when
the task is from a cythonized module and [yields dynamic
dependencies](https://luigi.readthedocs.io/en/stable/tasks.html?highlight=yield#dynamic-dependencies).
@MichaelGrupp MichaelGrupp requested review from dlstadther and a team as code owners July 27, 2023 12:36
@dlstadther dlstadther merged commit 9224c0e into spotify:master Aug 17, 2023
35 checks passed
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.

2 participants