forked from pool/python-thriftpy2
- Update to 0.5.3
* Move dependencies from setup.py to project.toml * fix tox config * fix flake8 error in local test * fix: sub module conflict error * Use SO_REUSEPORT only for AF_INET sockets * Make flake8 happy * Resolve daemon warnings for threading methods * Add GHA workflow to build wheels * Allow for omitted FieldID in Field definitions * Bump version to v0.5.3b1 * Requires Python3.7 * feat: optimize error output * fix: memory leak risk * Bump version 0.5.3b2 * Add experimental freethreading support * Bump version 0.5.3 - Drop 0001-Use-SO_REUSEPORT-only-for-AF_INET-sockets.patch, merged upstream - Update BuildRequires from pyproject.toml OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-thriftpy2?expand=0&rev=28
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
From 6590305637da64e0b1898bbb2ecd9700aef7c06b Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Wed, 26 Feb 2025 13:00:45 +0100
|
||||
Subject: [PATCH] Use SO_REUSEPORT only for AF_INET sockets
|
||||
|
||||
The latest python version changes the behavior, now if it's used with
|
||||
other kind of sockets (ex AF_UNIX) it raises OSError:
|
||||
|
||||
https://github.com/python/cpython/issues/128916
|
||||
---
|
||||
thriftpy2/contrib/aio/socket.py | 4 +++-
|
||||
thriftpy2/transport/socket.py | 4 +++-
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/thriftpy2/contrib/aio/socket.py b/thriftpy2/contrib/aio/socket.py
|
||||
index 8f4195a..28b0cc8 100644
|
||||
--- a/thriftpy2/contrib/aio/socket.py
|
||||
+++ b/thriftpy2/contrib/aio/socket.py
|
||||
@@ -281,7 +281,9 @@ class TAsyncServerSocket(object):
|
||||
_sock = socket.socket(self.socket_family, socket.SOCK_STREAM)
|
||||
|
||||
_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
- if hasattr(socket, "SO_REUSEPORT"):
|
||||
+ # valid socket https://github.com/python/cpython/issues/128916
|
||||
+ valid_family = (socket.AF_INET, socket.AF_INET6)
|
||||
+ if _sock.family in valid_family and hasattr(socket, "SO_REUSEPORT"):
|
||||
try:
|
||||
_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
||||
except socket.error as err:
|
||||
diff --git a/thriftpy2/transport/socket.py b/thriftpy2/transport/socket.py
|
||||
index edd78ab..b98b4c8 100644
|
||||
--- a/thriftpy2/transport/socket.py
|
||||
+++ b/thriftpy2/transport/socket.py
|
||||
@@ -201,7 +201,9 @@ class TServerSocket(object):
|
||||
_sock = socket.socket(self.socket_family, socket.SOCK_STREAM)
|
||||
|
||||
_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
- if hasattr(socket, "SO_REUSEPORT"):
|
||||
+ # valid socket https://github.com/python/cpython/issues/128916
|
||||
+ valid_family = (socket.AF_INET, socket.AF_INET6)
|
||||
+ if _sock.family in valid_family and hasattr(socket, "SO_REUSEPORT"):
|
||||
try:
|
||||
_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
||||
except socket.error as err:
|
||||
--
|
||||
2.48.0
|
||||
|
@@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 5 12:06:41 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 0.5.3
|
||||
* Move dependencies from setup.py to project.toml
|
||||
* fix tox config
|
||||
* fix flake8 error in local test
|
||||
* fix: sub module conflict error
|
||||
* Use SO_REUSEPORT only for AF_INET sockets
|
||||
* Make flake8 happy
|
||||
* Resolve daemon warnings for threading methods
|
||||
* Add GHA workflow to build wheels
|
||||
* Allow for omitted FieldID in Field definitions
|
||||
* Bump version to v0.5.3b1
|
||||
* Requires Python3.7
|
||||
* feat: optimize error output
|
||||
* fix: memory leak risk
|
||||
* Bump version 0.5.3b2
|
||||
* Add experimental freethreading support
|
||||
* Bump version 0.5.3
|
||||
- Drop 0001-Use-SO_REUSEPORT-only-for-AF_INET-sockets.patch, merged upstream
|
||||
- Update BuildRequires from pyproject.toml
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 26 11:05:48 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
@@ -18,15 +18,13 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-thriftpy2
|
||||
Version: 0.5.2
|
||||
Version: 0.5.3
|
||||
Release: 0
|
||||
Summary: Pure python implementation of Apache Thrift
|
||||
License: MIT
|
||||
URL: https://github.com/Thriftpy/thriftpy2
|
||||
Source0: https://github.com/Thriftpy/thriftpy2/archive/v%{version}.tar.gz
|
||||
Source1: new_certs.tar.xz
|
||||
# PATCH-FIX-UPSTREAM 0001-Use-SO_REUSEPORT-only-for-AF_INET-sockets.patch gh#Thriftpy/thriftpy2#303
|
||||
Patch1: 0001-Use-SO_REUSEPORT-only-for-AF_INET-sockets.patch
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module dbm}
|
||||
BuildRequires: %{python_module devel}
|
||||
@@ -36,6 +34,7 @@ BuildRequires: %{python_module pytest >= 2.8}
|
||||
BuildRequires: %{python_module pytest-asyncio}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: %{python_module toml}
|
||||
BuildRequires: %{python_module tornado >= 5.0}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e45429888c0c99ffb2b97af2235acfde0776a2086b3dab7beed04b1601573cc3
|
||||
size 151685
|
3
v0.5.3.tar.gz
Normal file
3
v0.5.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:16f3fd24f7778416d70b7cbd2cefce28e49ba72abe9f12471ae7697b09c70c25
|
||||
size 153269
|
Reference in New Issue
Block a user