From 58535833760b7d80cb817e60d5aa9a378741dd67 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 29 Oct 2023 16:56:42 +0000 Subject: [PATCH] py-greenlet: update to 3.0.1. Switch to wheel.mk. 3.0.1 (2023-10-25) ================== - Fix a potential crash on Python 3.8 at interpreter shutdown time. This was a regression from earlier 3.0.x releases. Reported by Matt Wozniski in `issue 376 `_. 3.0.0 (2023-10-02) ================== - No changes from 3.0rc3 aside from the version number. 3.0.0rc3 (2023-09-12) ===================== - Fix an intermittent error during process termination on some platforms (GCC/Linux/libstdc++). 3.0.0rc2 (2023-09-09) ===================== - Fix some potential bugs (assertion failures and memory leaks) in previously-untested error handling code. In some cases, this means that the process will execute a controlled ``abort()`` after severe trouble when previously the process might have continued for some time with a corrupt state. It is unlikely those errors occurred in practice. - Fix some assertion errors and potential bugs with re-entrant switches. - Fix a potential crash when certain compilers compile greenlet with high levels of optimization. The symptom would be that switching to a greenlet for the first time immediately crashes. - Fix a potential crash when the callable object passed to the greenlet constructor (or set as the ``greenlet.run`` attribute) has a destructor attached to it that switches. Typically, triggering this issue would require an unlikely subclass of ``greenlet.greenlet``. - Python 3.11+: Fix rare switching errors that could occur when a garbage collection was triggered during the middle of a switch, and Python-level code in ``__del__`` or weakref callbacks switched to a different greenlet and ultimately switched back to the original greenlet. This often manifested as a ``SystemError``: "switch returned NULL without an exception set." For context on the fixes, see `gevent issue #1985 `_. 3.0.0rc1 (2023-09-01) ===================== - Windows wheels are linked statically to the C runtime in an effort to prevent import errors on systems without the correct C runtime installed. It's not clear if this will make the situation better or worse, so please share your experiences in `issue 346 `_. Note that this only applies to the binary wheels found on PyPI. Building greenlet from source defaults to the shared library. Set the environment variable ``GREENLET_STATIC_RUNTIME=1`` at build time to change that. - Build binary wheels for Python 3.12 on macOS. - Fix compiling greenlet on a debug build of CPython 3.12. There is `one known issue `_ that leads to an interpreter crash on debug builds. - Python 3.12: Fix walking the frame stack of suspended greenlets. Previously accessing ``glet.gr_frame.f_back`` would crash due to `changes in CPython's undocumented internal frame handling `_. Platforms --------- - Now, greenlet *may* compile and work on Windows ARM64 using llvm-mingw, but this is untested and unsupported. See `PR `_ by Adrian Vladu. - Now, greenlet *may* compile and work on LoongArch64 Linux systems, but this is untested and unsupported. See `PR 257 `_ by merore. Known Issues ------------ - There may be (very) subtle issues with tracing on Python 3.12, which has redesigned the entire tracing infrastructure. 3.0.0a1 (2023-06-21) ==================== - Build binary wheels for S390x Linux. See `PR 358 `_ from Steven Silvester. - Fix a rare crash on shutdown seen in uWSGI deployments. See `issue 330 `_ and `PR 356 `_ from Andrew Wason. - Make the platform-specific low-level C/assembly snippets stop using the ``register`` storage class. Newer versions of standards remove this storage class, and it has been generally ignored by many compilers for some time. See `PR 347 `_ from Khem Raj. - Add initial support for Python 3.12. See `issue `_ and `PR `_; thanks go to (at least) Michael Droettboom, Andreas Motl, Thomas A Caswell, raphaelauv, Hugo van Kemenade, Mark Shannon, and Petr Viktorin. - Remove support for end-of-life Python versions, including Python 2.7, Python 3.5 and Python 3.6. - Require a compiler that supports ``noinline`` directives. See `issue 271 `_. - Require a compiler that supports C++11. --- devel/py-greenlet/Makefile | 13 +++-- devel/py-greenlet/PLIST | 47 ++++++++++++++++--- devel/py-greenlet/distinfo | 9 ++-- .../patch-src_greenlet_slp__platformselect.h | 15 ------ 4 files changed, 52 insertions(+), 32 deletions(-) delete mode 100644 devel/py-greenlet/patches/patch-src_greenlet_slp__platformselect.h diff --git a/devel/py-greenlet/Makefile b/devel/py-greenlet/Makefile index 844bceba23c9..7560b216e469 100644 --- a/devel/py-greenlet/Makefile +++ b/devel/py-greenlet/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.20 2023/09/01 10:44:59 nia Exp $ +# $NetBSD: Makefile,v 1.21 2023/10/29 16:56:42 wiz Exp $ -DISTNAME= greenlet-2.0.2 +DISTNAME= greenlet-3.0.1 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= devel python MASTER_SITES= ${MASTER_SITE_PYPI:=g/greenlet/} @@ -10,6 +10,8 @@ HOMEPAGE= https://github.com/python-greenlet/greenlet COMMENT= Lightweight in-process concurrent programming LICENSE= mit +TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools +TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel TEST_DEPENDS+= ${PYPKGPREFIX}-objgraph-[0-9]*:../../graphics/py-objgraph USE_LANGUAGES= c c++ @@ -22,8 +24,9 @@ USE_CXX_FEATURES+= c++11 PYTHON_VERSIONS_INCOMPATIBLE= 27 -do-test: - cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHONBIN} -m unittest discover greenlet.tests +# no tests included +#do-test: +# cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHONBIN} -m unittest discover greenlet.tests -.include "../../lang/python/egg.mk" +.include "../../lang/python/wheel.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/py-greenlet/PLIST b/devel/py-greenlet/PLIST index 49ce5ef73f59..72994e2135bd 100644 --- a/devel/py-greenlet/PLIST +++ b/devel/py-greenlet/PLIST @@ -1,11 +1,21 @@ -@comment $NetBSD: PLIST,v 1.3 2022/11/21 11:28:21 adam Exp $ +@comment $NetBSD: PLIST,v 1.4 2023/10/29 16:56:42 wiz Exp $ ${PYINC}/greenlet/greenlet.h -${PYSITELIB}/${EGG_INFODIR}/PKG-INFO -${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt -${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt -${PYSITELIB}/${EGG_INFODIR}/not-zip-safe -${PYSITELIB}/${EGG_INFODIR}/requires.txt -${PYSITELIB}/${EGG_INFODIR}/top_level.txt +${PYSITELIB}/${WHEEL_INFODIR}/AUTHORS +${PYSITELIB}/${WHEEL_INFODIR}/LICENSE +${PYSITELIB}/${WHEEL_INFODIR}/LICENSE.PSF +${PYSITELIB}/${WHEEL_INFODIR}/METADATA +${PYSITELIB}/${WHEEL_INFODIR}/RECORD +${PYSITELIB}/${WHEEL_INFODIR}/WHEEL +${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt +${PYSITELIB}/greenlet/TBrokenGreenlet.cpp +${PYSITELIB}/greenlet/TExceptionState.cpp +${PYSITELIB}/greenlet/TGreenlet.cpp +${PYSITELIB}/greenlet/TGreenletGlobals.cpp +${PYSITELIB}/greenlet/TMainGreenlet.cpp +${PYSITELIB}/greenlet/TPythonState.cpp +${PYSITELIB}/greenlet/TStackState.cpp +${PYSITELIB}/greenlet/TThreadStateDestroy.cpp +${PYSITELIB}/greenlet/TUserGreenlet.cpp ${PYSITELIB}/greenlet/__init__.py ${PYSITELIB}/greenlet/__init__.pyc ${PYSITELIB}/greenlet/__init__.pyo @@ -14,6 +24,7 @@ ${PYSITELIB}/greenlet/greenlet.cpp ${PYSITELIB}/greenlet/greenlet.h ${PYSITELIB}/greenlet/greenlet_allocator.hpp ${PYSITELIB}/greenlet/greenlet_compiler_compat.hpp +${PYSITELIB}/greenlet/greenlet_cpython_add_pending.hpp ${PYSITELIB}/greenlet/greenlet_cpython_compat.hpp ${PYSITELIB}/greenlet/greenlet_exceptions.hpp ${PYSITELIB}/greenlet/greenlet_greenlet.hpp @@ -36,6 +47,7 @@ ${PYSITELIB}/greenlet/platform/switch_arm64_masm.asm ${PYSITELIB}/greenlet/platform/switch_arm64_masm.obj ${PYSITELIB}/greenlet/platform/switch_arm64_msvc.h ${PYSITELIB}/greenlet/platform/switch_csky_gcc.h +${PYSITELIB}/greenlet/platform/switch_loongarch64_linux.h ${PYSITELIB}/greenlet/platform/switch_m68k_gcc.h ${PYSITELIB}/greenlet/platform/switch_mips_unix.h ${PYSITELIB}/greenlet/platform/switch_ppc64_aix.h @@ -61,6 +73,27 @@ ${PYSITELIB}/greenlet/tests/_test_extension.c ${PYSITELIB}/greenlet/tests/_test_extension.so ${PYSITELIB}/greenlet/tests/_test_extension_cpp.cpp ${PYSITELIB}/greenlet/tests/_test_extension_cpp.so +${PYSITELIB}/greenlet/tests/fail_clearing_run_switches.py +${PYSITELIB}/greenlet/tests/fail_clearing_run_switches.pyc +${PYSITELIB}/greenlet/tests/fail_clearing_run_switches.pyo +${PYSITELIB}/greenlet/tests/fail_cpp_exception.py +${PYSITELIB}/greenlet/tests/fail_cpp_exception.pyc +${PYSITELIB}/greenlet/tests/fail_cpp_exception.pyo +${PYSITELIB}/greenlet/tests/fail_initialstub_already_started.py +${PYSITELIB}/greenlet/tests/fail_initialstub_already_started.pyc +${PYSITELIB}/greenlet/tests/fail_initialstub_already_started.pyo +${PYSITELIB}/greenlet/tests/fail_slp_switch.py +${PYSITELIB}/greenlet/tests/fail_slp_switch.pyc +${PYSITELIB}/greenlet/tests/fail_slp_switch.pyo +${PYSITELIB}/greenlet/tests/fail_switch_three_greenlets.py +${PYSITELIB}/greenlet/tests/fail_switch_three_greenlets.pyc +${PYSITELIB}/greenlet/tests/fail_switch_three_greenlets.pyo +${PYSITELIB}/greenlet/tests/fail_switch_three_greenlets2.py +${PYSITELIB}/greenlet/tests/fail_switch_three_greenlets2.pyc +${PYSITELIB}/greenlet/tests/fail_switch_three_greenlets2.pyo +${PYSITELIB}/greenlet/tests/fail_switch_two_greenlets.py +${PYSITELIB}/greenlet/tests/fail_switch_two_greenlets.pyc +${PYSITELIB}/greenlet/tests/fail_switch_two_greenlets.pyo ${PYSITELIB}/greenlet/tests/leakcheck.py ${PYSITELIB}/greenlet/tests/leakcheck.pyc ${PYSITELIB}/greenlet/tests/leakcheck.pyo diff --git a/devel/py-greenlet/distinfo b/devel/py-greenlet/distinfo index 5715ea1a00be..b2acd9ab42f4 100644 --- a/devel/py-greenlet/distinfo +++ b/devel/py-greenlet/distinfo @@ -1,6 +1,5 @@ -$NetBSD: distinfo,v 1.19 2023/01/30 12:53:24 adam Exp $ +$NetBSD: distinfo,v 1.20 2023/10/29 16:56:42 wiz Exp $ -BLAKE2s (greenlet-2.0.2.tar.gz) = cba51da6ed4c9b2ee0310cecf28f77969c800bacbb9c54b79621b110f0f10f5a -SHA512 (greenlet-2.0.2.tar.gz) = 03d0b2764c52524c97930a7bd856a432360a96ddbe3d1f2352ec49750994e6811fd28378f83b96cac91520234d0a6e9e56232ff688c71ff57f6340d3d182635b -Size (greenlet-2.0.2.tar.gz) = 164980 bytes -SHA1 (patch-src_greenlet_slp__platformselect.h) = ada2dd34b7fe0847526188aa9242e93732b4bc37 +BLAKE2s (greenlet-3.0.1.tar.gz) = 9370ae981e0dabf949ac8a32bac1e0b6f44b6212cbba608fc1c7f0b1a30c88ad +SHA512 (greenlet-3.0.1.tar.gz) = 67d74352802331642eba0917550a75e9bc2a7d223bc0ce4ee7993d05197b4d0650813439e7c495baf2309303740cd21e60a157e634aafff470332a685603ffec +Size (greenlet-3.0.1.tar.gz) = 174825 bytes diff --git a/devel/py-greenlet/patches/patch-src_greenlet_slp__platformselect.h b/devel/py-greenlet/patches/patch-src_greenlet_slp__platformselect.h deleted file mode 100644 index f6cef44ce875..000000000000 --- a/devel/py-greenlet/patches/patch-src_greenlet_slp__platformselect.h +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_greenlet_slp__platformselect.h,v 1.1 2021/03/03 18:05:02 adam Exp $ - -Support NetBSD/powerpc. - ---- src/greenlet/slp_platformselect.h.orig 2021-01-13 13:34:17.000000000 +0000 -+++ src/greenlet/slp_platformselect.h -@@ -22,6 +22,8 @@ - #include "platform/switch_ppc64_aix.h" /* gcc on AIX/PowerPC 64-bit */ - #elif defined(__GNUC__) && defined(_ARCH_PPC) && defined(_AIX) - #include "platform/switch_ppc_aix.h" /* gcc on AIX/PowerPC */ -+#elif defined(__GNUC__) && defined(__powerpc__) && defined(__NetBSD__) -+#include "platform/switch_ppc_unix.h" /* gcc on NetBSD/powerpc */ - #elif defined(__GNUC__) && defined(sparc) - #include "platform/switch_sparc_sun_gcc.h" /* SunOS sparc with gcc */ - #elif defined(__SUNPRO_C) && defined(sparc) && defined(sun)