The old python implementation ran rules L3/L4 on the reordered output to correctly mirror glyphs and change the position of combining marks around their base character. The unicode_bidi rust module you're wrapping for 0.5 only implements rules L1/L2 causing the output between 0.4 and 0.5 to differ.
unicode_bidi also adds spurious directional markers in the output.
An example for L4:
# 0.4.2
>>> from bidi.algorithm import get_display
>>> get_display('א)א')
'א)א'
# 0.5.2
>>> from bidi import get_display
>>> get_display('א)א')
'\u200eא)\u200eא'
The old python implementation ran rules L3/L4 on the reordered output to correctly mirror glyphs and change the position of combining marks around their base character. The
unicode_bidirust module you're wrapping for 0.5 only implements rules L1/L2 causing the output between 0.4 and 0.5 to differ.unicode_bidialso adds spurious directional markers in the output.An example for L4: