Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 a team and dlstadther as code owners July 27, 2023 12:36
@dlstadther dlstadther merged commit 9224c0e into spotify:master Aug 17, 2023
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