Bug 1903072 - veusz fails to build with Python 3.10: TypeError: RecordPaintDevice(): argument 1 has unexpected type 'float'
Summary: veusz fails to build with Python 3.10: TypeError: RecordPaintDevice(): argume...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: veusz
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeremy Sanders
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-12-01 09:23 UTC by Tomáš Hrnčiar
Modified: 2020-12-02 20:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-02 20:15:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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