diff --git a/.gitignore b/.gitignore index 652a5b6..a86689d 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /msgpack-1.0.1.tar.gz /msgpack-1.0.2.tar.gz /msgpack-1.0.3.tar.gz +/msgpack-1.0.4.tar.gz diff --git a/499.patch b/499.patch deleted file mode 100644 index 076b871..0000000 --- a/499.patch +++ /dev/null @@ -1,72 +0,0 @@ -From b24ca29ff92738269848bd7753ee0ad4754307cf Mon Sep 17 00:00:00 2001 -From: Victor Stinner -Date: Sat, 12 Mar 2022 00:45:38 +0100 -Subject: [PATCH] Use PyFloat_Pack8() on Python 3.11a7 - -Python 3.11a7 adds public functions: - -* PyFloat_Pack4(), PyFloat_Pack8() -* PyFloat_Unpack4(), PyFloat_Unpack8() - -https://bugs.python.org/issue46906 ---- - msgpack/pack_template.h | 9 +++++++++ - msgpack/unpack_template.h | 14 ++++++++++++-- - 2 files changed, 21 insertions(+), 2 deletions(-) - -diff --git a/msgpack/pack_template.h b/msgpack/pack_template.h -index 0e940b84..7d479b6d 100644 ---- a/msgpack/pack_template.h -+++ b/msgpack/pack_template.h -@@ -568,7 +568,12 @@ static inline int msgpack_pack_float(msgpack_packer* x, float d) - { - unsigned char buf[5]; - buf[0] = 0xca; -+ -+#if PY_VERSION_HEX >= 0x030B00A7 -+ PyFloat_Pack4(d, (char *)&buf[1], 0); -+#else - _PyFloat_Pack4(d, &buf[1], 0); -+#endif - msgpack_pack_append_buffer(x, buf, 5); - } - -@@ -576,7 +581,11 @@ static inline int msgpack_pack_double(msgpack_packer* x, double d) - { - unsigned char buf[9]; - buf[0] = 0xcb; -+#if PY_VERSION_HEX >= 0x030B00A7 -+ PyFloat_Pack8(d, (char *)&buf[1], 0); -+#else - _PyFloat_Pack8(d, &buf[1], 0); -+#endif - msgpack_pack_append_buffer(x, buf, 9); - } - -diff --git a/msgpack/unpack_template.h b/msgpack/unpack_template.h -index 9924b9c6..8b9fcc19 100644 ---- a/msgpack/unpack_template.h -+++ b/msgpack/unpack_template.h -@@ -243,10 +243,20 @@ static inline int unpack_execute(unpack_context* ctx, const char* data, Py_ssize - _msgpack_load32(uint32_t,n)+1, - _ext_zero); - case CS_FLOAT: { -- double f = _PyFloat_Unpack4((unsigned char*)n, 0); -+ double f; -+#if PY_VERSION_HEX >= 0x030B00A7 -+ f = PyFloat_Unpack4((const char*)n, 0); -+#else -+ f = _PyFloat_Unpack4((unsigned char*)n, 0); -+#endif - push_fixed_value(_float, f); } - case CS_DOUBLE: { -- double f = _PyFloat_Unpack8((unsigned char*)n, 0); -+ double f; -+#if PY_VERSION_HEX >= 0x030B00A7 -+ f = PyFloat_Unpack8((const char*)n, 0); -+#else -+ f = _PyFloat_Unpack8((unsigned char*)n, 0); -+#endif - push_fixed_value(_double, f); } - case CS_UINT_8: - push_fixed_value(_uint8, *(uint8_t*)n); diff --git a/python-msgpack.spec b/python-msgpack.spec index 1cdc922..dd63d03 100644 --- a/python-msgpack.spec +++ b/python-msgpack.spec @@ -1,17 +1,14 @@ %global srcname msgpack Name: python-%{srcname} -Version: 1.0.3 -Release: 2%{?dist} +Version: 1.0.4 +Release: 1%{?dist} Summary: Python MessagePack (de)serializer License: ASL 2.0 URL: https://msgpack.org/ Source0: https://github.com/msgpack/msgpack-python/archive/v%{version}/%{srcname}-%{version}.tar.gz -# Python 3.11.0a7+ compatibility -Patch1: https://github.com/msgpack/msgpack-python/pull/499.patch - BuildRequires: gcc-c++ %description @@ -58,6 +55,9 @@ rm -rf test/test_timestamp.py %{python3_sitearch}/%{srcname}*.egg-info %changelog +* Sat Jun 04 2022 Fabian Affolter - 1.0.4-1 +- Update to new upstream release 1.0.4 (closes rhbz#2090075) + * Fri Jan 21 2022 Fedora Release Engineering - 1.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 1648302..07053cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (msgpack-1.0.3.tar.gz) = ff8278d8a3cf001fe19660a8affe3ca33229a69b20389ca04a1d8c0ab92da7013dc9da70517d0a29358c9faf0e85e0339929aab423f521d2664bd198a7c2d738 +SHA512 (msgpack-1.0.4.tar.gz) = 206351b8b1f8070c601849b728ea63ced4fec91732856f69f88e3c05c769bcd0d868fe94d7549c8c100b82e9d732379c133bf8f438632647ff2e7812f936783d