You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2022/08/08 08:52:06 UTC

[phoenix-queryserver] branch master updated: PHOENIX-6762 Phoenix QueryServer cannot run correctly with python 3.8+

This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git


The following commit(s) were added to refs/heads/master by this push:
     new f7fd09d  PHOENIX-6762 Phoenix QueryServer cannot run correctly with python 3.8+
f7fd09d is described below

commit f7fd09d1b303d83f463a902ad7b0006c2d21bf85
Author: Istvan Toth <st...@apache.org>
AuthorDate: Mon Aug 8 07:31:43 2022 +0200

    PHOENIX-6762 Phoenix QueryServer cannot run correctly with python 3.8+
    
    backport https://pagure.io/python-daemon/c/b708912
---
 bin/daemon.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/daemon.py b/bin/daemon.py
index a548ec6..4cbb22f 100644
--- a/bin/daemon.py
+++ b/bin/daemon.py
@@ -38,6 +38,7 @@
 #
 # Apache Phoenix note: this file is `daemon.py` from the package
 # `python-daemon 2.0.5`, https://pypi.python.org/pypi/python-daemon/
+# Backported Python 3.8 fix in PHOENIX-6762
 #
 # The class `PidFile` was added for adapting the `lockfile` package's interface
 # without depending on yet another 3rd party package. Based on example from
@@ -727,9 +728,8 @@ def is_socket(fd):
         """
     result = False
 
-    file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW)
-
     try:
+        file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW)
         socket_type = file_socket.getsockopt(
                 socket.SOL_SOCKET, socket.SO_TYPE)
     except socket.error as exc: