From d1e436117d393b91e9ea716bb9f5c134e32261db Mon Sep 17 00:00:00 2001 From: Danilo Horta Date: Thu, 31 Oct 2024 15:41:06 +0000 Subject: [PATCH] =?UTF-8?q?Update=20net=5Fconnections=20method=20and=20bum?= =?UTF-8?q?p=20version=20to=200.14.6=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h3daemon/h3daemon/master.py | 6 +++--- h3daemon/h3daemon/worker.py | 6 +++--- h3daemon/pyproject.toml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/h3daemon/h3daemon/master.py b/h3daemon/h3daemon/master.py index 38e8587..d528a79 100644 --- a/h3daemon/h3daemon/master.py +++ b/h3daemon/h3daemon/master.py @@ -39,16 +39,16 @@ def is_running(self): return self._proc.is_running() def local_listening_ports(self): - connections = self._proc.connections(kind="tcp") + connections = self._proc.net_connections(kind="tcp") connections = [x for x in connections if x.status == "LISTEN"] return [x.laddr.port for x in connections if x.laddr.ip == "0.0.0.0"] def local_established_ports(self): - connections = self._proc.connections(kind="tcp") + connections = self._proc.net_connections(kind="tcp") connections = [x for x in connections if x.status == "ESTABLISHED"] return [x.laddr.port for x in connections if x.laddr.ip == "127.0.0.1"] def remote_established_ports(self): - connections = self._proc.connections(kind="tcp") + connections = self._proc.net_connections(kind="tcp") connections = [x for x in connections if x.status == "ESTABLISHED"] return [x.raddr.port for x in connections if x.raddr.ip == "127.0.0.1"] diff --git a/h3daemon/h3daemon/worker.py b/h3daemon/h3daemon/worker.py index 92ef062..90873f2 100644 --- a/h3daemon/h3daemon/worker.py +++ b/h3daemon/h3daemon/worker.py @@ -11,7 +11,7 @@ def has_connected(pid: int): try: - for x in psutil.Process(pid).connections(kind="tcp"): + for x in psutil.Process(pid).net_connections(kind="tcp"): if x.status == "ESTABLISHED": return True except RuntimeError: @@ -52,11 +52,11 @@ def is_running(self): return self._proc.is_running() def local_established_ports(self): - connections = self._proc.connections(kind="tcp") + connections = self._proc.net_connections(kind="tcp") connections = [x for x in connections if x.status == "ESTABLISHED"] return [x.laddr.port for x in connections if x.laddr.ip == "127.0.0.1"] def remote_established_ports(self): - connections = self._proc.connections(kind="tcp") + connections = self._proc.net_connections(kind="tcp") connections = [x for x in connections if x.status == "ESTABLISHED"] return [x.raddr.port for x in connections if x.raddr.ip == "127.0.0.1"] diff --git a/h3daemon/pyproject.toml b/h3daemon/pyproject.toml index dc2f00e..09ddcb7 100644 --- a/h3daemon/pyproject.toml +++ b/h3daemon/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "h3daemon" -version = "0.14.5" +version = "0.14.6" description = "HMMER server" authors = ["Danilo Horta "] license = "MIT" @@ -8,10 +8,10 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.9" -hmmer = "^3.4" -psutil = "^6.0" -python-daemon = "^3.0" +psutil = "^6.1.0" typer = "^0.12" +hmmer = "^3.4.0.0" +python-daemon = "^3.1.0" pidlockfile = "^0.3" [build-system]