[Python] fix an issue with generator locks

Merge request reports

Loading