Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-svgpathtools for
openSUSE:Factory checked in at 2023-02-21 15:36:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-svgpathtools (Old)
and /work/SRC/openSUSE:Factory/.python-svgpathtools.new.22824 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-svgpathtools"
Tue Feb 21 15:36:30 2023 rev:6 rq:1066955 version:1.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-svgpathtools/python-svgpathtools.changes
2022-07-21 11:35:37.723079961 +0200
+++
/work/SRC/openSUSE:Factory/.python-svgpathtools.new.22824/python-svgpathtools.changes
2023-02-21 15:36:47.340544566 +0100
@@ -1,0 +2,5 @@
+Tue Feb 21 09:51:58 UTC 2023 - Mia Herkt <[email protected]>
+
+- Updote to 1.6.0
+
+-------------------------------------------------------------------
Old:
----
svgpathtools-1.5.1.tar.gz
New:
----
svgpathtools-1.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-svgpathtools.spec ++++++
--- /var/tmp/diff_new_pack.pO03Nf/_old 2023-02-21 15:36:47.844547462 +0100
+++ /var/tmp/diff_new_pack.pO03Nf/_new 2023-02-21 15:36:47.848547485 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-svgpathtools
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global skip_python36 1
Name: python-svgpathtools
-Version: 1.5.1
+Version: 1.6.0
Release: 0
Summary: Tools for manipulating and analyzing SVG Path objects and
Bézier curves
License: MIT
++++++ svgpathtools-1.5.1.tar.gz -> svgpathtools-1.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/PKG-INFO
new/svgpathtools-1.6.0/PKG-INFO
--- old/svgpathtools-1.5.1/PKG-INFO 2022-07-11 03:22:13.351251000 +0200
+++ new/svgpathtools-1.6.0/PKG-INFO 2023-02-13 23:49:43.994840000 +0100
@@ -1,9 +1,9 @@
Metadata-Version: 2.1
Name: svgpathtools
-Version: 1.5.1
+Version: 1.6.0
Summary: A collection of tools for manipulating and analyzing SVG Path objects
and Bezier curves.
Home-page: https://github.com/mathandy/svgpathtools
-Download-URL:
https://github.com/mathandy/svgpathtools/releases/download/1.5.1/svgpathtools-1.5.1-py2.py3-none-any.whl
+Download-URL:
https://github.com/mathandy/svgpathtools/releases/download/1.6.0/svgpathtools-1.6.0-py2.py3-none-any.whl
Author: Andy Port
Author-email: [email protected]
License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/setup.py
new/svgpathtools-1.6.0/setup.py
--- old/svgpathtools-1.5.1/setup.py 2022-07-11 03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/setup.py 2023-02-13 23:49:35.000000000 +0100
@@ -3,7 +3,7 @@
import os
-VERSION = '1.5.1'
+VERSION = '1.6.0'
AUTHOR_NAME = 'Andy Port'
AUTHOR_EMAIL = '[email protected]'
GITHUB = 'https://github.com/mathandy/svgpathtools'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/svgpathtools/document.py
new/svgpathtools-1.6.0/svgpathtools/document.py
--- old/svgpathtools-1.5.1/svgpathtools/document.py 2022-07-11
03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/svgpathtools/document.py 2023-02-13
23:49:35.000000000 +0100
@@ -13,7 +13,7 @@
Example:
Typical usage looks something like the following.
- >> from svgpathtools import *
+ >> from svgpathtools import Document
>> doc = Document('my_file.html')
>> for path in doc.paths():
>> # Do something with the transformed Path object.
@@ -44,6 +44,7 @@
from io import StringIO
from tempfile import gettempdir
from time import time
+import numpy as np
# Internal dependencies
from .parser import parse_path
@@ -51,7 +52,7 @@
from .svg_to_paths import (path2pathd, ellipse2pathd, line2pathd,
polyline2pathd, polygon2pathd, rect2pathd)
from .misctools import open_in_browser
-from .path import *
+from .path import transform, Path, is_path_segment
# To maintain forward/backward compatibility
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/svgpathtools/path.py
new/svgpathtools-1.6.0/svgpathtools/path.py
--- old/svgpathtools-1.5.1/svgpathtools/path.py 2022-07-11 03:21:59.000000000
+0200
+++ new/svgpathtools-1.6.0/svgpathtools/path.py 2023-02-13 23:49:35.000000000
+0100
@@ -711,6 +711,19 @@
Note: This will fail if the two segments coincide for more than a
finite collection of points.
tol is not used."""
+ if isinstance(other_seg, (Line, QuadraticBezier, CubicBezier)):
+ ob = [e.real for e in other_seg.bpoints()]
+ sb = [e.real for e in self.bpoints()]
+ if min(ob) > max(sb):
+ return []
+ if max(ob) < min(sb):
+ return []
+ ob = [e.imag for e in other_seg.bpoints()]
+ sb = [e.imag for e in self.bpoints()]
+ if min(ob) > max(sb):
+ return []
+ if max(ob) < min(sb):
+ return []
if isinstance(other_seg, Line):
assert other_seg.end != other_seg.start and self.end != self.start
assert self != other_seg
@@ -1038,6 +1051,19 @@
self.point(t1) == other_seg.point(t2).
Note: This will fail if the two segments coincide for more than a
finite collection of points."""
+ if isinstance(other_seg, (Line, QuadraticBezier, CubicBezier)):
+ ob = [e.real for e in other_seg.bpoints()]
+ sb = [e.real for e in self.bpoints()]
+ if min(ob) > max(sb):
+ return []
+ if max(ob) < min(sb):
+ return []
+ ob = [e.imag for e in other_seg.bpoints()]
+ sb = [e.imag for e in self.bpoints()]
+ if min(ob) > max(sb):
+ return []
+ if max(ob) < min(sb):
+ return []
if isinstance(other_seg, Line):
return bezier_by_line_intersections(self, other_seg)
elif isinstance(other_seg, QuadraticBezier):
@@ -1298,6 +1324,19 @@
This will fail if the two segments coincide for more than a
finite collection of points.
"""
+ if isinstance(other_seg, (Line, QuadraticBezier, CubicBezier)):
+ ob = [e.real for e in other_seg.bpoints()]
+ sb = [e.real for e in self.bpoints()]
+ if min(ob) > max(sb):
+ return []
+ if max(ob) < min(sb):
+ return []
+ ob = [e.imag for e in other_seg.bpoints()]
+ sb = [e.imag for e in self.bpoints()]
+ if min(ob) > max(sb):
+ return []
+ if max(ob) < min(sb):
+ return []
if isinstance(other_seg, Line):
return bezier_by_line_intersections(self, other_seg)
elif (isinstance(other_seg, QuadraticBezier) or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/svgpathtools/svg_io_sax.py
new/svgpathtools-1.6.0/svgpathtools/svg_io_sax.py
--- old/svgpathtools-1.5.1/svgpathtools/svg_io_sax.py 2022-07-11
03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/svgpathtools/svg_io_sax.py 2023-02-13
23:49:35.000000000 +0100
@@ -6,6 +6,7 @@
from __future__ import division, absolute_import, print_function
import os
from xml.etree.ElementTree import iterparse, Element, ElementTree, SubElement
+import numpy as np
# Internal dependencies
from .parser import parse_path
@@ -13,13 +14,13 @@
from .svg_to_paths import (path2pathd, ellipse2pathd, line2pathd,
polyline2pathd, polygon2pathd, rect2pathd)
from .misctools import open_in_browser
-from .path import *
+from .path import transform
# To maintain forward/backward compatibility
try:
- str = basestring
+ string = basestring
except NameError:
- pass
+ string = str
NAME_SVG = "svg"
ATTR_VERSION = "version"
@@ -164,17 +165,17 @@
if matrix is not None and not np.all(np.equal(matrix, identity)):
matrix_string = "matrix("
matrix_string += " "
- matrix_string += str(matrix[0][0])
+ matrix_string += string(matrix[0][0])
matrix_string += " "
- matrix_string += str(matrix[1][0])
+ matrix_string += string(matrix[1][0])
matrix_string += " "
- matrix_string += str(matrix[0][1])
+ matrix_string += string(matrix[0][1])
matrix_string += " "
- matrix_string += str(matrix[1][1])
+ matrix_string += string(matrix[1][1])
matrix_string += " "
- matrix_string += str(matrix[0][2])
+ matrix_string += string(matrix[0][2])
matrix_string += " "
- matrix_string += str(matrix[1][2])
+ matrix_string += string(matrix[1][2])
matrix_string += ")"
path.set(ATTR_TRANSFORM, matrix_string)
if ATTR_DATA in values:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/svgpathtools.egg-info/PKG-INFO
new/svgpathtools-1.6.0/svgpathtools.egg-info/PKG-INFO
--- old/svgpathtools-1.5.1/svgpathtools.egg-info/PKG-INFO 2022-07-11
03:22:13.000000000 +0200
+++ new/svgpathtools-1.6.0/svgpathtools.egg-info/PKG-INFO 2023-02-13
23:49:43.000000000 +0100
@@ -1,9 +1,9 @@
Metadata-Version: 2.1
Name: svgpathtools
-Version: 1.5.1
+Version: 1.6.0
Summary: A collection of tools for manipulating and analyzing SVG Path objects
and Bezier curves.
Home-page: https://github.com/mathandy/svgpathtools
-Download-URL:
https://github.com/mathandy/svgpathtools/releases/download/1.5.1/svgpathtools-1.5.1-py2.py3-none-any.whl
+Download-URL:
https://github.com/mathandy/svgpathtools/releases/download/1.6.0/svgpathtools-1.6.0-py2.py3-none-any.whl
Author: Andy Port
Author-email: [email protected]
License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_bezier.py
new/svgpathtools-1.6.0/test/test_bezier.py
--- old/svgpathtools-1.5.1/test/test_bezier.py 2022-07-11 03:21:59.000000000
+0200
+++ new/svgpathtools-1.6.0/test/test_bezier.py 2023-02-13 23:49:35.000000000
+0100
@@ -1,7 +1,7 @@
from __future__ import division, absolute_import, print_function
import numpy as np
import unittest
-from svgpathtools.bezier import *
+from svgpathtools.bezier import bezier_point, bezier2polynomial,
polynomial2bezier
from svgpathtools.path import bpoints2bezier
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_document.py
new/svgpathtools-1.6.0/test/test_document.py
--- old/svgpathtools-1.5.1/test/test_document.py 2022-07-11
03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/test/test_document.py 2023-02-13
23:49:35.000000000 +0100
@@ -1,6 +1,6 @@
from __future__ import division, absolute_import, print_function
import unittest
-from svgpathtools import *
+from svgpathtools import Document
from io import StringIO
from io import open # overrides build-in open for compatibility with python2
from os.path import join, dirname
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_generation.py
new/svgpathtools-1.6.0/test/test_generation.py
--- old/svgpathtools-1.5.1/test/test_generation.py 2022-07-11
03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/test/test_generation.py 2023-02-13
23:49:35.000000000 +0100
@@ -2,7 +2,7 @@
#------------------------------------------------------------------------------
from __future__ import division, absolute_import, print_function
import unittest
-from svgpathtools import *
+from svgpathtools import parse_path
class TestGeneration(unittest.TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_groups.py
new/svgpathtools-1.6.0/test/test_groups.py
--- old/svgpathtools-1.5.1/test/test_groups.py 2022-07-11 03:21:59.000000000
+0200
+++ new/svgpathtools-1.6.0/test/test_groups.py 2023-02-13 23:49:35.000000000
+0100
@@ -5,7 +5,7 @@
"""
from __future__ import division, absolute_import, print_function
import unittest
-from svgpathtools import *
+from svgpathtools import Document, SVG_NAMESPACE, parse_path
from os.path import join, dirname
import numpy as np
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_parsing.py
new/svgpathtools-1.6.0/test/test_parsing.py
--- old/svgpathtools-1.5.1/test/test_parsing.py 2022-07-11 03:21:59.000000000
+0200
+++ new/svgpathtools-1.6.0/test/test_parsing.py 2023-02-13 23:49:35.000000000
+0100
@@ -1,8 +1,9 @@
# Note: This file was taken mostly as is from the svg.path module (v 2.0)
from __future__ import division, absolute_import, print_function
import unittest
-from svgpathtools import *
+from svgpathtools import Path, Line, QuadraticBezier, CubicBezier, Arc,
parse_path
import svgpathtools
+
import numpy as np
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_path.py
new/svgpathtools-1.6.0/test/test_path.py
--- old/svgpathtools-1.5.1/test/test_path.py 2022-07-11 03:21:59.000000000
+0200
+++ new/svgpathtools-1.6.0/test/test_path.py 2023-02-13 23:49:35.000000000
+0100
@@ -1,6 +1,7 @@
# External dependencies
from __future__ import division, absolute_import, print_function
import os
+import time
from sys import version_info
import unittest
from math import sqrt, pi
@@ -10,8 +11,12 @@
import warnings
# Internal dependencies
-from svgpathtools import *
-from svgpathtools.path import _NotImplemented4ArcException, bezier_radialrange
+from svgpathtools import (
+ Line, QuadraticBezier, CubicBezier, Arc, Path, poly2bez, path_encloses_pt,
+ bpoints2bezier, closest_point_in_path, farthest_point_in_path,
+ is_bezier_segment, is_bezier_path, parse_path
+)
+from svgpathtools.path import bezier_radialrange
# An important note for those doing any debugging:
# ------------------------------------------------
@@ -1491,6 +1496,50 @@
self.assertTrue(len(yix) == 1)
###################################################################
+ def test_random_intersections(self):
+ from random import Random
+ r = Random()
+ distance = 100
+ distribution = 10000
+ count = 500
+
+ def random_complex(offset_x=0.0, offset_y=0.0):
+ return complex(r.random() * distance + offset_x, r.random() *
distance + offset_y)
+
+ def random_line():
+ offset_x = r.random() * distribution
+ offset_y = r.random() * distribution
+ return Line(random_complex(offset_x, offset_y),
random_complex(offset_x, offset_y))
+
+ def random_quad():
+ offset_x = r.random() * distribution
+ offset_y = r.random() * distribution
+ return QuadraticBezier(random_complex(offset_x, offset_y),
random_complex(offset_x, offset_y), random_complex(offset_x, offset_y))
+
+ def random_cubic():
+ offset_x = r.random() * distribution
+ offset_y = r.random() * distribution
+ return CubicBezier(random_complex(offset_x, offset_y),
random_complex(offset_x, offset_y), random_complex(offset_x, offset_y),
random_complex(offset_x, offset_y))
+
+ def random_path():
+ path = Path()
+ for i in range(count):
+ type_segment = random.randint(0, 3)
+ if type_segment == 0:
+ path.append(random_line())
+ if type_segment == 1:
+ path.append(random_quad())
+ if type_segment == 2:
+ path.append(random_cubic())
+ return path
+
+ path1 = random_path()
+ path2 = random_path()
+ t = time.time()
+ intersections = path1.intersect(path2)
+ print("\nFound {} intersections in {} seconds.\n"
+ "".format(len(intersections), time.time() - t))
+
def test_line_line_0(self):
l0 = Line(start=(25.389999999999997+99.989999999999995j),
end=(25.389999999999997+90.484999999999999j))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_polytools.py
new/svgpathtools-1.6.0/test/test_polytools.py
--- old/svgpathtools-1.5.1/test/test_polytools.py 2022-07-11
03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/test/test_polytools.py 2023-02-13
23:49:35.000000000 +0100
@@ -4,7 +4,7 @@
import numpy as np
# Internal dependencies
-from svgpathtools import *
+from svgpathtools import rational_limit
class Test_polytools(unittest.TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_sax_groups.py
new/svgpathtools-1.6.0/test/test_sax_groups.py
--- old/svgpathtools-1.5.1/test/test_sax_groups.py 2022-07-11
03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/test/test_sax_groups.py 2023-02-13
23:49:35.000000000 +0100
@@ -1,6 +1,6 @@
from __future__ import division, absolute_import, print_function
import unittest
-from svgpathtools import *
+from svgpathtools import SaxDocument
from os.path import join, dirname
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/svgpathtools-1.5.1/test/test_svg2paths.py
new/svgpathtools-1.6.0/test/test_svg2paths.py
--- old/svgpathtools-1.5.1/test/test_svg2paths.py 2022-07-11
03:21:59.000000000 +0200
+++ new/svgpathtools-1.6.0/test/test_svg2paths.py 2023-02-13
23:49:35.000000000 +0100
@@ -1,6 +1,6 @@
from __future__ import division, absolute_import, print_function
import unittest
-from svgpathtools import *
+from svgpathtools import Path, Line, Arc, svg2paths, svgstr2paths
from io import StringIO
from io import open # overrides build-in open for compatibility with python2
from os.path import join, dirname