python3-greenlet: Upgrade to 2.0.2
PATCH 1/1 python3-greenlet: Upgrade to 2.0.2
Drop backported patches as they are already in 2.0.2 release Add a patch to cleanup register keyword usage
Signed-off-by Khem Raj <[email protected]>
---
...Allocator-define-missing-rebind-type.patch | 56 ----
...ng-register-storage-class-keyword-ev.patch | 247 ++++++++++++++++++
...using-register-storage-class-keyword.patch | 31 ---
...let_2.0.1.bb => python3-greenlet_2.0.2.bb} | 6 +-
4 files changed, 249 insertions(+), 91 deletions(-)
delete mode 100644 meta-python/recipes-devtools/python/python3-greenlet/0001-PythonAllocator-define-missing-rebind-type.patch
create mode 100644 meta-python/recipes-devtools/python/python3-greenlet/0001-cleanup-Drop-using-register-storage-class-keyword-ev.patch
delete mode 100644 meta-python/recipes-devtools/python/python3-greenlet/0001-greenlet-Drop-using-register-storage-class-keyword.patch
rename meta-python/recipes-devtools/python/{python3-greenlet_2.0.1.bb => python3-greenlet_2.0.2.bb} (56%)meta-python/recipes-devtools/python/python3-greenlet/0001-PythonAllocator-define-missing-rebind-type.patch deleted +0 -56
@@ -1,56 +0,0 @@ -From 18fb84bb041072503b783ae03c5252f26d2216b8 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sun, 29 Jan 2023 21:42:08 -0800 -Subject: [PATCH] PythonAllocator: define missing 'rebind' type - -`gcc-13` added an assert to standard headers to make sure custom -allocators have intended implementation of rebind type instead -of inherited rebind. gcc change: - https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=64c986b49558a7 - -Without the fix build fails on this week's `gcc-13` as: - -| In file included from ../recipe-sysroot/usr/include/c++/13.0.1/ext/alloc_traits.h:34, -| from ../recipe-sysroot/usr/include/c++/13.0.1/bits/basic_string.h:39, -| from ../recipe-sysroot/usr/include/c++/13.0.1/string:54, -| from src/greenlet/greenlet.cpp:10: -| ../recipe-sysroot/usr/include/c++/13.0.1/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<greenlet::PythonAllocator<_greenlet*>, _greenlet*, void>': -| ../recipe-sysroot/usr/include/c++/13.0.1/bits/alloc_traits.h:94:11: required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = greenlet::PythonAllocator<_greenlet*>; _Up = _greenlet*]' -| ../recipe-sysroot/usr/include/c++/13.0.1/bits/alloc_traits.h:228:8: required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = _greenlet*; _Alloc = greenlet::PythonAllocator<_greenlet*>]' -| ../recipe-sysroot/usr/include/c++/13.0.1/ext/alloc_traits.h:126:65: required from 'struct __gnu_cxx::__alloc_traits<greenlet::PythonAllocator<_greenlet*>, _greenlet*>::rebind<_greenlet*>' -| ../recipe-sysroot/usr/include/c++/13.0.1/bits/stl_vector.h:88:21: required from 'struct std::_Vector_base<_greenlet*, greenlet::PythonAllocator<_greenlet*> >' -| ../recipe-sysroot/usr/include/c++/13.0.1/bits/stl_vector.h:423:11: required from 'class std::vector<_greenlet*, greenlet::PythonAllocator<_greenlet*> >' -| src/greenlet/greenlet_thread_state.hpp:115:16: required from here -| ../recipe-sysroot/usr/include/c++/13.0.1/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A -| 70 | _Tp>::value, -| | ^~~~~ -| ../recipe-sysroot/usr/include/c++/13.0.1/bits/alloc_traits.h:70:31: note: 'std::integral_constant<bool, false>::value' evaluates to false - -The change adds trivial `rebind` definition with expected return type -and satisfies conversion requirements. - -Upstream-Status: Submitted [https://github.com/python-greenlet/greenlet/pull/344] -Signed-off-by: Khem Raj <[email protected]> ---- - src/greenlet/greenlet_allocator.hpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/greenlet/greenlet_allocator.hpp b/src/greenlet/greenlet_allocator.hpp -index 666307d..beaa7ed 100644 ---- a/src/greenlet/greenlet_allocator.hpp -+++ b/src/greenlet/greenlet_allocator.hpp -@@ -32,6 +32,11 @@ namespace greenlet - - PythonAllocator() : std::allocator<T>() {} - -+ template <class U> struct rebind -+ { -+ typedef PythonAllocator<U> other; -+ }; -+ - T* allocate(size_t number_objects, const void* UNUSED(hint)=0) - { - void* p; --- -2.39.1 -
meta-python/recipes-devtools/python/python3-greenlet/0001-cleanup-Drop-using-register-storage-class-keyword-ev.patch new file +247 -0
247 lines not on this page · raw message
meta-python/recipes-devtools/python/python3-greenlet/0001-greenlet-Drop-using-register-storage-class-keyword.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From aa505359a3bb5a954fe3c7fbd853c75802bf3533 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 16 Jan 2023 21:37:26 -0800 -Subject: [PATCH] greenlet: Drop using 'register' storage class keyword - -This has been dropped in c++17 and newer - -Upstream-Status: Submitted [https://github.com/python-greenlet/greenlet/pull/336] -Signed-off-by: Khem Raj <[email protected]> ---- - src/greenlet/platform/switch_riscv_unix.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/greenlet/platform/switch_riscv_unix.h b/src/greenlet/platform/switch_riscv_unix.h -index 5b5ea98..24df9db 100644 ---- a/src/greenlet/platform/switch_riscv_unix.h -+++ b/src/greenlet/platform/switch_riscv_unix.h -@@ -11,8 +11,8 @@ - static int - slp_switch(void) - { -- register int ret; -- register long *stackref, stsizediff; -+ int ret; -+ long *stackref, stsizediff; - __asm__ volatile ("" : : : REGS_TO_SAVE); - __asm__ volatile ("mv %0, sp" : "=r" (stackref) : ); - { --- -2.39.0 -
meta-python/recipes-devtools/python/python3-greenlet_2.0.2.bb renamed from meta-python/recipes-devtools/python/python3-greenlet_2.0.1.bb +2 -4
@@ -4,9 +4,7 @@ LICENSE = "MIT & PSF-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e95668d68e4329085c7ab3535e6a7aee \ file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a" -SRC_URI += "file://0001-greenlet-Drop-using-register-storage-class-keyword.patch \ - file://0001-PythonAllocator-define-missing-rebind-type.patch" - -SRC_URI[sha256sum] = "42e602564460da0e8ee67cb6d7236363ee5e131aa15943b6670e44e5c2ed0f67" +SRC_URI += "file://0001-cleanup-Drop-using-register-storage-class-keyword-ev.patch" +SRC_URI[sha256sum] = "e7c8dc13af7db097bed64a051d2dd49e9f0af495c26995c00a9ee842690d34c0" inherit pypi setuptools3
Signature · 1 line
2.39.1