-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement #139 #140
Implement #139 #140
Conversation
This only applies to members we've added ourselves, right? (so for instance, Could we just make a list of them here before merging, for completeness? |
Yeah. Remap as per usual, and make our own space for our own members.
Of course, list is in the README.
The name is up for grabs. Edit: Not to mention |
Ah, excellent. Makes it easier to come up with a good name for this. Hm. How about something like
I mean.. what are the chances that... hm. I'll have to sleep on it. |
How was your sleep? :) How about..? # After
from Qt import QtCompat
QtCompat.setSectionResizeMode()
QtCompat.__binding__ == "PyQt5" I think we'll need the button = QtWidgets.QPushButton("Button")
Custom.someOtherFunction() # Is this related to Qt? |
Yep. Sounds good. Let's go for it. Does this backwards-breaking feature mean that we should also scramble for a v1.0.0 release? |
It doesn't break backwards compatibility, the current members still work. Once we hit 1.0, we can remove them. See the |
This points out a potential problem with a previous fix for compatibility with https://github.com/pyqt/python-qt. Before, these members were tested against existing members, but now they are blindly added via `setattr`. It's safe, since we've already tested these and know for sure that they aren't being overwritten. But it still opens the door for these to one day override a newly added member. Luckily, this is only relevant until the next major release, upon which they are all discarded.
d96c776
to
24a7e59
Compare
Ah, that's perfect.
Sounds good! This all looks excellent to me. |
This introduces a radical change to counter #139, #109, #112 and #96.
The change involves moving all added members of Qt.py to it's own individual module,
QtShim
.It also counteracts our current Achilles heel, which is that at some point one of our additions are bound to conflict with native existing members of the binding. For example, if one day PySide decides to add
__qt_version__
to their offering, but have a different type for it, liketuple
, whereas we havestr
So I'm on the fence about whether this is the right way to do it. The disadvantage is a more complex code base; the reader must now understand how
self
plays a part, and howQtShim
even makes it into theQt
namespace.So let me know what you think.