<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2b5cd04e1204a385214673c727f2163992be9283">https://github.com/macports/macports-ports/commit/2b5cd04e1204a385214673c727f2163992be9283</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 2b5cd04e120 boost180: python: add upstream patch for enum/gc See: https://trac.macports.org/ticket/67524
</span>2b5cd04e120 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2b5cd04e1204a385214673c727f2163992be9283
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Sun May 28 16:20:31 2023 -0400
<span style='display:block; white-space:pre;color:#404040;'> boost180: python: add upstream patch for enum/gc
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/67524
</span>---
devel/boost180/Portfile | 7 +++--
devel/boost180/files/patch-python-enum_type.diff | 35 ++++++++++++++++++++++++
2 files changed, 39 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/boost180/Portfile b/devel/boost180/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d0da8536161..281e1b466a3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/boost180/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/boost180/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -287,8 +287,9 @@ foreach v ${pythons_versions} {
</span> configure.args-delete --without-libraries=python
configure.args-append --with-python=${prefix}/bin/python${v} --with-python-root=${prefix}/bin/python${v}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append ${bppatch} patch-tools-build-src-tools-python.jam.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-tools-build-src-tools-python-2.jam.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append ${bppatch} patch-tools-build-src-tools-python.jam.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-tools-build-src-tools-python-2.jam.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-python-enum_type.diff
</span>
post-patch {
reinplace s|@FRAMEWORKS_DIR@|${frameworks_dir}| ${worksrcpath}/tools/build/src/tools/python.jam
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -359,7 +360,7 @@ subport ${name}-numpy {
</span>
if {$subport eq $name} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 5
</span>
patchfiles-append patch-disable-numpy-extension.diff
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/boost180/files/patch-python-enum_type.diff b/devel/boost180/files/patch-python-enum_type.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..15b3f54e287
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/boost180/files/patch-python-enum_type.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From a218babc8daee904a83f550fb66e5cb3f1cb3013 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Victor Stinner <vstinner@python.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 25 Apr 2022 10:51:46 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Fix enum_type_object type on Python 3.11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The enum_type_object type inherits from PyLong_Type which is not tracked
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+by the GC. Instances doesn't have to be tracked by the GC: remove the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Py_TPFLAGS_HAVE_GC flag.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The Python C API documentation says:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "To create a container type, the tp_flags field of the type object
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ must include the Py_TPFLAGS_HAVE_GC and provide an implementation of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the tp_traverse handler."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://docs.python.org/dev/c-api/gcsupport.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The new exception was introduced in Python 3.11 by:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/python/cpython/issues/88429
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/object/enum.cpp | 1 -
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/object/enum.cpp b/src/object/enum.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 293e705899..5753b32e07 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libs/python/src/object/enum.cpp.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libs/python/src/object/enum.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -113,7 +113,6 @@ static PyTypeObject enum_type_object = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if PY_VERSION_HEX < 0x03000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | Py_TPFLAGS_CHECKTYPES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- | Py_TPFLAGS_HAVE_GC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | Py_TPFLAGS_BASETYPE, /* tp_flags */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0, /* tp_doc */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0, /* tp_traverse */
</span></pre><pre style='margin:0'>
</pre>