aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 16:11:52 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 16:12:04 +0000
commit25180730194bec25f915f32ab846ea583fb1493f (patch)
tree9a73e0336ecf21e085d99d6a651c5547b9eb99f8 /tools
parent6e3e7b9ca0548430aaa5e2555d6e02c64625fa3f (diff)
Rename PySide2 to PySide6
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/create_changelog.py22
-rw-r--r--tools/debug_windows.py10
-rw-r--r--tools/dump_metaobject.py2
-rw-r--r--tools/metaobject_dump.py2
-rw-r--r--tools/missing_bindings-requirements.txt2
-rw-r--r--tools/missing_bindings.py12
-rw-r--r--tools/qtpy2cpp_lib/formatter.py4
-rw-r--r--tools/qtpy2cpp_lib/test_baseline/uic.py6
8 files changed, 30 insertions, 30 deletions
diff --git a/tools/create_changelog.py b/tools/create_changelog.py
index 30679ecf3..914b87cc1 100644
--- a/tools/create_changelog.py
+++ b/tools/create_changelog.py
@@ -59,7 +59,7 @@ Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
-* PySide2 *
+* PySide6 *
****************************************************************************
"""
@@ -75,7 +75,7 @@ def parse_options() -> Namespace:
" v5.12.0..v5.12.1\n"
" cebc32a5..5.12")
- options = ArgumentParser(description="PySide2 changelog tool",
+ options = ArgumentParser(description="PySide6 changelog tool",
formatter_class=RawTextHelpFormatter)
options.add_argument("-d",
"--directory",
@@ -178,8 +178,8 @@ def git_command(versions: List[str], pattern: str):
if sha not in shiboken6_commits:
shiboken6_commits[sha] = entry
else:
- if sha not in pyside2_commits:
- pyside2_commits[sha] = entry
+ if sha not in pyside6_commits:
+ pyside6_commits[sha] = entry
def create_fixes_log(versions: List[str]) -> None:
@@ -221,7 +221,7 @@ def create_change_log(versions: List[str]) -> None:
if change_log[0].startswith('shiboken'):
shiboken6_changelogs.extend(change_log[1])
else:
- pyside2_changelogs.extend(change_log[1])
+ pyside6_changelogs.extend(change_log[1])
def gen_list(d: Dict[str, Dict[str, str]]) -> str:
@@ -238,9 +238,9 @@ def sort_dict(d: Dict[str, Dict[str, str]]) -> Dict[str, Dict[str, str]]:
if __name__ == "__main__":
args = parse_options()
- pyside2_commits: Dict[str, Dict[str, str]] = {}
+ pyside6_commits: Dict[str, Dict[str, str]] = {}
shiboken6_commits: Dict[str, Dict[str, str]] = {}
- pyside2_changelogs: List[str] = []
+ pyside6_changelogs: List[str] = []
shiboken6_changelogs: List[str] = []
# Getting commits information
@@ -253,15 +253,15 @@ if __name__ == "__main__":
create_change_log(versions)
# Sort commits
- pyside2_commits = sort_dict(pyside2_commits)
+ pyside6_commits = sort_dict(pyside6_commits)
shiboken6_commits = sort_dict(shiboken6_commits)
# Generate message
print(content_header.replace("@VERSION", args.release).
replace("@TYPE", args.type))
- print('\n'.join(pyside2_changelogs))
- print(gen_list(pyside2_commits))
- if not pyside2_changelogs and not pyside2_commits:
+ print('\n'.join(pyside6_changelogs))
+ print(gen_list(pyside6_commits))
+ if not pyside6_changelogs and not pyside6_commits:
print(" - No changes")
print(shiboken_header)
print('\n'.join(shiboken6_changelogs))
diff --git a/tools/debug_windows.py b/tools/debug_windows.py
index dbde5f534..73696a379 100644
--- a/tools/debug_windows.py
+++ b/tools/debug_windows.py
@@ -39,15 +39,15 @@
"""
This is a troubleshooting script that assists finding out which DLLs or
-which symbols in a DLL are missing when executing a PySide2 python
+which symbols in a DLL are missing when executing a PySide6 python
script.
It can also be used with any other non Python executable.
Usage: python debug_windows.py
When no arguments are given the script will try to import
- PySide2.QtCore.
+ PySide6.QtCore.
-Usage: python debug_windows.py python -c "import PySide2.QtWebEngine"
+Usage: python debug_windows.py python -c "import PySide6.QtWebEngine"
python debug_windows.py my_executable.exe arg1 arg2 --arg3=4
Any arguments given after the script name will be considered
as the target executable and the arguments passed to that
@@ -338,8 +338,8 @@ def test_run_import_qt_core_under_cdb_with_gflags():
# The 2+2 is just ensure that Python itself works.
python_code = """
print(">>>>>>>>>>>>>>>>>>>>>>> Test computation of 2+2 is: {}".format(2+2))
-import PySide2.QtCore
-print(">>>>>>>>>>>>>>>>>>>>>>> QtCore object instance: {}".format(PySide2.QtCore))
+import PySide6.QtCore
+print(">>>>>>>>>>>>>>>>>>>>>>> QtCore object instance: {}".format(PySide6.QtCore))
"""
call_command_under_cdb_with_gflags(sys.executable, ["-c", python_code])
diff --git a/tools/dump_metaobject.py b/tools/dump_metaobject.py
index 873d90e65..96acc189c 100644
--- a/tools/dump_metaobject.py
+++ b/tools/dump_metaobject.py
@@ -39,7 +39,7 @@
"""Helper functions for formatting information on QMetaObject"""
-from PySide2.QtCore import (QMetaClassInfo, QMetaEnum, QMetaMethod,
+from PySide6.QtCore import (QMetaClassInfo, QMetaEnum, QMetaMethod,
QMetaProperty, QMetaObject, QObject)
diff --git a/tools/metaobject_dump.py b/tools/metaobject_dump.py
index 6c7a9f7df..db61ccc4b 100644
--- a/tools/metaobject_dump.py
+++ b/tools/metaobject_dump.py
@@ -41,7 +41,7 @@ import sys
from dump_metaobject import dump_metaobject
# Import all widget classes to enable instantiating them by type name
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
DESC = """
diff --git a/tools/missing_bindings-requirements.txt b/tools/missing_bindings-requirements.txt
index 4ddb60aa8..bbe8e7ac2 100644
--- a/tools/missing_bindings-requirements.txt
+++ b/tools/missing_bindings-requirements.txt
@@ -1,4 +1,4 @@
-pyside2
+pyside6
pyqt5
beautifulsoup4
pyqt3d
diff --git a/tools/missing_bindings.py b/tools/missing_bindings.py
index 33a296832..8e5960029 100644
--- a/tools/missing_bindings.py
+++ b/tools/missing_bindings.py
@@ -38,14 +38,14 @@
#############################################################################
# This script is used to generate a summary of missing types / classes
-# which are present in C++ Qt5, but are missing in PySide2.
+# which are present in C++ Qt5, but are missing in PySide6.
#
# Required packages: bs4
# Installed via: pip install bs4
#
# The script uses beautiful soup 4 to parse out the class names from
# the online Qt documentation. It then tries to import the types from
-# PySide2.
+# PySide6.
#
# Example invocation of script:
# python missing_bindings.py --qt-version 5.9 -w all
@@ -272,7 +272,7 @@ if hasattr(args, "module") and args.module != 'all':
modules_to_test.clear()
modules_to_test[args.module] = saved_value
-pyside_package_name = "PySide2"
+pyside_package_name = "PySide6"
pyqt_package_name = "PyQt5"
total_missing_types_count = 0
@@ -315,13 +315,13 @@ def log(*pargs, **kw):
print(computed_str, file=wiki_file)
-log('PySide2 bindings for Qt {}'.format(args.version), style='heading1')
+log('PySide6 bindings for Qt {}'.format(args.version), style='heading1')
log("""Using Qt version {} documentation to find public API Qt types and test
-if the types are present in the PySide2 package.""".format(args.version))
+if the types are present in the PySide6 package.""".format(args.version))
log("""Results are usually stored at
-https://wiki.qt.io/PySide2_Missing_Bindings
+https://wiki.qt.io/PySide6_Missing_Bindings
so consider taking the contents of the generated
missing_bindings_for_wiki_qt_io.txt file and updating the linked wiki page.""",
style='end')
diff --git a/tools/qtpy2cpp_lib/formatter.py b/tools/qtpy2cpp_lib/formatter.py
index 81a920bbc..a1e8c69db 100644
--- a/tools/qtpy2cpp_lib/formatter.py
+++ b/tools/qtpy2cpp_lib/formatter.py
@@ -184,8 +184,8 @@ def write_import(file, i_node):
def write_import_from(file, i_node):
"""Print an import from Qt classes as #include sequence"""
- # "from PySide2.QtGui import QGuiApplication" or
- # "from PySide2 import QtGui"
+ # "from PySide6.QtGui import QGuiApplication" or
+ # "from PySide6 import QtGui"
mod = i_node.module
if not mod.startswith('PySide') and not mod.startswith('PyQt'):
return
diff --git a/tools/qtpy2cpp_lib/test_baseline/uic.py b/tools/qtpy2cpp_lib/test_baseline/uic.py
index fe97c7825..73e3ca540 100644
--- a/tools/qtpy2cpp_lib/test_baseline/uic.py
+++ b/tools/qtpy2cpp_lib/test_baseline/uic.py
@@ -27,12 +27,12 @@
##
#############################################################################
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+from PySide6.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QFont,
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
class Ui_ImageDialog(object):
def setupUi(self, dialog):