no-webengine.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. diff --git a/requirements/main.yml b/requirements/main.yml
  2. index 8245e7d..64f3fd6 100644
  3. --- a/requirements/main.yml
  4. +++ b/requirements/main.yml
  5. @@ -27,7 +27,6 @@ dependencies:
  6. - pylint-venv >=2.1.1
  7. - pyls-spyder >=0.4.0
  8. - pyqt <5.16
  9. - - pyqtwebengine <5.16
  10. - python-lsp-black >=1.2.0
  11. - python-lsp-server >=1.7.1,<1.8.0
  12. - pyzmq >=22.1.0
  13. diff --git a/runtests.py b/runtests.py
  14. index 8e94c09..38a5165 100644
  15. --- a/runtests.py
  16. +++ b/runtests.py
  17. @@ -20,7 +20,6 @@ os.environ['SPYDER_PYTEST'] = 'True'
  18. # NOTE: This needs to be imported before any QApplication.
  19. # Don't remove it or change it to a different location!
  20. # pylint: disable=wrong-import-position
  21. -from qtpy import QtWebEngineWidgets # noqa
  22. import pytest
  23. diff --git a/setup.py b/setup.py
  24. index 766d5fa..1968863 100644
  25. --- a/setup.py
  26. +++ b/setup.py
  27. @@ -228,7 +228,7 @@ install_requires = [
  28. 'python-lsp-black>=1.2.0',
  29. 'pyls-spyder>=0.4.0',
  30. 'pyqt5<5.16',
  31. - 'pyqtwebengine<5.16',
  32. +
  33. 'python-lsp-server[all]>=1.7.1,<1.8.0',
  34. 'pyxdg>=0.26;platform_system=="Linux"',
  35. 'pyzmq>=22.1.0',
  36. diff --git a/spyder/app/cli_options.py b/spyder/app/cli_options.py
  37. index 3ae36f0..325d99e 100644
  38. --- a/spyder/app/cli_options.py
  39. +++ b/spyder/app/cli_options.py
  40. @@ -139,7 +139,7 @@ def get_options(argv=None):
  41. '--no-web-widgets',
  42. dest="no_web_widgets",
  43. action='store_true',
  44. - default=False,
  45. + default=True,
  46. help="Disable the usage of web widgets in Spyder (e.g. the Help and "
  47. "Online help panes)."
  48. )
  49. diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
  50. index 0e0ab3e..cb8fb5c 100644
  51. --- a/spyder/app/mainwindow.py
  52. +++ b/spyder/app/mainwindow.py
  53. @@ -52,9 +52,6 @@ from qtpy.QtWidgets import (QApplication, QMainWindow, QMenu, QMessageBox,
  54. # Avoid a "Cannot mix incompatible Qt library" error on Windows platforms
  55. from qtpy import QtSvg # analysis:ignore
  56. -# Avoid a bug in Qt: https://bugreports.qt.io/browse/QTBUG-46720
  57. -from qtpy import QtWebEngineWidgets # analysis:ignore
  58. -
  59. from qtawesome.iconic_font import FontError
  60. #==============================================================================
  61. diff --git a/spyder/app/tests/conftest.py b/spyder/app/tests/conftest.py
  62. index eed1a5f..f8e5848 100755
  63. --- a/spyder/app/tests/conftest.py
  64. +++ b/spyder/app/tests/conftest.py
  65. @@ -18,7 +18,6 @@ from qtpy.QtCore import Qt
  66. from qtpy.QtTest import QTest
  67. from qtpy.QtWidgets import QApplication, QFileDialog, QLineEdit, QTabBar
  68. # This is required to run our tests in VSCode or Spyder-unittest
  69. -from qtpy import QtWebEngineWidgets # noqa
  70. import psutil
  71. import pytest
  72. diff --git a/spyder/app/tests/test_mainwindow.py b/spyder/app/tests/test_mainwindow.py
  73. index 94c5577..75790e9 100644
  74. --- a/spyder/app/tests/test_mainwindow.py
  75. +++ b/spyder/app/tests/test_mainwindow.py
  76. @@ -38,7 +38,7 @@ from qtpy import PYQT_VERSION, PYQT5
  77. from qtpy.QtCore import Qt, QTimer
  78. from qtpy.QtGui import QImage, QTextCursor
  79. from qtpy.QtWidgets import QAction, QApplication, QInputDialog, QWidget
  80. -from qtpy.QtWebEngineWidgets import WEBENGINE
  81. +WEBENGINE = False
  82. # Local imports
  83. from spyder import __trouble_url__
  84. diff --git a/spyder/plugins/help/tests/test_plugin.py b/spyder/plugins/help/tests/test_plugin.py
  85. index dfdc35b..6f30a84 100644
  86. --- a/spyder/plugins/help/tests/test_plugin.py
  87. +++ b/spyder/plugins/help/tests/test_plugin.py
  88. @@ -16,7 +16,7 @@ from unittest.mock import Mock, MagicMock
  89. # Third party imports
  90. from qtpy import PYQT_VERSION
  91. from qtpy.QtWidgets import QMainWindow
  92. -from qtpy.QtWebEngineWidgets import WEBENGINE
  93. +WEBENGINE = False
  94. import pytest
  95. from flaky import flaky
  96. diff --git a/spyder/plugins/help/widgets.py b/spyder/plugins/help/widgets.py
  97. index d5f5151..3400794 100644
  98. --- a/spyder/plugins/help/widgets.py
  99. +++ b/spyder/plugins/help/widgets.py
  100. @@ -17,7 +17,7 @@ import sys
  101. from qtpy import PYQT5
  102. from qtpy.QtCore import Qt, QUrl, Signal, Slot, QPoint
  103. from qtpy.QtGui import QColor
  104. -from qtpy.QtWebEngineWidgets import WEBENGINE, QWebEnginePage
  105. +
  106. from qtpy.QtWidgets import (QActionGroup, QComboBox, QLabel, QLineEdit,
  107. QMessageBox, QSizePolicy, QStackedLayout,
  108. QVBoxLayout, QWidget)
  109. diff --git a/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py b/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py
  110. index 378ac9a..8be557b 100644
  111. --- a/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py
  112. +++ b/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py
  113. @@ -28,7 +28,7 @@ from packaging.version import parse
  114. import pytest
  115. from qtpy import PYQT5
  116. from qtpy.QtCore import Qt
  117. -from qtpy.QtWebEngineWidgets import WEBENGINE
  118. +WEBENGINE = False
  119. from qtpy.QtWidgets import QMessageBox
  120. from spyder_kernels import __version__ as spyder_kernels_version
  121. import sympy
  122. diff --git a/spyder/plugins/ipythonconsole/widgets/main_widget.py b/spyder/plugins/ipythonconsole/widgets/main_widget.py
  123. index a12c77a..2130017 100644
  124. --- a/spyder/plugins/ipythonconsole/widgets/main_widget.py
  125. +++ b/spyder/plugins/ipythonconsole/widgets/main_widget.py
  126. @@ -23,7 +23,7 @@ import qstylizer.style
  127. from qtconsole.client import QtKernelClient
  128. from qtpy.QtCore import Signal, Slot
  129. from qtpy.QtGui import QColor
  130. -from qtpy.QtWebEngineWidgets import WEBENGINE
  131. +WEBENGINE = False
  132. from qtpy.QtWidgets import (
  133. QApplication, QHBoxLayout, QLabel, QMessageBox, QVBoxLayout, QWidget)
  134. from traitlets.config.loader import Config, load_pyconfig_files
  135. diff --git a/spyder/plugins/onlinehelp/widgets.py b/spyder/plugins/onlinehelp/widgets.py
  136. index d97a9bb..e2896ad 100644
  137. --- a/spyder/plugins/onlinehelp/widgets.py
  138. +++ b/spyder/plugins/onlinehelp/widgets.py
  139. @@ -16,7 +16,7 @@ import sys
  140. # Third party imports
  141. from qtpy.QtCore import Qt, QThread, QUrl, Signal, Slot
  142. from qtpy.QtGui import QCursor
  143. -from qtpy.QtWebEngineWidgets import WEBENGINE
  144. +WEBENGINE = False
  145. from qtpy.QtWidgets import QApplication, QLabel, QVBoxLayout
  146. # Local imports
  147. diff --git a/spyder/widgets/browser.py b/spyder/widgets/browser.py
  148. index fd85fcc..33b5d83 100644
  149. --- a/spyder/widgets/browser.py
  150. +++ b/spyder/widgets/browser.py
  151. @@ -16,8 +16,8 @@ import qstylizer.style
  152. from qtpy import PYQT5
  153. from qtpy.QtCore import QEvent, Qt, QUrl, Signal, Slot
  154. from qtpy.QtGui import QFontInfo
  155. -from qtpy.QtWebEngineWidgets import (WEBENGINE, QWebEnginePage,
  156. - QWebEngineSettings, QWebEngineView)
  157. +
  158. +
  159. from qtpy.QtWidgets import QFrame, QHBoxLayout, QLabel, QProgressBar, QWidget
  160. # Local imports