Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.11.1
-
None
-
Python 2.7.12
-
43451e3bc17467593df64cb73ce8c0bf9e60045f
Description
import socket from PySide2 import QtCore,QtWidgets app = QtWidgets.QApplication([]) w_sock, r_sock = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM) notifier = QtCore.QSocketNotifier(r_sock.fileno(), QtCore.QSocketNotifier.Read) # >>> AttributeError: 'int' object has no attribute 'fileno'
This is inconsistent with all other bindings and seems like a weird opinion to make in the PySide2 binding, to accept a socket object.
I think this is a bug and not a conscious design decision, please correct me if I am wrong however.