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 1903072

Summary: veusz fails to build with Python 3.10: TypeError: RecordPaintDevice(): argument 1 has unexpected type 'float'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: veuszAssignee: Jeremy Sanders <jeremy>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jeremy, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-02 20:15:35 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: 1890881    

Description Tomáš Hrnčiar 2020-12-01 09:23:56 UTC
veusz fails to build with Python 3.10.0a2.

Traceback (most recent call last):
  File "/builddir/build/BUILD/veusz-3.2.1/tests/runselftest.py", line 306, in <module>
    runTests(test_saves=options.test_saves,
  File "/builddir/build/BUILD/veusz-3.2.1/tests/runselftest.py", line 235, in runTests
    renderVszTest(infile, outfile, test_saves=test_saves,
  File "/builddir/build/BUILD/veusz-3.2.1/tests/runselftest.py", line 173, in renderVszTest
    ifc.Export(outfile)
  File "/builddir/build/BUILDROOT/veusz-3.2.1-3.fc34.x86_64/usr/lib64/python3.10/site-packages/veusz/document/commandinterface.py", line 783, in Export
    e.add(filename, pages)
  File "/builddir/build/BUILDROOT/veusz-3.2.1-3.fc34.x86_64/usr/lib64/python3.10/site-packages/veusz/document/export.py", line 456, in add
    self.doc.paintTo(phelper, page)
  File "/builddir/build/BUILDROOT/veusz-3.2.1-3.fc34.x86_64/usr/lib64/python3.10/site-packages/veusz/document/doc.py", line 345, in paintTo
    self.basewidget.draw(painthelper, page)
  File "/builddir/build/BUILDROOT/veusz-3.2.1-3.fc34.x86_64/usr/lib64/python3.10/site-packages/veusz/widgets/root.py", line 133, in draw
    painter = painthelper.painter(self, posn)
  File "/builddir/build/BUILDROOT/veusz-3.2.1-3.fc34.x86_64/usr/lib64/python3.10/site-packages/veusz/document/painthelper.py", line 190, in painter
    s = self.states[(widget, layer)] = DrawState(widget, bounds, clip, self)
  File "/builddir/build/BUILDROOT/veusz-3.2.1-3.fc34.x86_64/usr/lib64/python3.10/site-packages/veusz/document/painthelper.py", line 43, in __init__
    self.record = RecordPaintDevice(
TypeError: RecordPaintDevice(): argument 1 has unexpected type 'float'
error: Bad exit status from /var/tmp/rpm-tmp.UKqQnu (%check)
    Bad exit status from /var/tmp/rpm-tmp.UKqQnu (%check)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01807305-veusz/

For all our attempts to build veusz with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/veusz/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-12-01 16:07:04 UTC
See also bz1902382. This might be the same thing (the float needs to be rounded first).

Comment 2 Jeremy Sanders 2020-12-01 18:58:20 UTC
Probably a cast to int would fix this, though I'm worried there could be similar bugs. I guess I'll have to try patching it and seeing whether there are any other build problems in mock.

Comment 3 Jeremy Sanders 2020-12-02 20:15:35 UTC
There were some other places in the code which needed similarly fixing. I've uploaded veusz-3.3-1 including a patch to rawhide which builds ok under mock using Python 3.10.