Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1706235

Summary: python-svgwrite FTBFS with Python 3.8
Product: [Fedora] Fedora Reporter: Charalampos Stratakis <cstratak>
Component: python-svgwriteAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jujens, mhroncok, tir.karthi, vtrefny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-svgwrite-1.3.1-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-15 05:56:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1686977    
Attachments:
Description Flags
Full log from Copr
none
Skip the broken test none

Description Charalampos Stratakis 2019-05-03 20:58:15 UTC
Created attachment 1562734 [details]
Full log from Copr

python-svgwrite-1.2.1-1 fails to build with Python 3.8 as there are 71 test failures, most probably related to invalid escape sequences.

/builddir/build/BUILD/svgwrite-1.2.1/tests/test_gradients.py:36: SyntaxWarning: invalid escape sequence \(
  self.assertTrue(re.match("^url\(#id\d+\) none$", lg.get_paint_server()))
/builddir/build/BUILD/svgwrite-1.2.1/tests/test_gradients.py:37: SyntaxWarning: invalid escape sequence \(
  self.assertTrue(re.match("^url\(#id\d+\) red$", lg.get_paint_server(default='red')))
/builddir/build/BUILD/svgwrite-1.2.1/tests/test_gradients.py:68: SyntaxWarning: invalid escape sequence \(
  self.assertTrue(re.match("^url\(#id\d+\) none$", rg.get_paint_server()))
/builddir/build/BUILD/svgwrite-1.2.1/tests/test_gradients.py:69: SyntaxWarning: invalid escape sequence \(
  self.assertTrue(re.match("^url\(#id\d+\) red$", rg.get_paint_server(default='red')))
/builddir/build/BUILD/svgwrite-1.2.1/tests/test_marker_class.py:29: SyntaxWarning: invalid escape sequence \d
  re.match('^<marker id="id\d+"><g /></marker>$',
/builddir/build/BUILD/svgwrite-1.2.1/tests/test_xlink.py:45: SyntaxWarning: invalid escape sequence \d
  self.assertTrue(re.match('^<use xlink:href="#id\d+" />$', m.tostring()))

This is due to https://bugs.python.org/issue32912

Full log attached

Comment 1 Karthikeyan Singaravelan 2019-06-22 06:46:30 UTC
Created an upstream PR to fix SyntaxWarning : https://github.com/mozman/svgwrite/pull/50

Running the tests locally it seems that xml comparison tests use toString() where the insertion order is now preserved in https://bugs.python.org/issue34160. Upstream issue : https://github.com/mozman/svgwrite/issues/51

Thanks

Comment 2 Miro HronĨok 2019-07-10 11:15:32 UTC
Current status:

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.kJnkDv
+ umask 022
+ cd /builddir/build/BUILD
+ cd svgwrite-1.3.1
+ /usr/bin/python3 -m unittest discover -s tests
............................................................................................................................................................................................................................................................................................................F..............s............................................................................................................................................................
======================================================================
FAIL: test_pretty_print (test_pretty_xml.TestPrettyXML)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/svgwrite-1.3.1/tests/test_pretty_xml.py", line 20, in test_pretty_print
    self.assertEqual(e, r)
AssertionError: '<svg baseProfile="full" height="100%" version=[164 chars]nk">' != '<svg xmlns="http://www.w3.org/2000/svg" xmlns:[164 chars]0%">'
- <svg baseProfile="full" height="100%" version="1.1" viewBox="0,0,10000,10000" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="100%" version="1.1" viewBox="0,0,10000,10000" width="100%">


----------------------------------------------------------------------
Ran 472 tests in 0.407s

FAILED (failures=1, skipped=1)

Comment 3 Julien Enselme 2019-07-13 16:06:41 UTC
Created attachment 1590290 [details]
Skip the broken test

Given the output of the tests, I think we can just skip this test. I join a patch to do that. I don't have permission on the repo any more to push it. If you agree, you can apply it.

Comment 4 Vojtech Trefny 2019-07-15 05:56:09 UTC
I was hoping the upstream maintainer would decide on skipping this and/or fix this (see https://github.com/mozman/svgwrite/pull/59), I've tried to fix the pretty print use case too, but gave up after few hours trying to understand how XML parsing works. I've added the skip as downstream patch for rawhide for now.