NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1890 most downloaded on PyPI
Editable interval tree data structure for Python 2 and 3
Last release 9 months ago
24 Dec 2025
Ships unpredictably
gaps range from 8 days to 5.4 years
Nearly every release is documented
notes for 16 of 16 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
17 releases · first in 2014
Build system includes sortedcontainers dependency in the wheel again
BROKEN: missing sortedcontainers dependency from wheel
BROKEN: missing sortedcontainers dependency from wheel
pyproject.toml, which modernizes the build and dependency system.requirements/*.txt: If you are not using pyproject.toml,pip install -r on requirements/common.txtOne column per quarter.
Dropped support for Python 3.4, added Python 3.8
__slots__ optimization in Node class, should give performance improvement.postNN, use aNN insteadOn some systems, setup.py opened README.md with a non-unicode encoding. My fault for leaving the encoding flapping in the breeze. It's been fixed.
Travis testing for 3.7 and 3.8-dev. These needed OpenSSL, sudo and Xenial. 3.8-dev is allowed to fail.
.postN as the suffix instead of bN, and N counts from the latest tagged commit, which should be the last releasemake install-testpypicollections.abc deprecation warning no longer happens
search(begin, end, strict) has been replaced with at(point), overlap(begin, end), and envelop(begin, end)extend(items) has been deleted, use update(items) insteadstrict=True/False argument now consistently default to strict=TrueInterval overlap checking (@tuxzz, #56)from_tuples() addedchop(), split_overlaps(), merge_overlaps() and merge_equals().Node.from_tuples() will now raise an error if given an empty iterable. This should never happen, and it should error if it does.Interval.distance_to() gave an incorrect distance when passed the Interval's upper boundaryNode.pop_greatest_child() sometimes forgot to rotate() when creating new child nodes. (@escalonn, #41, #42)IntervalTree.begin() and end() are O(1), not O(n). (@progval, #40)intersection_update() and symmetric_difference() and symmetric_difference_update() didn't actually work. Now they do.collections.abc deprecation warning no longer happens<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- merge_overlaps() method and
- `merge_overlaps()` method and tests
- `merge_equals()` method and tests
- `range()` method
- `span()` method, for returning the difference between `end()` and `begin()`
begin() and end() methods used iterative min() and max() builtins instead of the more efficient iloc member available to SortedDictoverlaps() method used to return True even if provided null test intervalmake coverage) with html report (htmlcov/index.html)Fix: Issue #27 : README incorrectly showed using a comma instead of …
IntervalTree: it showed tree[begin, end] instead of tree[begin:end]Fix: README showed using + operator for setlike union instead of th…
Fix: Issue #20 : performance enhancement for large trees. `IntervalT…
IntervalTree.search() made a copy of the entire boundary_table resulting in linear search time. The sortedcollections package is now the sole install dependencyFix: Issue #26: failed to prune empty Node after a rotation promoted contents of s_center
Node after a rotation promoted contents of s_centerBACKWARD INCOMPATIBLE: On ranged queries where begin >= end, the query operated on the overlaps of begin. This behavior was documented as expected in…
IntervalTree now supports the full collections.MutableSet API__delitem__ to IntervalTreeInterval comparison methods lt(), gt(), le() and ge() to Interval, as an alternative to the comparison operators, which are designed for sortingIntervalTree.from_tuples(iterable)IntervalTree.clear()IntervalTree.difference(iterable)IntervalTree.difference_update(iterable)IntervalTree.union(iterable)IntervalTree.intersection(iterable)IntervalTree.intersection_update(iterable)IntervalTree.symmetric_difference(iterable)IntervalTree.symmetric_difference_update(iterable)IntervalTree.chop(a, b)IntervalTree.slice(point)IntervalTree.extend() -- use update() insteadbegin >= end, the query operated on the overlaps of begin. This behavior was documented as expected in 1.x; it is now changed to be more consistent with the definition of Intervals, which are half-open.Intervals and numbers in the same list gathered all the numbers at the beginning and the Intervals at the endIntervalTree.overlaps() and friends returned None instead of Falsemake install-testpypi failed because the pip was missing a --pre flagRemoved requirement for pyandoc in order to run functionality tests.
Added ability to use Interval.distance_to() with points, not just Intervals
Interval.distance_to() with points, not just IntervalsIntervalTree and IntervalInterval.__cmp__() works with points tooIntervalTree.score() returned maximum score of 0.5 instead of 1.0. Now returns max of subscores instead of avggit describe the "building towards" release is appended after a hyphen, eg. 1.0.2-37-g2da2ef0-1.10. The previous tagged release is 1.0.2, and there have been 37 commits since then, current tag is g2da2ef0, and we are getting ready for a 1.1.0 releaseInterval overlap tests for ranges, Intervals and points addedNode.depth_score_helper() raised AttributeError
-Bug fixes:
- Node.depth_score_helper() raised AttributeError
- README formatting
Fix: pip install failure because of failure to generate README.rst
BACKWARD INCOMPATIBLE: len() of an Interval is always 3, reverting to default behavior for namedtuples. In Python 3, len returning a non-integer raise…
len() of an Interval is always 3, reverting to default behavior for namedtuples. In Python 3, len returning a non-integer raises an exception. Instead, use Interval.length(), which returns 0 for null intervals and end - begin otherwise. Also, if the len() === 0, then not iv is True.Interval via __setitem__ and improper parameters given, all errors were transformed to IndexErrorsplit_overlaps did not update the boundary_table countsYour coding agent can read these notes before it upgrades. Set up the MCP server →