Skip to content

Commit

Permalink
Fix #28 and prepare 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDecan committed May 9, 2020
1 parent e7779cc commit f87365a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog

## 2.0.2 (2020-05-09)

### Fixed

- Fix occasional `StopIteration` exception when checking for containment ([#28](https://github.com/AlexandreDecan/portion/issues/28)).


## 2.0.1 (2020-03-15)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -21,7 +21,7 @@ The `portion` library (formerly distributed as `python-intervals`) provides data
- Heavily tested with high code coverage.

**Latest release:**
- `portion`: 2.0.1 on 2020-03-15 ([documentation](https://github.com/AlexandreDecan/portion/blob/2.0.1/README.md), [changes](https://github.com/AlexandreDecan/portion/blob/2.0.1/CHANGELOG.md)).
- `portion`: 2.0.2 on 2020-05-09 ([documentation](https://github.com/AlexandreDecan/portion/blob/2.0.2/README.md), [changes](https://github.com/AlexandreDecan/portion/blob/2.0.2/CHANGELOG.md)).
- `python-intervals`: 1.10.0 on 2019-09-26 ([documentation](https://github.com/AlexandreDecan/portion/blob/1.10.0/README.md), [changes](https://github.com/AlexandreDecan/portion/blob/1.10.0/README.md#changelog)).

Note that `python-intervals` will no longer receive updates since it has been replaced by `portion`.
Expand Down
6 changes: 5 additions & 1 deletion portion/interval.py
Expand Up @@ -475,7 +475,11 @@ def __contains__(self, item):

for other in item:
while current < other:
current = next(selfiter)
try:
current = next(selfiter)
except StopIteration:
return False

# here current and other could have an overlap
if other not in current:
return False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -7,7 +7,7 @@

setup(
name='portion',
version='2.0.1',
version='2.0.2',
license='LGPLv3',

author='Alexandre Decan',
Expand Down

0 comments on commit f87365a

Please sign in to comment.