ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

16 January 2021
2021-01-16×
16 January 2021
Hello! I want to try the PySide6 and probably re-write my app to this newer lib (I occasionally post here from time to time 🙄). Right now I playing around with the new snake_case feature but unsuccessfully. It just says object has no attribute 'move_to_thread', for example. Am I really blind and there is an obvious way to enable this new syntax?
from __feature__ import snake_case, true_property doesn't work (and I wonder why should at all, this sentence from the blog-post is rather confusing...)
U
Shouldn't it be __future__?
U
OK, from feature import snake_case, true_property is working now, if placed at the bottom of all imports 🙂 (though PyCharm is still complaining that __feature__ doesn't exist). How is this implemented? I've never seen such Python magic before 🙂 Where does the feature module is coming from?
you just need to import PySide6 (or from PySide6) first
THEN the __feature__ thing is available. True ... it's kinda weird that this looks independent from PySide then
Ë
And it's really no problem to do ANYTHING on import in Python :) You can easily create a runtime module stub on the fly
U
Yeah, probably it is messing with some global Python things...
Ë
You can do something like globals()['my_module'] = MyModuleStub()
U
It's certainly a time to add # noinspection PyUnresolvedReferences line because I will never explain THIS to my IDE 🙂
Ë
Basically PyCharm would "just" need access to a __feature__.pyi
C
The PyCharm issue, is a PyCharm problem on how they do things. Already @ctismer is starting looking into that matter, but at the moment, just bare with us, import at the end and ignore what PyCharm tell you :)
Ë
oh ... for __feature__.snake_case we probably need a whole new set of `.pyi`s right?!?!?! 🤔
Ë
but it is kinda implicit don't you think? If you'd ask me: I'd have found it more obvious to to sth like PySide6.enable_snake_case() 🤷‍♀️
the import makes more sense to me tbh 🤷‍♂️ I guess it's a matter of taste, boths seems to be a proper Python approach
C
you can always provide a patch to include that approach too, I don't think it's a bad idea
it seems that CVE-2020-15999 affects mainly qt5 pip binary wheels for win/mac because of libfreetype bundled in. But how severe is it, and is it possible to break out of the qtwebengine sandbox ?
Calendar: January 2021
Archive by month
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog