Skip to content

Commit

Permalink
Merge pull request #1142 from nstelter-slac/pyside6_upgrade_pt_2
Browse files Browse the repository at this point in the history
MNT: Replace PyQt-specific sip library with wrapper provided by pyqt
  • Loading branch information
jbellister-slac authored Dec 20, 2024
2 parents 3fde371 + 996faaa commit 70f3fd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pydm/data_plugins/archiver_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Optional

from pydm.widgets.channel import PyDMChannel
from qtpy import sip
from qtpy.compat import isalive
from qtpy.QtCore import Slot, QObject, QUrl, QTimer
from qtpy.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
from pydm.data_plugins.plugin import PyDMPlugin, PyDMConnection
Expand Down Expand Up @@ -93,7 +93,7 @@ def fetch_data(self, from_date: float, to_date: float, processing_command: Optio
reply = self.network_manager.get(request)

def timeout():
if not isinstance(reply, QNetworkReply) or sip.isdeleted(reply):
if not isinstance(reply, QNetworkReply) or not isalive(reply):
return
reply.abort()

Expand Down
4 changes: 2 additions & 2 deletions pydm/data_plugins/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Optional, Callable

from ..utilities.remove_protocol import parsed_address
from qtpy import sip
from qtpy.compat import isalive
from qtpy.QtCore import Signal, QObject, Qt
from qtpy.QtWidgets import QApplication
from .. import config
Expand Down Expand Up @@ -318,6 +318,6 @@ def remove_connection(self, channel, destroying=False):
self.connections[connection_id].remove_listener(channel, destroying=destroying)
self.channels.remove(channel)
if self.connections[connection_id].listener_count < 1:
if not sip.isdeleted(self.connections[connection_id]):
if isalive(self.connections[connection_id]):
self.connections[connection_id].deleteLater()
del self.connections[connection_id]

0 comments on commit 70f3fd7

Please sign in to comment.