summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-08-26 16:44:25 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-08-26 16:44:25 +0200
commitb13f2eb4485b03cf237ab699da88620ba88e7b4c (patch)
tree8a395857a32dcb6781a0c986610da0a889e559d2 /scripts
parent2d9e9241265c526ebc97613af8a5063160daaee8 (diff)
downloadqutebrowser-b13f2eb4485b03cf237ab699da88620ba88e7b4c.tar.gz
qutebrowser-b13f2eb4485b03cf237ab699da88620ba88e7b4c.zip
Blanket PyQt5 -> PyQt6
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dev/build_pyqt_wheel.py4
-rwxr-xr-xscripts/dev/build_release.py2
-rw-r--r--scripts/dev/recompile_requirements.py10
-rw-r--r--scripts/dev/run_pylint_on_tests.py2
-rwxr-xr-xscripts/dev/run_vulture.py12
-rw-r--r--scripts/dev/standardpaths_tester.py2
-rw-r--r--scripts/keytester.py2
-rw-r--r--scripts/link_pyqt.py8
-rwxr-xr-xscripts/mkvenv.py16
-rw-r--r--scripts/opengl_info.py2
-rwxr-xr-xscripts/testbrowser/testbrowser_webengine.py6
-rwxr-xr-xscripts/testbrowser/testbrowser_webkit.py8
12 files changed, 37 insertions, 37 deletions
diff --git a/scripts/dev/build_pyqt_wheel.py b/scripts/dev/build_pyqt_wheel.py
index b63331341..36fc9cbe4 100644
--- a/scripts/dev/build_pyqt_wheel.py
+++ b/scripts/dev/build_pyqt_wheel.py
@@ -78,8 +78,8 @@ def main():
utils.print_title("Downloading wheels")
subprocess.run([sys.executable, '-m', 'pip', 'download',
- '--no-deps', '--only-binary', 'PyQt5,PyQtWebEngine',
- 'PyQt5', 'PyQtWebEngine'], check=True)
+ '--no-deps', '--only-binary', 'PyQt6,PyQtWebEngine',
+ 'PyQt6', 'PyQtWebEngine'], check=True)
utils.print_title("Patching wheels")
input_files = wheels_dir.glob('*.whl')
diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py
index a1c6646eb..b849bc666 100755
--- a/scripts/dev/build_release.py
+++ b/scripts/dev/build_release.py
@@ -226,7 +226,7 @@ def patch_mac_app():
plistlib.dump(plist_data, f)
# Replace some duplicate files by symlinks
- framework_path = os.path.join(app_path, 'Contents', 'MacOS', 'PyQt5',
+ framework_path = os.path.join(app_path, 'Contents', 'MacOS', 'PyQt6',
'Qt', 'lib', 'QtWebEngineCore.framework')
core_lib = os.path.join(framework_path, 'Versions', '5', 'QtWebEngineCore')
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py
index d8ed9974b..133735644 100644
--- a/scripts/dev/recompile_requirements.py
+++ b/scripts/dev/recompile_requirements.py
@@ -138,15 +138,15 @@ CHANGELOG_URLS = {
'cryptography': 'https://cryptography.io/en/latest/changelog.html',
'toml': 'https://github.com/uiri/toml/releases',
'tomli': 'https://github.com/hukkin/tomli/blob/master/CHANGELOG.md',
- 'PyQt5': 'https://www.riverbankcomputing.com/news',
- 'PyQt5-Qt': 'https://www.riverbankcomputing.com/news',
- 'PyQt5-Qt5': 'https://www.riverbankcomputing.com/news',
+ 'PyQt6': 'https://www.riverbankcomputing.com/news',
+ 'PyQt6-Qt': 'https://www.riverbankcomputing.com/news',
+ 'PyQt6-Qt5': 'https://www.riverbankcomputing.com/news',
'PyQtWebEngine': 'https://www.riverbankcomputing.com/news',
'PyQtWebEngine-Qt': 'https://www.riverbankcomputing.com/news',
'PyQtWebEngine-Qt5': 'https://www.riverbankcomputing.com/news',
'PyQt-builder': 'https://www.riverbankcomputing.com/news',
- 'PyQt5-sip': 'https://www.riverbankcomputing.com/news',
- 'PyQt5-stubs': 'https://github.com/stlehmann/PyQt5-stubs/blob/master/CHANGELOG.md',
+ 'PyQt6-sip': 'https://www.riverbankcomputing.com/news',
+ 'PyQt6-stubs': 'https://github.com/stlehmann/PyQt6-stubs/blob/master/CHANGELOG.md',
'sip': 'https://www.riverbankcomputing.com/news',
'Pygments': 'https://pygments.org/docs/changelog/',
'vulture': 'https://github.com/jendrikseipp/vulture/blob/master/CHANGELOG.md',
diff --git a/scripts/dev/run_pylint_on_tests.py b/scripts/dev/run_pylint_on_tests.py
index d0385bd17..657f6ca33 100644
--- a/scripts/dev/run_pylint_on_tests.py
+++ b/scripts/dev/run_pylint_on_tests.py
@@ -70,7 +70,7 @@ def main():
args = [
'--disable={}'.format(','.join(disabled)),
- '--ignored-modules=helpers,pytest,PyQt5',
+ '--ignored-modules=helpers,pytest,PyQt6',
r'--ignore-long-lines=(<?https?://|^# Copyright 201\d)|^ *def [a-z]',
r'--method-rgx=[a-z_][A-Za-z0-9_]{1,100}$',
] + sys.argv[2:] + files
diff --git a/scripts/dev/run_vulture.py b/scripts/dev/run_vulture.py
index 1f0018488..519b431b0 100755
--- a/scripts/dev/run_vulture.py
+++ b/scripts/dev/run_vulture.py
@@ -64,11 +64,11 @@ def whitelist_generator(): # noqa: C901
yield 'qutebrowser.misc.guiprocess.GUIProcess.stderr'
# Qt attributes
- yield 'PyQt5.QtWebKit.QWebPage.ErrorPageExtensionReturn().baseUrl'
- yield 'PyQt5.QtWebKit.QWebPage.ErrorPageExtensionReturn().content'
- yield 'PyQt5.QtWebKit.QWebPage.ErrorPageExtensionReturn().encoding'
- yield 'PyQt5.QtWebKit.QWebPage.ErrorPageExtensionReturn().fileNames'
- yield 'PyQt5.QtWidgets.QStyleOptionViewItem.backgroundColor'
+ yield 'PyQt6.QtWebKit.QWebPage.ErrorPageExtensionReturn().baseUrl'
+ yield 'PyQt6.QtWebKit.QWebPage.ErrorPageExtensionReturn().content'
+ yield 'PyQt6.QtWebKit.QWebPage.ErrorPageExtensionReturn().encoding'
+ yield 'PyQt6.QtWebKit.QWebPage.ErrorPageExtensionReturn().fileNames'
+ yield 'PyQt6.QtWidgets.QStyleOptionViewItem.backgroundColor'
## qute://... handlers
for name in qutescheme._HANDLERS: # pylint: disable=protected-access
@@ -86,7 +86,7 @@ def whitelist_generator(): # noqa: C901
yield 'propagate' # logging.getLogger('...).propagate = False
# vulture doesn't notice the hasattr() and thus thinks netrc_used is unused
# in NetworkManager.on_authentication_required
- yield 'PyQt5.QtNetwork.QNetworkReply.netrc_used'
+ yield 'PyQt6.QtNetwork.QNetworkReply.netrc_used'
yield 'qutebrowser.browser.downloads.last_used_directory'
yield 'PaintContext.clip' # from completiondelegate.py
yield 'logging.LogRecord.log_color' # from logging.py
diff --git a/scripts/dev/standardpaths_tester.py b/scripts/dev/standardpaths_tester.py
index 03de7f887..4ec2e1560 100644
--- a/scripts/dev/standardpaths_tester.py
+++ b/scripts/dev/standardpaths_tester.py
@@ -23,7 +23,7 @@
import os
import sys
-from PyQt5.QtCore import (QT_VERSION_STR, PYQT_VERSION_STR, qVersion,
+from PyQt6.QtCore import (QT_VERSION_STR, PYQT_VERSION_STR, qVersion,
QStandardPaths, QCoreApplication)
diff --git a/scripts/keytester.py b/scripts/keytester.py
index bc9a22263..b1e1713ac 100644
--- a/scripts/keytester.py
+++ b/scripts/keytester.py
@@ -23,7 +23,7 @@
Use python3 -m scripts.keytester to launch it.
"""
-from PyQt5.QtWidgets import QApplication
+from PyQt6.QtWidgets import QApplication
from qutebrowser.misc import miscwidgets
diff --git a/scripts/link_pyqt.py b/scripts/link_pyqt.py
index 158cc145d..e2cbddd74 100644
--- a/scripts/link_pyqt.py
+++ b/scripts/link_pyqt.py
@@ -134,16 +134,16 @@ def link_pyqt(executable, venv_path):
venv_path: The path to the virtualenv site-packages.
"""
try:
- get_lib_path(executable, 'PyQt5.sip')
+ get_lib_path(executable, 'PyQt6.sip')
except Error:
- # There is no PyQt5.sip, so we need to copy the toplevel sip.
+ # There is no PyQt6.sip, so we need to copy the toplevel sip.
sip_file = get_lib_path(executable, 'sip')
else:
- # There is a PyQt5.sip, it'll get copied with the PyQt5 dir.
+ # There is a PyQt6.sip, it'll get copied with the PyQt6 dir.
sip_file = None
sipconfig_file = get_lib_path(executable, 'sipconfig', required=False)
- pyqt_dir = os.path.dirname(get_lib_path(executable, 'PyQt5.QtCore'))
+ pyqt_dir = os.path.dirname(get_lib_path(executable, 'PyQt6.QtCore'))
for path in [sip_file, sipconfig_file, pyqt_dir]:
if path is None:
diff --git a/scripts/mkvenv.py b/scripts/mkvenv.py
index 7f6920bb8..e4e7b1cef 100755
--- a/scripts/mkvenv.py
+++ b/scripts/mkvenv.py
@@ -232,25 +232,25 @@ def install_pyqt_binary(venv_dir: pathlib.Path, version: str) -> None:
'darwin': {'x86_64'},
}
if sys.platform not in supported_archs:
- utils.print_error(f"{sys.platform} is not a supported platform by PyQt5 binary "
+ utils.print_error(f"{sys.platform} is not a supported platform by PyQt6 binary "
"packages, this will most likely fail.")
elif platform.machine() not in supported_archs[sys.platform]:
utils.print_error(
- f"{platform.machine()} is not a supported architecture for PyQt5 binaries "
+ f"{platform.machine()} is not a supported architecture for PyQt6 binaries "
f"on {sys.platform}, this will most likely fail.")
elif sys.platform == 'linux' and platform.libc_ver()[0] != 'glibc':
- utils.print_error("Non-glibc Linux is not a supported platform for PyQt5 "
+ utils.print_error("Non-glibc Linux is not a supported platform for PyQt6 "
"binaries, this will most likely fail.")
pip_install(venv_dir, '-r', pyqt_requirements_file(version),
- '--only-binary', 'PyQt5,PyQtWebEngine')
+ '--only-binary', 'PyQt6,PyQtWebEngine')
def install_pyqt_source(venv_dir: pathlib.Path, version: str) -> None:
"""Install PyQt from the source tarball."""
utils.print_title("Installing PyQt from sources")
pip_install(venv_dir, '-r', pyqt_requirements_file(version),
- '--verbose', '--no-binary', 'PyQt5,PyQtWebEngine')
+ '--verbose', '--no-binary', 'PyQt6,PyQtWebEngine')
def install_pyqt_link(venv_dir: pathlib.Path) -> None:
@@ -317,7 +317,7 @@ def apply_xcb_util_workaround(
libxcb_util_path = pathlib.Path(libxcb_util_libs[0])
code = [
- 'from PyQt5.QtCore import QLibraryInfo',
+ 'from PyQt6.QtCore import QLibraryInfo',
'print(QLibraryInfo.location(QLibraryInfo.LibrariesPath))',
]
proc = run_venv(venv_dir, 'python', '-c', '; '.join(code), capture_output=True)
@@ -371,8 +371,8 @@ def run_qt_smoke_test(venv_dir: pathlib.Path) -> None:
utils.print_title("Running Qt smoke test")
code = [
'import sys',
- 'from PyQt5.QtWidgets import QApplication',
- 'from PyQt5.QtCore import qVersion, QT_VERSION_STR, PYQT_VERSION_STR',
+ 'from PyQt6.QtWidgets import QApplication',
+ 'from PyQt6.QtCore import qVersion, QT_VERSION_STR, PYQT_VERSION_STR',
'print(f"Python: {sys.version}")',
'print(f"qVersion: {qVersion()}")',
'print(f"QT_VERSION_STR: {QT_VERSION_STR}")',
diff --git a/scripts/opengl_info.py b/scripts/opengl_info.py
index 1bfdf22aa..bfd57ef8d 100644
--- a/scripts/opengl_info.py
+++ b/scripts/opengl_info.py
@@ -20,7 +20,7 @@
"""Show information about the OpenGL setup."""
-from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile,
+from PyQt6.QtGui import (QOpenGLContext, QOpenGLVersionProfile,
QOffscreenSurface, QGuiApplication)
app = QGuiApplication([])
diff --git a/scripts/testbrowser/testbrowser_webengine.py b/scripts/testbrowser/testbrowser_webengine.py
index 73fa6828e..16c9739cb 100755
--- a/scripts/testbrowser/testbrowser_webengine.py
+++ b/scripts/testbrowser/testbrowser_webengine.py
@@ -23,9 +23,9 @@
import sys
import argparse
-from PyQt5.QtCore import QUrl
-from PyQt5.QtWidgets import QApplication
-from PyQt5.QtWebEngineWidgets import QWebEngineView
+from PyQt6.QtCore import QUrl
+from PyQt6.QtWidgets import QApplication
+from PyQt6.QtWebEngineWidgets import QWebEngineView
def parse_args():
diff --git a/scripts/testbrowser/testbrowser_webkit.py b/scripts/testbrowser/testbrowser_webkit.py
index 40938d06b..c148c76f1 100755
--- a/scripts/testbrowser/testbrowser_webkit.py
+++ b/scripts/testbrowser/testbrowser_webkit.py
@@ -23,10 +23,10 @@
import sys
import argparse
-from PyQt5.QtCore import QUrl
-from PyQt5.QtWidgets import QApplication
-from PyQt5.QtWebKit import QWebSettings
-from PyQt5.QtWebKitWidgets import QWebView
+from PyQt6.QtCore import QUrl
+from PyQt6.QtWidgets import QApplication
+from PyQt6.QtWebKit import QWebSettings
+from PyQt6.QtWebKitWidgets import QWebView
def parse_args():