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

Codecs raise RuntimeError at unexpected end of file in Python 3.7+ #275

Closed
goodmami opened this issue Jan 20, 2020 · 0 comments
Closed

Codecs raise RuntimeError at unexpected end of file in Python 3.7+ #275

goodmami opened this issue Jan 20, 2020 · 0 comments
Labels
Milestone

Comments

@goodmami
Copy link
Member

Since Python 3.7, a StopIteration error raised inside a generator is converted into a RuntimeError at the point that it leaves the generator, as detailed in PEP-479. The delphin.util.LookaheadIterator wraps an iterator and suppresses the first StopIteration in order to provide the L1 lookahead. This will need to be fixed somehow. Hopefully it's just a matter of using return instead of raise, but otherwise it would require a custom error class or something.

@goodmami goodmami added the bug label Jan 20, 2020
@goodmami goodmami added this to the 1.2.1 milestone Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant