From 97a9a1b93b8d2b333de87b4cb2ec2bce4c415ffe Mon Sep 17 00:00:00 2001 From: Haixiao Yan Date: Thu, 16 Oct 2025 15:27:58 +0800 Subject: python3-m2crypto: upgrade 0.45.1 -> 0.46.2 python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch refreshed for 0.46.2 python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch removed, this patch doesn't work for 0.45.1 and 0.46.2. Fix the following test hang: test_IP_call (tests.test_ssl.HttpslibSSLSNIClientTestCase.test_IP_call) ... Changelog: =========== 0.46.2 - 2025-10-02 ------------------- - fix[m2xmlrpclib]: make the module compatible with Python 3.6 0.46.1 - 2025-10-02 ------------------- - Correct license to BSD-2-Clause and update references - Specify in setup.cfg that we require Python >= 3.6 0.46.0 - 2025-10-01 ------------------- (Tested on Pythons between 3.6 and 3.14.0~rc3) - M2Crypto closes SSL connection on closing HTTPS Connection, and some other related issues (#203, #278) - Modernize C API by eliminating use of deprecated PyBytes_AsStringAndSize and related functions with Python Buffer Protocol (#375) - Whole project is completely covered with type hints and is checked by mypy (also while doing that, the whole project was blackened) (#344) - Add logging support to C extension code sending messages to the Python logging - Introducing first efforts to support Engine object (#229) - Reworked and fixed M2Crypto.m2xmlrpclib module (#163) - Reverted removal of demo/ subdirectory - Improve SMIME documentation (#377) - Some other minor bugs, improvements, and removal of dead code Signed-off-by: Haixiao Yan Signed-off-by: Khem Raj --- ...use-qq-format-when-time_t-is-64bit-on-32b.patch | 80 ---------------------- 1 file changed, 80 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch (limited to 'meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch') diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch deleted file mode 100644 index 120a67b6a2..0000000000 --- a/meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 7fa4f17cc183e04b10684b28219cf15780910206 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Mon, 30 Jun 2025 16:11:16 +0800 -Subject: [PATCH] timeout.py: use qq format when time_t is 64bit on 32bit - platform - -Fixes: - # python3 - Python 3.13.2 (main, Feb 4 2025, 14:51:09) [GCC 14.2.0] on linux - Type "help", "copyright", "credits" or "license" for more information. - >>> import socket - >>> import struct - >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - >>> seconds = 5 - >>> microseconds = 0 - >>> timeval_packed = struct.pack('ll', seconds, microseconds) - >>> s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeval_packed) -Traceback (most recent call last): - File "", line 1, in - s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeval_packed) - ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -OSError: [Errno 22] Invalid argument - -Upstream-Status: Submitted [https://lists.sr.ht/~mcepl/m2crypto/patches/60463] - -Signed-off-by: Mingli Yu ---- - src/M2Crypto/SSL/timeout.py | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/src/M2Crypto/SSL/timeout.py b/src/M2Crypto/SSL/timeout.py -index 298a9ca..0b38329 100644 ---- a/src/M2Crypto/SSL/timeout.py -+++ b/src/M2Crypto/SSL/timeout.py -@@ -15,7 +15,7 @@ __all__ = [ - import sys - import struct - --from M2Crypto import m2 -+from M2Crypto import m2, util - - DEFAULT_TIMEOUT: int = 600 - -@@ -40,7 +40,10 @@ class timeout(object): - if m2.time_t_bits() == 32: - binstr = struct.pack('ii', self.sec, self.microsec) - else: -- binstr = struct.pack('ll', self.sec, self.microsec) -+ if util.is_32bit(): -+ binstr = struct.pack('qq', self.sec, self.microsec) -+ else: -+ binstr = struct.pack('ll', self.sec, self.microsec) - return binstr - - -@@ -52,7 +55,10 @@ def struct_to_timeout(binstr: bytes) -> timeout: - sec = int(millisec / 1000) - microsec = (millisec % 1000) * 1000 - else: -- (sec, microsec) = struct.unpack('ll', binstr) -+ if sys.platform == 'linux' and util.is_32bit() and m2.time_t_bits() == 64: -+ (sec, microsec) = struct.unpack('qq', binstr) -+ else: -+ (sec, microsec) = struct.unpack('ll', binstr) - return timeout(sec, microsec) - - -@@ -60,4 +66,8 @@ def struct_size() -> int: - if sys.platform == 'win32': - return struct.calcsize('l') - else: -- return struct.calcsize('ll') -+ if sys.platform == 'linux' and util.is_32bit() and m2.time_t_bits() == 64: -+ return struct.calcsize('qq') -+ else: -+ return struct.calcsize('ll') -+ --- -2.34.1 - -- cgit v1.2.3-54-g00ecf