diff options
| author | Haixiao Yan <haixiao.yan.cn@windriver.com> | 2025-10-16 15:27:58 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-10-16 08:48:34 -0700 |
| commit | 97a9a1b93b8d2b333de87b4cb2ec2bce4c415ffe (patch) | |
| tree | 8254d7c6b154e465ca4d4f5dfc721e3f7719f869 /meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch | |
| parent | 19cbdbcac664b16e3c669e724d43725b8b00d2ef (diff) | |
| download | meta-openembedded-97a9a1b93b8d2b333de87b4cb2ec2bce4c415ffe.tar.gz | |
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 <haixiao.yan.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-m2crypto/0001-timeout.py-use-qq-format-when-time_t-is-64bit-on-32b.patch | 80 |
1 files changed, 0 insertions, 80 deletions
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 @@ | |||
| 1 | From 7fa4f17cc183e04b10684b28219cf15780910206 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
| 3 | Date: Mon, 30 Jun 2025 16:11:16 +0800 | ||
| 4 | Subject: [PATCH] timeout.py: use qq format when time_t is 64bit on 32bit | ||
| 5 | platform | ||
| 6 | |||
| 7 | Fixes: | ||
| 8 | # python3 | ||
| 9 | Python 3.13.2 (main, Feb 4 2025, 14:51:09) [GCC 14.2.0] on linux | ||
| 10 | Type "help", "copyright", "credits" or "license" for more information. | ||
| 11 | >>> import socket | ||
| 12 | >>> import struct | ||
| 13 | >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
| 14 | >>> seconds = 5 | ||
| 15 | >>> microseconds = 0 | ||
| 16 | >>> timeval_packed = struct.pack('ll', seconds, microseconds) | ||
| 17 | >>> s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeval_packed) | ||
| 18 | Traceback (most recent call last): | ||
| 19 | File "<python-input-6>", line 1, in <module> | ||
| 20 | s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeval_packed) | ||
| 21 | ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 22 | OSError: [Errno 22] Invalid argument | ||
| 23 | |||
| 24 | Upstream-Status: Submitted [https://lists.sr.ht/~mcepl/m2crypto/patches/60463] | ||
| 25 | |||
| 26 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
| 27 | --- | ||
| 28 | src/M2Crypto/SSL/timeout.py | 18 ++++++++++++++---- | ||
| 29 | 1 file changed, 14 insertions(+), 4 deletions(-) | ||
| 30 | |||
| 31 | diff --git a/src/M2Crypto/SSL/timeout.py b/src/M2Crypto/SSL/timeout.py | ||
| 32 | index 298a9ca..0b38329 100644 | ||
| 33 | --- a/src/M2Crypto/SSL/timeout.py | ||
| 34 | +++ b/src/M2Crypto/SSL/timeout.py | ||
| 35 | @@ -15,7 +15,7 @@ __all__ = [ | ||
| 36 | import sys | ||
| 37 | import struct | ||
| 38 | |||
| 39 | -from M2Crypto import m2 | ||
| 40 | +from M2Crypto import m2, util | ||
| 41 | |||
| 42 | DEFAULT_TIMEOUT: int = 600 | ||
| 43 | |||
| 44 | @@ -40,7 +40,10 @@ class timeout(object): | ||
| 45 | if m2.time_t_bits() == 32: | ||
| 46 | binstr = struct.pack('ii', self.sec, self.microsec) | ||
| 47 | else: | ||
| 48 | - binstr = struct.pack('ll', self.sec, self.microsec) | ||
| 49 | + if util.is_32bit(): | ||
| 50 | + binstr = struct.pack('qq', self.sec, self.microsec) | ||
| 51 | + else: | ||
| 52 | + binstr = struct.pack('ll', self.sec, self.microsec) | ||
| 53 | return binstr | ||
| 54 | |||
| 55 | |||
| 56 | @@ -52,7 +55,10 @@ def struct_to_timeout(binstr: bytes) -> timeout: | ||
| 57 | sec = int(millisec / 1000) | ||
| 58 | microsec = (millisec % 1000) * 1000 | ||
| 59 | else: | ||
| 60 | - (sec, microsec) = struct.unpack('ll', binstr) | ||
| 61 | + if sys.platform == 'linux' and util.is_32bit() and m2.time_t_bits() == 64: | ||
| 62 | + (sec, microsec) = struct.unpack('qq', binstr) | ||
| 63 | + else: | ||
| 64 | + (sec, microsec) = struct.unpack('ll', binstr) | ||
| 65 | return timeout(sec, microsec) | ||
| 66 | |||
| 67 | |||
| 68 | @@ -60,4 +66,8 @@ def struct_size() -> int: | ||
| 69 | if sys.platform == 'win32': | ||
| 70 | return struct.calcsize('l') | ||
| 71 | else: | ||
| 72 | - return struct.calcsize('ll') | ||
| 73 | + if sys.platform == 'linux' and util.is_32bit() and m2.time_t_bits() == 64: | ||
| 74 | + return struct.calcsize('qq') | ||
| 75 | + else: | ||
| 76 | + return struct.calcsize('ll') | ||
| 77 | + | ||
| 78 | -- | ||
| 79 | 2.34.1 | ||
| 80 | |||
