Giter Site home page Giter Site logo

Comments (16)

antonok-edm avatar antonok-edm commented on May 25, 2024 1

In case anyone here is itching to get back to work on their FreeCAD projects, #91 should do the trick!

from pivy.

looooo avatar looooo commented on May 25, 2024

Can you try running the privy test?

from pivy.

hobbes1069 avatar hobbes1069 commented on May 25, 2024

Sure, what's the command? I'm using CMake for the build system.

Is it built in, or do I just need to run the test files with python?

from pivy.

hobbes1069 avatar hobbes1069 commented on May 25, 2024

I ran the tests against my installed package and unsurprisingly there are errors:
https://hobbes1069.fedorapeople.org/coin_tests.log

from pivy.

looooo avatar looooo commented on May 25, 2024

I am currently stuck with python3.10 update at pyside2. Therefore it most likely need some time until I can test privy with python 3.10.

from pivy.

hobbes1069 avatar hobbes1069 commented on May 25, 2024

Me too. I've worked through some of it though.
https://src.fedoraproject.org/rpms/python-pyside2/blob/rawhide/f/python3.10.patch

I have some more but haven't committed it yet.

$ cat pyside-python310.patch
Index: pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/basewrap                                     per.cpp
===================================================================
--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/basewr                                     apper.cpp
+++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/basewrapper                                     .cpp
@@ -366,7 +366,7 @@ SbkObjectType *SbkObject_TypeF(void)
     static PyTypeObject *type = nullptr;
     if (!type) {
         type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Typ                                     e_spec));
-        Py_TYPE(type) = SbkObjectType_TypeF();
+        Py_SET_TYPE(type, SbkObjectType_TypeF());
         Py_INCREF(Py_TYPE(type));
         type->tp_weaklistoffset = offsetof(SbkObject, weakreflist);
         type->tp_dictoffset = offsetof(SbkObject, ob_dict);
@@ -1110,7 +1110,7 @@ introduceWrapperType(PyObject *enclosing
     typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : S                                     bkObject_TypeF());

     PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes);
-    Py_TYPE(heaptype) = SbkObjectType_TypeF();
+    Py_SET_TYPE(heaptype, SbkObjectType_TypeF());
     Py_INCREF(Py_TYPE(heaptype));
     auto *type = reinterpret_cast<SbkObjectType *>(heaptype);
 #if PY_VERSION_HEX < 0x03000000

from pivy.

looooo avatar looooo commented on May 25, 2024

Great, I will try the patches. Which version of pyside2 / qt are you compiling?

from pivy.

looooo avatar looooo commented on May 25, 2024

Not sure if it makes a lot of sense to backport these changes. Maybe it's better to wait for a newer qt / pyside2 version to be packaged for conda-forge. I guess qt6.x and pyside2 6.x will have python 3.10 support.

from pivy.

hobbes1069 avatar hobbes1069 commented on May 25, 2024

Pyside2 5.15.2
Qt 5.15.2

Yes, the first patch was backported from a Pyside2 6.x commit. I don't know how much work they will put into Pyside2 5.x at this point, but is FreeCAD compatible with Qt6? I don't even want to think about migrating all of Fedora :)

from pivy.

looooo avatar looooo commented on May 25, 2024

Yep, I see the troubles. I will try to patch pyside 5.13 to work with python 3.10. once done I will come back to this issue.

from pivy.

hobbes1069 avatar hobbes1069 commented on May 25, 2024

Sounds good. I played around with trying to find python related commits from 6.2.2 and try to backport but it became a rabbit hole and I had to give up.

from pivy.

looooo avatar looooo commented on May 25, 2024

@hobbes1069 conda-forge is updating to qt5.15 so we can work on the same issue. I asked a question @ gitter. I hope someone takes care of this issue:
https://gitter.im/PySide/pyside2?at=61bb76659a9ec834fbd1c865

from pivy.

hawkmoth avatar hawkmoth commented on May 25, 2024

@hobbes1069 It looks like the FreeCAD issue is partly related to Coin3 vs. Coin4. The fc35 pivy is built against Coin4, while the FreeCAD modules seem to be using the Coin3 API (???).

$>dnf repoquery --provides Coin3
Last metadata expiration check: 3:06:45 ago on Fri 31 Dec 2021 07:18:25 PM PST.
Coin3 = 3.1.3-29.fc35
Coin3(x86-32) = 3.1.3-29.fc35
Coin3(x86-64) = 3.1.3-29.fc35
libCoin.so.60
libCoin.so.60()(64bit)**                 <===
$> dnf repoquery --provides Coin4
Last metadata expiration check: 3:08:23 ago on Fri 31 Dec 2021 07:18:25 PM PST.
Coin4 = 4.0.0-9.fc35
Coin4(x86-32) = 4.0.0-9.fc35
Coin4(x86-64) = 4.0.0-9.fc35
libCoin.so.80
libCoin.so.80()(64bit)                    <=== 
dnf repoquery --requires python3-pivy
Last metadata expiration check: 3:09:46 ago on Fri 31 Dec 2021 07:18:25 PM PST.
/usr/bin/python3
libCoin.so.80()(64bit)                    <===
libSoQt.so.20()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.8)(64bit)
libstdc++.so.6(CXXABI_1.3.9)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
python(abi) = 3.10
rtld(GNU_HASH)

The following works just fine in the FreeCAD Python console:

from pivy import coin
doc = App.newDocument("testpivy")
view = Gui.ActiveDocument.ActiveView 
sg=view.getScenegraph()
sg.addChild(coin.SoCube())

This minimum excerpt from the Draft workbench code produces an error similar to the above:

pick = coin.SoPickStyle()
pick.style.setValue(coin.SoPickStyle.UNPICKABLE)

The issue is that the style attribute does not exist. Which may be due to incompatible APIs between Coin3 and Coin4 (I do not know either one).

from pivy.

ipatch avatar ipatch commented on May 25, 2024

a couple of use noticed similar issues on macos as well. those of us who building and install freecad on macos with macos homebrew have seen issues related to python 3.10

it appears shiboken2 v5.15.2 will not compile / build with the latest python 3.10

FreeCAD/homebrew-freecad#267 (comment)

there was a bug reported upstream below,

https://bugreports.qt.io/browse/PYSIDE-1436


i mention all of this because apparently python 3.10 has introduced some changes that aren't compatible with libraries like shiboken2 in its current state unfortunately. and i doubt the upstream qt maintainers are gunna wanna back port fixes to get shiboken2 v5.15.2 and pyside2 v5.15.2 to work with python 3.10

from pivy.

adrianinsaval avatar adrianinsaval commented on May 25, 2024

From what version onwards is pivy compatible with python 3.10, is it 0.6.6?

from pivy.

antonok-edm avatar antonok-edm commented on May 25, 2024

@adrianinsaval it should be in 0.6.7.

from pivy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.