Opened 18 months ago
Closed 18 months ago
#67524 closed defect (fixed)
boost: python 3.11 support: add upstream enum/gc patch, to avoid downstream build failures
Reported by: | mascguy (Christopher Nielsen) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | michaelld (Michael Dickens), cjones051073 (Chris Jones), barracuda156 | |
Port: | boost |
Description
Python 3.11 introduced stricter checks for enum types, which can sometimes cause issues for downstream projects:
88429 - Better explain the GC contract for PyType_FromSpecWithBases
And indeed, this causes issues for Boost, which required a subsequent upstream fix:
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:
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.
Change History (4)
comment:1 Changed 18 months ago by mascguy (Christopher Nielsen)
Cc: | barracuda156 added |
---|
comment:2 Changed 18 months ago by Christopher Nielsen <mascguy@…>
comment:3 Changed 18 months ago by Christopher Nielsen <mascguy@…>
comment:4 Changed 18 months ago by mascguy (Christopher Nielsen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch now applied for boost1{76..80}
, so we're done.
Observers: The patch is included in upstream releases starting with boost181
, so we'll be good going forward.
In 2b5cd04e1204a385214673c727f2163992be9283/macports-ports (master):