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 - python-svgwrite FTBFS with Python 3.8
Summary: python-svgwrite FTBFS with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-svgwrite
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Vojtech Trefny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-03 20:58 UTC by Charalampos Stratakis
Modified: 2019-07-15 05:56 UTC (History)
4 users (show)

Fixed In Version: python-svgwrite-1.3.1-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-15 05:56:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (172.88 KB, text/plain)
2019-05-03 20:58 UTC, Charalampos Stratakis
no flags Details
Skip the broken test (1.27 KB, patch)
2019-07-13 16:06 UTC, Julien Enselme
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.