← All tasks
pythonpallets/markupsafe #176Not a task: already works

Unicode incorrectly escaped on PyPy 7.3.1

envgap__pallets__markupsafe-176

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
411390d1362aa77e57dad856bcc061449bf183c6
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

pallets/markupsafe #176 · read the original issue
On PyPy (specifically, the wheel with `_speedups.pypy36-pp73-x86_64-linux-gnu.so`), when using `markupsafe.escape()`, this unicode below is incorrectly escaped;



Input: `'https://x?<ab c>&q"+%3D%2B"="fö%26=o"'`



`_native`:

`'https://x?&lt;ab c&gt;&amp;q&#34;+%3D%2B&#34;=&#34;fö%26=o&#34;'`

`_speedups` (on pypy):

`'https://x?&lt;ab c&gt;&amp;q&#34;+%3D%2B&#34;=&#34;fö%26=o'`



This was caught while testing PyPy support for [synapse](https://github.com/matrix-org/synapse), in https://github.com/matrix-org/synapse/pull/9123, in which one of the tests hooked behind here.



I am no expert in C, but I have a feeling one of the Unicode APIs used in `_speedups.c` is either being used incorrectly, or has an implementation mismatch compared to cPython
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]