aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtQml/bug_825.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtQml/bug_825.py')
-rw-r--r--sources/pyside6/tests/QtQml/bug_825.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/sources/pyside6/tests/QtQml/bug_825.py b/sources/pyside6/tests/QtQml/bug_825.py
index 9771d0634..1d9b82d16 100644
--- a/sources/pyside6/tests/QtQml/bug_825.py
+++ b/sources/pyside6/tests/QtQml/bug_825.py
@@ -1,6 +1,11 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+"""
+This is the corrected version for Python 3.
+Unfortunately, this touches a Python 3.8 error that was fixed late.
+"""
+
import os
import sys
import unittest
@@ -25,9 +30,8 @@ class MetaA(type):
pass
-class A(object):
- __metaclass__ = MetaA
-
+class A(object, metaclass=MetaA):
+ pass
MetaB = type(QQuickPaintedItem)
B = QQuickPaintedItem
@@ -37,8 +41,8 @@ class MetaC(MetaA, MetaB):
pass
-class C(A, B):
- __metaclass__ = MetaC
+class C(A, B, metaclass=MetaC):
+ pass
class Bug825 (C):