Hello community,
here is the log from the commit of package python-CairoSVG for openSUSE:Factory
checked in at 2019-09-30 15:54:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-CairoSVG (Old)
and /work/SRC/openSUSE:Factory/.python-CairoSVG.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-CairoSVG"
Mon Sep 30 15:54:05 2019 rev:7 rq:732870 version:2.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-CairoSVG/python-CairoSVG.changes
2019-09-23 12:02:42.245951994 +0200
+++
/work/SRC/openSUSE:Factory/.python-CairoSVG.new.2352/python-CairoSVG.changes
2019-09-30 15:54:09.266054051 +0200
@@ -1,0 +2,7 @@
+Tue Sep 24 08:46:49 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 2.4.2:
+ * Fix race condition in tests
+ * Fix scale for images with no viewBox
+
+-------------------------------------------------------------------
Old:
----
CairoSVG-2.4.1.tar.gz
New:
----
CairoSVG-2.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-CairoSVG.spec ++++++
--- /var/tmp/diff_new_pack.AWCCT0/_old 2019-09-30 15:54:09.934052273 +0200
+++ /var/tmp/diff_new_pack.AWCCT0/_new 2019-09-30 15:54:09.938052263 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-CairoSVG
-Version: 2.4.1
+Version: 2.4.2
Release: 0
Summary: A Python SVG converter based on Cairo
License: LGPL-3.0-or-later
@@ -68,7 +68,7 @@
%python_clone -a %{buildroot}/%{_bindir}/cairosvg
%check
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix}
+%pytest
%post
%python_install_alternative cairosvg
++++++ CairoSVG-2.4.1.tar.gz -> CairoSVG-2.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CairoSVG-2.4.1/CairoSVG.egg-info/PKG-INFO
new/CairoSVG-2.4.2/CairoSVG.egg-info/PKG-INFO
--- old/CairoSVG-2.4.1/CairoSVG.egg-info/PKG-INFO 2019-08-21
12:10:32.000000000 +0200
+++ new/CairoSVG-2.4.2/CairoSVG.egg-info/PKG-INFO 2019-09-10
16:06:10.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CairoSVG
-Version: 2.4.1
+Version: 2.4.2
Summary: A Simple SVG Converter based on Cairo
Home-page: http://www.cairosvg.org/
Author: Guillaume Ayoub
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CairoSVG-2.4.1/PKG-INFO new/CairoSVG-2.4.2/PKG-INFO
--- old/CairoSVG-2.4.1/PKG-INFO 2019-08-21 12:10:32.000000000 +0200
+++ new/CairoSVG-2.4.2/PKG-INFO 2019-09-10 16:06:11.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CairoSVG
-Version: 2.4.1
+Version: 2.4.2
Summary: A Simple SVG Converter based on Cairo
Home-page: http://www.cairosvg.org/
Author: Guillaume Ayoub
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CairoSVG-2.4.1/cairosvg/VERSION
new/CairoSVG-2.4.2/cairosvg/VERSION
--- old/CairoSVG-2.4.1/cairosvg/VERSION 2019-08-21 12:03:38.000000000 +0200
+++ new/CairoSVG-2.4.2/cairosvg/VERSION 2019-09-10 16:04:33.000000000 +0200
@@ -1 +1 @@
-2.4.1
\ No newline at end of file
+2.4.2
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CairoSVG-2.4.1/cairosvg/surface.py
new/CairoSVG-2.4.2/cairosvg/surface.py
--- old/CairoSVG-2.4.1/cairosvg/surface.py 2019-05-29 17:27:14.000000000
+0200
+++ new/CairoSVG-2.4.2/cairosvg/surface.py 2019-09-08 21:40:06.000000000
+0200
@@ -189,6 +189,8 @@
self.font_size = size(self, '12pt')
self.stroke_and_fill = True
width, height, viewbox = node_format(self, tree)
+ if viewbox is None:
+ viewbox = (0, 0, width, height)
if output_width and output_height:
width, height = output_width, output_height
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CairoSVG-2.4.1/cairosvg/test_api.py
new/CairoSVG-2.4.2/cairosvg/test_api.py
--- old/CairoSVG-2.4.1/cairosvg/test_api.py 2019-02-15 13:46:16.000000000
+0100
+++ new/CairoSVG-2.4.2/cairosvg/test_api.py 2019-08-22 12:07:42.000000000
+0200
@@ -144,10 +144,10 @@
def test_script():
"""Test the ``cairosvg`` script and the ``main`` function."""
- expected_png = svg2png(SVG_SAMPLE)
- expected_pdf = svg2pdf(SVG_SAMPLE)
+ expected_png = svg2png(SVG_SAMPLE)[:100]
+ expected_pdf = svg2pdf(SVG_SAMPLE)[:100]
- def test_main(args, exit_=False, input_=None):
+ def test_main(args, exit_=False, input_=None, full=False):
"""Test main called with given ``args``.
If ``exit_`` is ``True``, check that ``SystemExit`` is raised. We then
@@ -179,7 +179,7 @@
sys.stdout.flush()
output = output_buffer.getvalue()
sys.stdin, sys.stdout = old_stdin, old_stdout
- return output
+ return output if full else output[:100]
with tempfile.NamedTemporaryFile(delete=False) as file_object:
file_object.write(SVG_SAMPLE)
@@ -198,9 +198,8 @@
assert test_main(['-'], input_=svg_filename) == expected_pdf
# Test DPI
- output = test_main([svg_filename, '-d', '10', '-f', 'png'])
+ output = test_main([svg_filename, '-d', '10', '-f', 'png'], full=True)
image = cairo.ImageSurface.create_from_png(io.BytesIO(output))
- print(image.get_width(), image.get_height())
assert image.get_width() == 40
assert image.get_height() == 50
@@ -209,17 +208,17 @@
temp_1 = os.path.join(temp, 'result_1')
# Default to PDF
assert not test_main([svg_filename, '-o', temp_1])
- assert read_file(temp_1) == expected_pdf
+ assert read_file(temp_1)[:100] == expected_pdf
temp_2 = os.path.join(temp, 'result_2.png')
# Guess from the file extension
assert not test_main([svg_filename, '-o', temp_2])
- assert read_file(temp_2) == expected_png
+ assert read_file(temp_2)[:100] == expected_png
temp_3 = os.path.join(temp, 'result_3.png')
# Explicit -f wins
assert not test_main([svg_filename, '-o', temp_3, '-f', 'pdf'])
- assert read_file(temp_3) == expected_pdf
+ assert read_file(temp_3)[:100] == expected_pdf
finally:
shutil.rmtree(temp)