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

StopIteration & RuntimeError fix for Python >= 3.7 #1

Merged
merged 1 commit into from
Nov 28, 2019

Conversation

NicolasBizzozzero
Copy link
Owner

Since Python 3.7, all StopIteration exceptions raised inside a generator are transformed into RuntimeError (see PEP-0479 and this answer from StackOverflow). This new behavior made pattern unusable for all Python3.7+ users and all packages depending on it (gensim for instance: piskvorky/gensim#2438).

This PR fixes the _read generator by removing the StopIteration exception raised in it. It solves the following issues :

@NicolasBizzozzero NicolasBizzozzero merged commit 66ab344 into master Nov 28, 2019
@NicolasBizzozzero NicolasBizzozzero deleted the stopiteration-patch branch November 28, 2019 18:06
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.

1 participant