PR: Add missing QtWebEngineWidgets.QWebEngineScript import for PyQt5 and PySide2#322
PR: Add missing QtWebEngineWidgets.QWebEngineScript import for PyQt5 and PySide2#322EasyIsrael wants to merge 6 commits intospyder-ide:masterfrom
QtWebEngineWidgets.QWebEngineScript import for PyQt5 and PySide2#322Conversation
CAM-Gerlach
left a comment
There was a problem hiding this comment.
For the other two, assuming it is available, it seems to make sense, but I'm unsure why this imports QWebEngineScript for PyQT6 and PYSIDE6, when its already imported by the import *.
The test failures on Python 3.10 are unrelated; I can look into fixing them—for some reason, the installed qtpy package isn't getting found on import in the tests.
qtpy/QtWebEngineWidgets.py
Outdated
| from PyQt6.QtWebEngineCore import QWebEnginePage | ||
| from PyQt6.QtWebEngineCore import QWebEngineSettings | ||
| from PyQt6.QtWebEngineCore import QWebEngineProfile | ||
| from PyQt6.QtWebEngineWidgets import QWebEngineScript |
There was a problem hiding this comment.
I'm a little confused why this is one needed is. Isn't this name already imported by from PyQt6.QtWebEngineWidgets import *?
There was a problem hiding this comment.
| from PyQt6.QtWebEngineWidgets import QWebEngineScript |
qtpy/QtWebEngineWidgets.py
Outdated
| from PySide6.QtWebEngineCore import QWebEnginePage | ||
| from PySide6.QtWebEngineCore import QWebEngineSettings | ||
| from PySide6.QtWebEngineCore import QWebEngineProfile | ||
| from PySide6.QtWebEngineWidgets import QWebEngineScript |
There was a problem hiding this comment.
| from PySide6.QtWebEngineWidgets import QWebEngineScript |
|
FYI, I've solved the CI issues in #324 ; once that's merged, you can |
|
I have no pyside6 and no pyqt6 installed, so i just tested it on pyside2
and pyqt5.
Those two work now with my changes.
For the others i just added it the same way, because i thought it is
neccesary.
CAM Gerlach ***@***.***> schrieb am Sa., 26. Feb. 2022, 02:41:
… ***@***.**** requested changes on this pull request.
For the other two, assuming it is available, it seems to make sense, but
I'm unsure why this imports QWebEngineScript for PyQT6 and PYSIDE6, when
its already imported by the import *.
The test failures on Python 3.10 are unrelated; I can look into fixing
them—for some reason, the installed qtpy package isn't getting found on
import in the tests.
------------------------------
In qtpy/QtWebEngineWidgets.py
<#322 (comment)>:
> @@ -33,15 +34,20 @@
from PyQt6.QtWebEngineCore import QWebEnginePage
from PyQt6.QtWebEngineCore import QWebEngineSettings
from PyQt6.QtWebEngineCore import QWebEngineProfile
+ from PyQt6.QtWebEngineWidgets import QWebEngineScript
I'm a little confused why this is one needed is. Isn't this name already
imported by from PyQt6.QtWebEngineWidgets import *?
------------------------------
In qtpy/QtWebEngineWidgets.py
<#322 (comment)>:
> elif PYSIDE6:
from PySide6.QtWebEngineWidgets import *
from PySide6.QtWebEngineCore import QWebEnginePage
from PySide6.QtWebEngineCore import QWebEngineSettings
from PySide6.QtWebEngineCore import QWebEngineProfile
+ from PySide6.QtWebEngineWidgets import QWebEngineScript
Same here...
—
Reply to this email directly, view it on GitHub
<#322 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHBXMUX4KPCG5LUR72IULU5AVV7ANCNFSM5PLTBIBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Actually, it isn't—they already work with those bindings, because right above where they were added, QtPy has the lines from PyQt6.QtWebEngineWidgets import *and from PySide6.QtWebEngineWidgets import *This imports all top-level non-private names from the Therefore, those two lines added can be removed, as I've made GitHub suggestions for (you can either batch-apply them, or do so manually). |
…ssion PR: Restrict broken Pytest versions to those not affected by the Pytest 7.0.0 import-mode=importlib behavior regression
dalthviz
left a comment
There was a problem hiding this comment.
Thank you for your help with this @EasyIsrael ! Already merged the PR to fix our tests (#324) so you can go ahead and rebase to get the changes 👍 Also, besides @CAM-Gerlach comments regarding the removal of some lines added on PyQt6 and PySide6, it would be nice to add a new assertion when testing the module here:
qtpy/qtpy/tests/test_qtwebenginewidgets.py
Lines 4 to 12 in 1cd704f
So adding the a line like:
assert QtWebEngineWidgets.QWebEngineScript is not NoneLet us know if you have any question or if you need help with the rebase or to do the changes
QtWebEngineWidgets.QWebEngineScript import for PyQt5 and PySide2
|
(As a reminder, the commands to rebase this:) git fetch upstream
git rebase upstream/master
git push -f |
|
Hey @EasyIsrael, thanks for bearing with us! It looks like things went wrong with Git here—seems like the original issue, which I should have noticed before, is that the PR was submitted from your While you could
Thanks! |
|
Thank you CAM-Gerlach and dalthviz for your help |
|
Thanks, @EasyIsrael , looks like it did, so I'll close this one. |
No description provided.