Exception in pivy cast functions with Python 3.10 (upstream patches)

Bug #2000840 reported by David Ward
40
This bug affects 9 people
Affects Status Importance Assigned to Milestone
pivy (Ubuntu)
Fix Released
High
Unassigned
Jammy
Fix Released
High
David Ward
Kinetic
Fix Released
High
David Ward
Lunar
Fix Released
High
Unassigned

Bug Description

[ Impact ]

 * Cast functions in pivy, prior to version 0.6.8, did not properly use the
   Python API when extracting values from an argument list. With Python 3.10
   and later, the improper calls cause Python exceptions.

 * Users encounter the exceptions when running FreeCAD, which utilizes pivy,
   preventing the application from functioning as intended.

 * The issue is fixed upstream by conforming to the Python API requirements.
   Backporting the fixes [1] [2] [3] onto affected stable releases of Ubuntu
   will allow users to run FreeCAD without encountering these exceptions.

[ Test Plan ]

 * The issue is reproduced by running "python3" and typing these statements,
   which produce an error message due to an exception:

       from pivy import coin
       from pivy.gui import soqt
       s = coin.SoTransform()
       coin.cast(s, "SoNode")
       soqt.cast(s, "SoNode")

[ Where problems could occur ]

 * If other Python API compatibility issues exist in pivy, which are not yet
   known, those could appear after this change.

 * Aside from FreeCAD, no other packages in the Ubuntu repositories have any
   type of dependency on pivy, except for the metapackages "science-viewing"
   and "science-viewing-dev". Issues resulting from this change are expected
   to predominantly affect FreeCAD users, who are otherwise impacted by the
   issue being addressed here.

[1] https://github.com/coin3d/pivy/pull/90
[2] https://github.com/coin3d/pivy/pull/91
[3] https://github.com/coin3d/pivy/pull/99

Revision history for this message
David Ward (dpward) wrote :
Changed in pivy (Ubuntu):
status: New → Confirmed
David Ward (dpward)
description: updated
Revision history for this message
David Ward (dpward) wrote :
description: updated
Revision history for this message
David Ward (dpward) wrote :
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Hi David! Apologies for taking this long to get a response. You're almost there :)

Could you please edit the bug report to follow the Stable Release Update template[1]? I'll be happy to sponsor these uploads after that. (Unsubscribing the sponsors team for now.)

Thank you!

[1] https://wiki.ubuntu.com/StableReleaseUpdates

David Ward (dpward)
description: updated
Simon Quigley (tsimonq2)
no longer affects: pivy (Ubuntu Focal)
Changed in pivy (Ubuntu Jammy):
assignee: nobody → David Ward (dpward)
Changed in pivy (Ubuntu Kinetic):
assignee: nobody → David Ward (dpward)
Changed in pivy (Ubuntu Jammy):
importance: Undecided → High
Changed in pivy (Ubuntu Kinetic):
importance: Undecided → High
Changed in pivy (Ubuntu Lunar):
importance: Undecided → High
Changed in pivy (Ubuntu Kinetic):
status: New → Confirmed
Changed in pivy (Ubuntu Jammy):
status: New → Confirmed
Changed in pivy (Ubuntu Lunar):
status: Confirmed → Fix Released
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Uploaded now, thank you!

Changed in pivy (Ubuntu Jammy):
status: Confirmed → In Progress
Changed in pivy (Ubuntu Kinetic):
status: Confirmed → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted pivy into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pivy/0.6.7-0.1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in pivy (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in pivy (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello David, or anyone else affected,

Accepted pivy into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pivy/0.6.5-1ubuntu0.22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
David Ward (dpward) wrote (last edit ):

Verified successfully on Jammy and Kinetic, according to test plan:

$ lsb_release -d
Description: Ubuntu 22.04.2 LTS
$ dpkg -l python3-pivy | tail -n +6
ii python3-pivy 0.6.5-1ubuntu0.22.04.1 amd64 Coin binding for Python 3
$ python3
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pivy import coin
>>> from pivy.gui import soqt
>>> s = coin.SoTransform()
>>> coin.cast(s, "SoNode")
<pivy.coin.SoNode; proxy of <Swig Object of type 'SoNode *' at 0x7f6205593a20> >
>>> soqt.cast(s, "SoNode")
<pivy.coin.SoNode; proxy of <Swig Object of type 'SoNode *' at 0x7f6203c335d0> >

$ lsb_release -d
Description: Ubuntu 22.10
$ dpkg -l python3-pivy | tail -n +6
ii python3-pivy 0.6.7-0.1ubuntu0.1 amd64 Coin binding for Python 3
$ python3
Python 3.10.7 (main, Nov 24 2022, 19:45:47) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pivy import coin
>>> from pivy.gui import soqt
>>> s = coin.SoTransform()
>>> coin.cast(s, "SoNode")
<pivy.coin.SoNode; proxy of <Swig Object of type 'SoNode *' at 0x7fc3b03f7a20> >
>>> soqt.cast(s, "SoNode")
<pivy.coin.SoNode; proxy of <Swig Object of type 'SoNode *' at 0x7fc3aea975d0> >

tags: added: verification-done-jammy verification-done-kinetic
removed: verification-needed verification-needed-jammy verification-needed-kinetic
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for pivy has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pivy - 0.6.7-0.1ubuntu0.1

---------------
pivy (0.6.7-0.1ubuntu0.1) kinetic; urgency=medium

  * Fix exception in pivy cast functions with Python 3.10 (LP: #2000840)

 -- David Ward <email address hidden> Mon, 02 Jan 2023 20:35:44 -0500

Changed in pivy (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pivy - 0.6.5-1ubuntu0.22.04.1

---------------
pivy (0.6.5-1ubuntu0.22.04.1) jammy; urgency=medium

  * Fix exception in pivy cast functions with Python 3.10 (LP: #2000840)

 -- David Ward <email address hidden> Mon, 02 Jan 2023 19:51:20 -0500

Changed in pivy (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.