Hello community,
here is the log from the commit of package python-pytricia for openSUSE:Factory
checked in at 2020-08-04 20:21:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytricia (Old)
and /work/SRC/openSUSE:Factory/.python-pytricia.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytricia"
Tue Aug 4 20:21:31 2020 rev:4 rq:824176 version:1.0.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytricia/python-pytricia.changes
2020-03-21 00:02:03.081120732 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytricia.new.3592/python-pytricia.changes
2020-08-04 20:21:43.144995632 +0200
@@ -1,0 +2,6 @@
+Mon Aug 3 13:43:22 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to 1.0.2
+ * Bugfix: pytricia_contains must return -1 on error, rather than 0
+
+-------------------------------------------------------------------
Old:
----
pytricia-1.0.1.tar.gz
New:
----
pytricia-1.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytricia.spec ++++++
--- /var/tmp/diff_new_pack.Vn4cHQ/_old 2020-08-04 20:21:45.228996172 +0200
+++ /var/tmp/diff_new_pack.Vn4cHQ/_new 2020-08-04 20:21:45.232996173 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytricia
-Version: 1.0.1
+Version: 1.0.2
Release: 0
Summary: A library for IP address lookup in Python
License: LGPL-3.0-or-later
++++++ pytricia-1.0.1.tar.gz -> pytricia-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytricia-1.0.1/PKG-INFO new/pytricia-1.0.2/PKG-INFO
--- old/pytricia-1.0.1/PKG-INFO 2020-02-19 02:21:18.000000000 +0100
+++ new/pytricia-1.0.2/PKG-INFO 2020-05-28 18:21:19.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytricia
-Version: 1.0.1
+Version: 1.0.2
Summary: An efficient IP address storage and lookup module for Python.
Home-page: https://github.com/jsommers/pytricia
Author: Joel Sommers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytricia-1.0.1/README.md new/pytricia-1.0.2/README.md
--- old/pytricia-1.0.1/README.md 2017-10-15 15:09:04.000000000 +0200
+++ new/pytricia-1.0.2/README.md 2020-05-28 18:10:55.000000000 +0200
@@ -190,6 +190,16 @@
10.1.0.0/16 b
>>>
+Although it is possible to store IPv4 and IPv6 subnets in the same trie, this
is generally not advisable. Consider the following example:
+
+ >>> import pytricia
+ >>> pyt = pytricia.PyTricia(128)
+ >>> pyt.insert('2000::/8', 'test')
+ >>> pyt.get_key('32.0.0.1')
+ '2000::/8'
+
+IPv4 address `32.0.0.1` matches `2000::/8` prefix due to the first octet being
the same in both. In order to avoid this, separate tries should be used for
IPv4 and IPv6 prefixes. Alternatively, [IPv4 addresses can be mapped to IPv6
addresses](https://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses).
+
# Performance
For API usage, the usual Python advice applies: using indexing is the fastest
method for insertion, lookup, and removal. See the ``apiperf.py`` script in
the repo for some comparative numbers. For Python 3, using
``ipaddress``-module objects is the slowest. There's a price to pay for the
convenience, unfortunately.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytricia-1.0.1/pytricia.c
new/pytricia-1.0.2/pytricia.c
--- old/pytricia-1.0.1/pytricia.c 2019-01-16 15:36:20.000000000 +0100
+++ new/pytricia-1.0.2/pytricia.c 2020-05-28 18:09:22.000000000 +0200
@@ -576,7 +576,7 @@
pytricia_contains(PyTricia *self, PyObject *key) {
prefix_t *prefix = _key_object_to_prefix(key);
if (!prefix) {
- return 0;
+ return -1;
}
patricia_node_t* node = patricia_search_best(self->m_tree, prefix);
Deref_Prefix(prefix);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytricia-1.0.1/pytricia.egg-info/PKG-INFO
new/pytricia-1.0.2/pytricia.egg-info/PKG-INFO
--- old/pytricia-1.0.1/pytricia.egg-info/PKG-INFO 2020-02-19
02:21:18.000000000 +0100
+++ new/pytricia-1.0.2/pytricia.egg-info/PKG-INFO 2020-05-28
18:21:18.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytricia
-Version: 1.0.1
+Version: 1.0.2
Summary: An efficient IP address storage and lookup module for Python.
Home-page: https://github.com/jsommers/pytricia
Author: Joel Sommers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytricia-1.0.1/setup.py new/pytricia-1.0.2/setup.py
--- old/pytricia-1.0.1/setup.py 2020-02-19 02:20:59.000000000 +0100
+++ new/pytricia-1.0.2/setup.py 2020-05-28 18:09:42.000000000 +0200
@@ -18,7 +18,7 @@
from setuptools import setup, Extension
setup(name="pytricia",
- version="1.0.1",
+ version="1.0.2",
description="An efficient IP address storage and lookup module for
Python.",
author="Joel Sommers",
author_email="[email protected]",