Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for python 3.13 #992

Open
almet opened this issue Nov 6, 2024 · 0 comments
Open

Add support for python 3.13 #992

almet opened this issue Nov 6, 2024 · 0 comments

Comments

@almet
Copy link
Contributor

almet commented Nov 6, 2024

Python 3.13 is available since Oct. 7, 2024. The reason we don't support it is because PySide6 didn't support it yet. They announced support for Python 3.13 will be added in Pyside6 6.8. .

But... I've been able to run it locally with the latest pyside6==6.8.0.1 release, so I wonder if we could get away with it:

> uv venv .venv -p python3.13
> uv pip install pyside6
Resolved 4 packages in 892ms
Prepared 4 packages in 38.00s
Installed 4 packages in 35ms
 + pyside6==6.8.0.2
 + pyside6-addons==6.8.0.2
 + pyside6-essentials==6.8.0.2
 + shiboken6==6.8.0.2
And then running a small UI from their doc, here if you want:

import sys
import random
from PySide6 import QtCore, QtWidgets, QtGui


class MyWidget(QtWidgets.QWidget):
    def __init__(self):
        super().__init__()

        self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]

        self.button = QtWidgets.QPushButton("Click me!")
        self.text = QtWidgets.QLabel("Hello World", alignment=QtCore.Qt.AlignCenter)

        self.layout = QtWidgets.QVBoxLayout(self)
        self.layout.addWidget(self.text)
        self.layout.addWidget(self.button)

        self.button.clicked.connect(self.magic)

    @QtCore.Slot()
    def magic(self):
        self.text.setText(random.choice(self.hello))


if __name__ == "__main__":
    app = QtWidgets.QApplication([])

    widget = MyWidget()
    widget.resize(800, 600)
    widget.show()

    sys.exit(app.exec())

We currently fallback on Pyside2 in our code, when PySide6 isn't installed, which should be the case on systems where Python is older than Python3.11. We would probably need to trick the debian and fedora package building scripts to replace the python 3.13 dep with something older.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant