Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b77a613

Browse filesBrowse files
committed
MNT: remove commented out code
1 parent 491528a commit b77a613
Copy full SHA for b77a613

File tree

Expand file treeCollapse file tree

1 file changed

+0
-55
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-55
lines changed

‎lib/matplotlib/backends/qt_compat.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_compat.py
-55Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -255,58 +255,3 @@ def handle(*args):
255255
signal.signal(signal.SIGINT, old_sigint_handler)
256256
if handler_args is not None:
257257
old_sigint_handler(*handler_args)
258-
259-
# class _maybe_allow_interrupt:
260-
#
261-
# def __init__(self, qt_object):
262-
# self.interrupted_qobject = qt_object
263-
# self.old_fd = None
264-
# self.caught_args = None
265-
#
266-
# self.skip = False
267-
# self.old_sigint_handler = signal.getsignal(signal.SIGINT)
268-
# if self.old_sigint_handler in (None, signal.SIG_IGN, signal.SIG_DFL):
269-
# self.skip = True
270-
# return
271-
#
272-
# QAS = QtNetwork.QAbstractSocket
273-
# self.qt_socket = QAS(QAS.TcpSocket, qt_object)
274-
# # Create a socket pair
275-
# self.wsock, self.rsock = socket.socketpair()
276-
# # Let Qt listen on the one end
277-
# self.qt_socket.setSocketDescriptor(self.rsock.fileno())
278-
# self.wsock.setblocking(False)
279-
# self.qt_socket.readyRead.connect(self._readSignal)
280-
#
281-
# def __enter__(self):
282-
# if self.skip:
283-
# return
284-
#
285-
# signal.signal(signal.SIGINT, self._handle)
286-
# # And let Python write on the other end
287-
# self.old_fd = signal.set_wakeup_fd(self.wsock.fileno())
288-
#
289-
# def __exit__(self, type, val, traceback):
290-
# if self.skip:
291-
# return
292-
#
293-
# signal.set_wakeup_fd(self.old_fd)
294-
# signal.signal(signal.SIGINT, self.old_sigint_handler)
295-
#
296-
# self.wsock.close()
297-
# self.rsock.close()
298-
# self.qt_socket.abort()
299-
# if self.caught_args is not None:
300-
# self.old_sigint_handler(*self.caught_args)
301-
#
302-
# def _readSignal(self):
303-
# # Read the written byte to re-arm the socket if a signal different
304-
# # from SIGINT was caught.
305-
# # Since a custom handler was installed for SIGINT, KeyboardInterrupt
306-
# # is not raised here.
307-
# self.qt_socket.readData(1)
308-
#
309-
# def _handle(self, *args):
310-
# self.caught_args = args # save the caught args to call the old
311-
# # SIGINT handler afterwards
312-
# self.interrupted_qobject.quit()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.