Pypy disagrees with CPython on `re.sub` of a `memoryview` slice
re.sub
returns the wrong results in Pypy when given a slice of a memoryview
:
$ /build/pypy-c-jit-102728-ace3d170113d-linux64/bin/pypy3 -c 'import re; re.sub(b"x", print, memoryview(b"xyz")[1:])'
<re.Match object; span=(0, 0), match=b''>
$ python3 -c 'import re; re.sub(b"x", print, memoryview(b"xyz")[1:])'
# (no output)
$ /build/pypy-c-jit-102728-ace3d170113d-linux64/bin/pypy3 --version
Python 3.8.10 (ace3d170113d, Jul 07 2021, 13:53:06)
[PyPy 7.3.6-alpha0 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
This is on Linux Mint 20.1. I haven't had time to look at the implementation to try to see where the issue comes from.