On Mon, Jan 04, 2021 at 11:55:52AM +0000, Julian Gilbey wrote:
> Package: python3-mistune
> Version: 0.8.4-4
> Severity: normal
> Tags: upstream
>
> This deprecation warning appears with Python 3.9:
>
> /usr/lib/python3/dist-packages/mistune.py:435: DeprecationWarning: invalid
> escape sequence \|
> cells[i][c] = re.sub('\\\\\|', '|', cell)
>
> I'm not sure what is intended here; perhaps
> cells[i][c] = re.sub(r'\|', '|', cell)
>
> Best wishes,
>
> Julian
Ah, no, that makes no sense. I think there's just a missing backslash
in the first, so the correct line should be
cells[i][c] = re.sub('\\\\\\|', '|', cell)
or more readably:
cells[i][c] = re.sub(r'\\\|', '|', cell)
Of course a simpler solution is
cells[i][c] = cell.replace(r'\|', '|')
Best wishes,
Julian
_______________________________________________
Python-modules-team mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team