Commit bac7b31
committed
gh-156995: Add caution around API behavior change
The subtle change between free-threading and GIL-enabled builds resulted
in the `Py_REFCNT(op) == 1` `bytes` object inside `bytearray` was
considered non-unique during `_PyBytes_Resize` which resulted in it
being substitued for an immortal global rather than keeping the
allocation only in free-threaded builds.
The behavior has been fixed in `_PyBytes_Resize` but the hazard exists
and was a part of a release blocking bug so urge caution around
that case when porting.1 parent 8f84787 commit bac7b31
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
811 | 818 | | |
812 | 819 | | |
813 | 820 | | |
| |||
0 commit comments