NicolasLM / bplustree

An on-disk B+tree for Python 3
MIT License
764 stars 56 forks source link

Runtime error is raised when iterating tree in Python3.7 #11

Open EdwardWooCN opened 2 years ago

EdwardWooCN commented 2 years ago

This error occurs in function _iterslice(self, slice: slice) -> Iterator[Record]. Since python 3.5, when StopIteration is raised inside a generator, it is replaced with RuntimeError. The alternative is return. (See in https://www.python.org/dev/peps/pep-0479/) I have verified this change.

NicolasLM commented 2 years ago

Hi, makes sense. Would you mind sending a PR?

EdwardWooCN commented 2 years ago

I have just checked the code in github, it is already fixed 3 years ago by you. But it is not fixed in the pip package(version 0.0.3).

NicolasLM commented 2 years ago

Right, I should make a release to PyPI.