jsommers / pytricia

A library for fast IP address lookup in Python.
GNU Lesser General Public License v3.0
214 stars 22 forks source link

Issue with keys in tree #28

Closed vkotronis closed 4 years ago

vkotronis commented 4 years ago
>>> import pytricia as pyt
>>> p = pyt.PyTricia()
>>> p['205.56.0.0/19'] = 1
>>> p.get_key('205.56.0.0/13')
'205.56.0.0/19'

The less specific prefix appears like it is in the tree, while this should not happen

vkotronis commented 4 years ago

This is in pytricia 0.9.4 maybe it is solved in higher versions?

vkotronis commented 4 years ago

Closing, I upgraded to 1.0.0 and the issue is gone. Sorry for the false alarm!