Git Product home page Git Product logo

Comments (8)

pavlutom avatar pavlutom commented on September 26, 2024

BTW, as a workaround, I'm just using Qt.ConnectionType.DirectConnection as in many cases it doesn't matter much which one I use. However, in some cases it does, and also the AutoConnection, which is the default value, probably results in QueuedConnection, causing this problem.

That's how I discovered the issue - I was not explicitly stating the connection type, hence using the default value (AutoConnection). After upgrading Nuitka from 1.5.6 to 2.0.3, bugs in my application caused by this issue appeared.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

The use of 2.0.3 is strange, but I have to confirm that it's present in develop and probably 2.1.2 as well. I can bisect it, but it seems there is some of the fixes made it it in the meantime required, so it's a bit wonky. This area has seen a bunch of fixes, sometimes with regressions. Nuitka does the default automatically there for type to AutoConnection, which is supposed to be the default value, and works for some versions, so hopefully that has nothing to do with it.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

So, for bisection this was too hard.

Removing this bit from the package configuration restores your behavior:

                      if not slot.im_func.__name__.startswith("_pyside6_workaround_"):
                        slot.im_func.__name__ = "_pyside6_workaround_" + slot.im_func.__name__

However, this feels very much needed. I feel stuck in a workaround trap. Apparently the __name__ is being used by PySide to identify the slot in its base class, and with that failing, I seem to remember, I might have seen code that does then just use what it has. So that workaround cannot remain. However, for names like update or run it fails to do the proper thing, and then finds the wrong slot.

Renaming it is apparently something that would also have to happen in its class, such that it will then work I will try and explore that option, adding a name to the class, might be the solution for both.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

So, adding the workaround name to the class indeed helps.

                      if not slot.im_func.__name__.startswith("_pyside6_workaround_"):
                        slot.im_func.__name__ = "_pyside6_workaround_" + slot.im_func.__name__

                        try:
                          setattr(slot.im_self.__class__, slot.im_func.__name__, slot.im_func)
                        except Exception:
                          pass

That seems to work, and should be very harmless, or so I am hoping. We might have to fix this in PySide6 proper one day.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

Thanks for your report, this is fixed on the factory branch, which is a development version under rapid development. You can try it out by going here: https://nuitka.net/doc/factory.html

Feedback if this is working is very welcome, just please do not share plans of doing it, but rather confirmations or denials of it working.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

I confused myself with 2.1 vs. 2.0.3 there, you had confirmed it's already bad today. In the 2.0.x series a bunch of hotfixes were made, to address issues like wrong argument names, and the name collision and that causing segfaults if done on just anything, etc. this has been a hot area since 1.9.x days, but I guess, we got all things covered again. This will likely arrive in a hotfix really soon now.

from nuitka.

pavlutom avatar pavlutom commented on September 26, 2024

@kayhayen Just tested Nuitka 2.2rc2 (factory), the example is working correctly I think. Thanks for the quick fix! :)

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

This part of the 2.1.3 release I just made.

from nuitka.

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.