8000 Merge pull request #1194 from stonebig/master · Tmusvit/winpython@0bb0d61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0bb0d61

Browse files
authored
Merge pull request winpython#1194 from stonebig/master
vendoring QtPy-2.3.0
2 parent
10000
s 7c886d6 + f920589 commit 0bb0d61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1468
-750
lines changed

winpython/_vendor/qtpy/Qsci.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -----------------------------------------------------------------------------
2+
# Copyright © 2009- The Spyder Development Team
3+
#
4+
# Licensed under the terms of the MIT License
5+
# (see LICENSE.txt for details)
6+
# -----------------------------------------------------------------------------
7+
8+
"""Provides Qsci classes and functions."""
9+
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtBindingMissingModuleError,
16+
QtModuleNotInstalledError
17+
)
18+
19+
if PYQT5:
20+
try:
21+
from PyQt5.Qsci import *
22+
except ModuleNotFoundError as error:
23+
raise QtModuleNotInstalledError(
24+
name='Qsci', missing_package='QScintilla'
25+
) from error
26+
elif PYQT6:
27+
try:
28+
from PyQt6.Qsci import *
29+
except ModuleNotFoundError as error:
30+
raise QtModuleNotInstalledError(
31+
name='Qsci', missing_package='PyQt6-QScintilla'
32+
) from error
33+
elif PYSIDE2:
34+
raise QtBindingMissingModuleError(name='Qsci')
35+
elif PYSIDE6:
36+
raise QtBindingMissingModuleError(name='Qsci')

winpython/_vendor/qtpy/Qt3DAnimation.py

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,42 @@
44
# Licensed under the terms of the MIT License
55
# (see LICENSE.txt for details)
66
# -----------------------------------------------------------------------------
7+
78
"""Provides Qt3DAnimation classes and functions."""
89

9-
# Local imports
10-
from . import PYQT5, PYSIDE2, PythonQtError, PYSIDE_VERSION
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtModuleNotInstalledError,
16+
)
1117

1218
if PYQT5:
13-
from PyQt5.Qt3DAnimation import *
19+
try:
20+
from PyQt5.Qt3DAnimation import *
21+
except ModuleNotFoundError as error:
22+
raise QtModuleNotInstalledError(
23+
name='Qt3DAnimation', missing_package='PyQt3D'
24+
) from error
25+
elif PYQT6:
26+
try:
27+
from PyQt6.Qt3DAnimation import *
28+
except ModuleNotFoundError as error:
29+
raise QtModuleNotInstalledError(
30+
name='Qt3DAnimation', missing_package='PyQt6-3D'
31+
) from error
1432
elif PYSIDE2:
1533
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
1634
import PySide2.Qt3DAnimation as __temp
1735
import inspect
36+
37+
for __name in inspect.getmembers(__temp.Qt3DAnimation):
38+
globals()[__name[0]] = __name[1]
39+
elif PYSIDE6:
40+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
41+
import PySide6.Qt3DAnimation as __temp
42+
import inspect
43+
1844
for __name in inspect.getmembers(__temp.Qt3DAnimation):
1945
globals()[__name[0]] = __name[1]
20-
else:
21-
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/Qt3DCore.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@
44
# Licensed under the terms of the MIT License
55
# (see LICENSE.txt for details)
66
# -----------------------------------------------------------------------------
7+
78
"""Provides Qt3DCore classes and functions."""
89

9-
# Local imports
10-
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtModuleNotInstalledError,
16+
)
1117

1218
if PYQT5:
13-
from PyQt5.Qt3DCore import *
19+
try:
20+
from PyQt5.Qt3DCore import *
21+
except ModuleNotFoundError as error:
22+
raise QtModuleNotInstalledError(
23+
name='Qt3DCore', missing_package='PyQt3D'
24+
) from error
1425
elif PYQT6:
15-
from PyQt6.Qt3DCore import *
16-
elif PYSIDE6:
17-
from PySide6.Qt3DCore.Qt3DCore import *
26+
try:
27+
from PyQt6.Qt3DCore import *
28+
except ModuleNotFoundError as error:
29+
raise QtModuleNotInstalledError(
30+
name='Qt3DCore', missing_package='PyQt6-3D'
31+
) from error
1832
elif PYSIDE2:
1933
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
2034
import PySide2.Qt3DCore as __temp
2135
import inspect
36+
37+
for __name in inspect.getmembers(__temp.Qt3DCore):
38+
globals()[__name[0]] = __name[1]
39+
elif PYSIDE6:
40+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
41+
import PySide6.Qt3DCore as __temp
42+
import inspect
43+
2244
for __name in inspect.getmembers(__temp.Qt3DCore):
2345
globals()[__name[0]] = __name[1]
24-
else:
25-
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/Qt3DExtras.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@
44
# Licensed under the terms of the MIT License
55
# (see LICENSE.txt for details)
66
# -----------------------------------------------------------------------------
7+
78
"""Provides Qt3DExtras classes and functions."""
89

9-
# Local imports
10-
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtModuleNotInstalledError,
16+
)
1117

1218
if PYQT5:
13-
from PyQt5.Qt3DExtras import *
19+
try:
20+
from PyQt5.Qt3DExtras import *
21+
except ModuleNotFoundError as error:
22+
raise QtModuleNotInstalledError(
23+
name='Qt3DExtras', missing_package='PyQt3D'
24+
) from error
1425
elif PYQT6:
15-
from PyQt6.Qt3DExtras import *
16-
elif PYSIDE6:
17-
from PySide6.Qt3DExtras.Qt3DExtras import *
26+
try:
27+
from PyQt6.Qt3DExtras import *
28+
except ModuleNotFoundError as error:
29+
raise QtModuleNotInstalledError(
30+
name='Qt3DExtras', missing_package='PyQt6-3D'
31+
) from error
1832
elif PYSIDE2:
1933
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
2034
import PySide2.Qt3DExtras as __temp
2135
import inspect
36+
37+
for __name in inspect.getmembers(__temp.Qt3DExtras):
38+
globals()[__name[0]] = __name[1]
39+
elif PYSIDE6:
40+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
41+
import PySide6.Qt3DExtras as __temp
42+
import inspect
43+
2244
for __name in inspect.getmembers(__temp.Qt3DExtras):
2345
globals()[__name[0]] = __name[1]
24-
else:
25-
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/Qt3DInput.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@
44
# Licensed under the terms of the MIT License
55
# (see LICENSE.txt for details)
66
# -----------------------------------------------------------------------------
7+
78
"""Provides Qt3DInput classes and functions."""
89

9-
# Local imports
10-
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtModuleNotInstalledError,
16+
)
1117

1218
if PYQT5:
13-
from PyQt5.Qt3DInput import *
19+
try:
20+
from PyQt5.Qt3DInput import *
21+
except ModuleNotFoundError as error:
22+
raise QtModuleNotInstalledError(
23+
name='Qt3DInput', missing_package='PyQt3D'
24+
) from error
1425
elif PYQT6:
15-
from PyQt6.Qt3DInput import *
16-
elif PYSIDE6:
17-
from PySide6.Qt3DInput.Qt3DInput import *
26+
try:
27+
from PyQt6.Qt3DInput import *
28+
except ModuleNotFoundError as error:
29+
raise QtModuleNotInstalledError(
30+
name='Qt3DInput', missing_package='PyQt6-3D'
31+
) from error
1832
elif PYSIDE2:
1933
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
2034
import PySide2.Qt3DInput as __temp
2135
import inspect
36+
37+
for __name in inspect.getmembers(__temp.Qt3DInput):
38+
globals()[__name[0]] = __name[1]
39+
elif PYSIDE6:
40+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
41+
import PySide6.Qt3DInput as __temp
42+
import inspect
43+
2244
for __name in inspect.getmembers(__temp.Qt3DInput):
2345
globals()[__name[0]] = __name[1]
24-
else:
25-
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/Qt3DLogic.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@
44
# Licensed under the terms of the MIT License
55
# (see LICENSE.txt for details)
66
# -----------------------------------------------------------------------------
7+
78
"""Provides Qt3DLogic classes and functions."""
89

9-
# Local imports
10-
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtModuleNotInstalledError,
16+
)
1117

1218
if PYQT5:
13-
from PyQt5.Qt3DLogic import *
19+
try:
20+
from PyQt5.Qt3DLogic import *
21+
except ModuleNotFoundError as error:
22+
raise QtModuleNotInstalledError(
23+
name='Qt3DLogic', missing_package='PyQt3D'
24+
) from error
1425
elif PYQT6:
15-
from PyQt6.Qt3DLogic import *
16-
elif PYSIDE6:
17-
from PySide6.Qt3DLogic.Qt3DLogic import *
26+
try:
27+
from PyQt6.Qt3DLogic import *
28+
except ModuleNotFoundError as error:
29+
raise QtModuleNotInstalledError(
30+
name='Qt3DLogic', missing_package='PyQt6-3D'
31+
) from error
1832
elif PYSIDE2:
1933
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
2034
import PySide2.Qt3DLogic as __temp
2135
import inspect
36+
37+
for __name in inspect.getmembers(__temp.Qt3DLogic):
38+
globals()[__name[0]] = __name[1]
39+
elif PYSIDE6:
40+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
41+
import PySide6.Qt3DLogic as __temp
42+
import inspect
43+
2244
for __name in inspect.getmembers(__temp.Qt3DLogic):
2345
globals()[__name[0]] = __name[1]
24-
else:
25-
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/Qt3DRender.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@
44
# Licensed under the terms of the MIT License
55
# (see LICENSE.txt for details)
66
# -----------------------------------------------------------------------------
7+
78
"""Provides Qt3DRender classes and functions."""
89

9-
# Local imports
10-
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtModuleNotInstalledError,
16+
)
1117

1218
if PYQT5:
13-
from PyQt5.Qt3DRender import *
14-
elif PYSIDE6:
15-
from PySide6.Qt3DRender.Qt3DRender import *
19+
try:
20+
from PyQt5.Qt3DRender import *
21+
except ModuleNotFoundError as error:
22+
raise QtModuleNotInstalledError(
23+
name='Qt3DRender', missing_package='PyQt3D'
24+
) from error
1625
elif PYQT6:
17-
from PyQt6.Qt3DRender import *
26+
try:
27+
from PyQt6.Qt3DRender import *
28+
except ModuleNotFoundError as error:
29+
raise QtModuleNotInstalledError(
30+
name='Qt3DRender', missing_package='PyQt6-3D'
31+
) from error
1832
elif PYSIDE2:
1933
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
2034
import PySide2.Qt3DRender as __temp
2135
import inspect
36+
37+
for __name in inspect.getmembers(__temp.Qt3DRender):
38+
globals()[__name[0]] = __name[1]
39+
elif PYSIDE6:
40+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
41+
import PySide6.Qt3DRender as __temp
42+
import inspect
43+
2244
for __name in inspect.getmembers(__temp.Qt3DRender):
2345
globals()[__name[0]] = __name[1]
24-
else:
25-
raise PythonQtError('No Qt bindings could be found')
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# -----------------------------------------------------------------------------
2+
# Copyright © 2009- The Spyder Development Team
3+
#
4+
# Licensed under the terms of the MIT License
5+
# (see LICENSE.txt for details)
6+
# -----------------------------------------------------------------------------
7+
8+
"""Provides QtAxContainer classes and functions."""
9+
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtBindingMissingModuleError,
16+
)
17+
18+
if PYQT5:
19+
raise QtBindingMissingModuleError(name='QtAxContainer')
20+
elif PYQT6:
21+
raise QtBindingMissingModuleError(name='QtAxContainer')
22+
elif PYSIDE2:
23+
from PySide2.QtAxContainer import *
24+
elif PYSIDE6:
25+
from PySide6.QtAxContainer import *

winpython/_vendor/qtpy/QtBluetooth.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# -----------------------------------------------------------------------------
2+
# Copyright © 2009- The Spyder Development Team
3+
#
4+
# Licensed under the terms of the MIT License
5+
# (see LICENSE.txt for details)
6+
# -----------------------------------------------------------------------------
7+
8+
"""Provides QtBluetooth classes and functions."""
9+
10+
from . import (
11+
PYQT5,
12+
PYQT6,
13+
PYSIDE2,
14+
PYSIDE6,
15+
QtBindingMissingModuleError,
16+
)
17+
18+
if PYQT5:
19+
from PyQt5.QtBluetooth import *
20+
elif PYQT6:
21+
from PyQt6.QtBluetooth import *
22+
elif PYSIDE2:
23+
raise QtBindingMissingModuleError(name='QtBluetooth')
24+
elif PYSIDE6:
25+
from PySide6.QtBluetooth import *

0 commit comments

Comments
 (0)
0