QFlags DeprecationWarning under Python 3.8
pjnagel opened this issue · 1 comments
pjnagel commented
The following code prints out DeprecationWarning: an integer is required (got type DockOptions). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python
when run under Python 3.8:
import sys
from PyQt5.QtWidgets import (
QApplication,
QMainWindow,
)
app = QApplication(sys.argv)
w = QMainWindow(dockOptions=QMainWindow.AllowNestedDocks | QMainWindow.AnimatedDocks)
w.show()
sys.exit(app.exec_())
The deprecation is explained in "What’s New In Python 3.8", Build and C API Changes, the bullet point about PyLong_AsLong
For reference, I was using PyQt5 5.13.1 installed as wheel from PyPi under Python3.8 from Ubuntu 19.10's stock apt repositories.
pjnagel commented
Ignore, I thought this was the issue tracker for upstream PyQt5