[MacPorts] #67524: boost: python 3.11 support: add upstream enum/gc patch, to avoid downstream build failures

MacPorts noreply at macports.org
Sun May 28 19:21:53 UTC 2023


#67524: boost: python 3.11 support: add upstream enum/gc patch, to avoid downstream
build failures
---------------------+----------------------
 Reporter:  mascguy  |      Owner:  mascguy
     Type:  defect   |     Status:  assigned
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:  2.8.1
 Keywords:           |       Port:  boost
---------------------+----------------------
 Python 3.11 introduced stricter checks for enum types, which can sometimes
 cause issues for downstream projects:

 [https://github.com/python/cpython/issues/88429 88429 - Better explain the
 GC contract for PyType_FromSpecWithBases]

 And indeed, this causes issues for Boost, which required a subsequent
 upstream fix:

 [https://github.com/boostorg/python/commit/a218babc8daee904a83f550fb66e5cb3f1cb3013
 Boost Python: Fix enum_type_object type on Python 3.11]

 The full description from the latter commit is:

 > The enum_type_object type inherits from PyLong_Type which is not tracked
 by the GC. Instances doesn't have to be tracked by the GC: remove the
 Py_TPFLAGS_HAVE_GC flag.

 In terms of real-world impact, this caused issues for `deluge`, via the
 following PR/comment:

 [https://github.com/macports/macports-
 ports/pull/16069#issuecomment-1566229756 PR 16069 - deluge: update to
 2.0.5]

 But testing locally with the upstream patch included, fixes the issue. So
 we need to patch all Boost releases that support Python 3.11, to avoid
 downstream impact.

-- 
Ticket URL: <https://trac.macports.org/ticket/67524>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list