- Package:
- python3-mistune
- Source:
- mistune
- Submitter:
- Julian Gilbey
- Date:
- 2025-09-06 14:43:03 UTC
- Severity:
- normal
- Tags:
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
Hi, I just compiled the package (which includes running tests) with Python version 3.9.9, and the only deprecation warning was about using "setup.py install" ; can you tell me more about how to reproduce? Thanks, J.Puydt
Hi, since it's just a warning and I can't reproduce it since more than a year: closing. Cheers, J.Puydt
Hi Julien, I'm sorry - I never saw this message (you forgot to copy in nnn-submitter@b.d.o), so I never replied. This deprecation warning appeared when running pytest on another package (I don't recall which one offhand, unfortunately), and it's in reference to an invalid regular expression as described in the bug report. To obtain the deprecation warning, one probably needs to execute the relevant piece of code. I've just reopened and reassigned the bug to python3-mistune0, as it does not appear in the mistune v2 rewrite. Eventually that package may disappear, and this bug report with it. But I think python 3.10 or 3.11 will turn this deprecation warning into an error, at which point some things may break if python3-mistune0 has not been deprecated by then. Best wishes, Julian
As can be seen in pipuarts [1], this is now a SyntaxWarning with
Python 3.12, and will become a SyntaxError in future.
[1] https://piuparts.debian.org/sid/source/m/mistune0.html
Setting up python3-mistune0 (0.8.4-4) ...
/usr/lib/python3/dist-packages/mistune0.py:435: SyntaxWarning:
invalid escape sequence '\|'
cells[i][c] = re.sub('\\\\\|', '|', cell)
We believe that the bug you reported is fixed in the latest version of mistune0, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 979225@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Alexandre Detiste <tchet@debian.org> (supplier of updated mistune0 package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Sat, 06 Sep 2025 13:53:14 +0200 Source: mistune0 Architecture: source Version: 0.8.4-5 Distribution: unstable Urgency: medium Maintainer: Debian Python Team <team+python@tracker.debian.org> Changed-By: Alexandre Detiste <tchet@debian.org> Closes: 979225 1114208 Changes: mistune0 (0.8.4-5) unstable; urgency=medium . * Team upload. * Fix compatibility with Pytest 8.4 (Closes: #1114208) * Fix SyntaxWarning (Closes: #979225) * Use dh-sequence-python3 Checksums-Sha1: 22cc0c693cb2e6d736f36510b951eee4e856dd7f 2028 mistune0_0.8.4-5.dsc 66025173336ff32a78d30fe7c68db906f03deae1 14208 mistune0_0.8.4-5.debian.tar.xz 69840855c9c06770d3166812108730b0d3614929 6885 mistune0_0.8.4-5_source.buildinfo Checksums-Sha256: 7f007f9ca8c0c2f071de810d0a655bfa53465874abae063fba4b4f22be3bcab6 2028 mistune0_0.8.4-5.dsc 88770c770ccafb47af3fe585c7935634e87412f1875ea88f6ffab9f229e6f408 14208 mistune0_0.8.4-5.debian.tar.xz cc6bc2652a4180331fb0bf3e92d78d90efe6645d50271f5d3809fabd9db3503e 6885 mistune0_0.8.4-5_source.buildinfo Files: a5d7e073ff3cf5325c380e45a4d0663c 2028 python optional mistune0_0.8.4-5.dsc 54d9586291a02b6f08e00962b766e51c 14208 python optional mistune0_0.8.4-5.debian.tar.xz 3b6b2315e77c5ed7f0d621e40ddc591b 6885 python optional mistune0_0.8.4-5_source.buildinfo -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEEj23hBDd/OxHnQXSHMfMURUShdBoFAmi8IWURHHRjaGV0QGRl Ymlhbi5vcmcACgkQMfMURUShdBpTqw//QhQlMzQBFHPYTX1+E+np31afS1zuTlrr OK/bpL496HpexF85hiSMvLFZWL97DLHy8Mr6iceT0ebMjwesaF9IeHEvL8rHV2vp FHJWkpCgaacOnO8wyc9tDsOlBi6o2XxlHhe6EG9TacLTg0Sh0K92syQyt3VbduVt dj+K9SnI/tPhZYgVOtTxp9B1loGjtlKxu9XdunAc7nV9gSxZhIhoQCaSFolD3xIb 2kXkqxPmUkUQsO/PdZFAL0qdvAQHVmnuMl3acO7Fbf8a0Hy/KevHrD9FGtmXtQa3 YeR2LET7N7ojnE9JoZImVgV6PDoO9kI7qwgcnsGfw+uwfp7h7W5e5PQ92PBtz48J 2qwde2bdFQiwkJ9vwDZTnnM/cYCt6QxckyVvP89eFaKRDHkSLXq2FfpLSiHITO3n D13oPoB8MCwcttoCZCDwCIJcCgUl6S/Hewb54K+9tNSOkuyYHDJq5HVaKIdMkN3B BLHL9rhcrLisiusQoM7CpOycEihVeT2gol2JEDjoibD1ctY0IopMINwsFXdHMC0l k53AsVh8MtwWsOm7Jfh6gP+qTnG1aclHjoYzJI8wcS34dI2dB5g9LHyiNVAw8EEb 37De4d3j/LamX7h3zdF/1uhVAa0gV0MIvknKDbUZAwfN6Ym6PHftSO5sK+BFGVyz CvrnVXDizsE= =pb46 -----END PGP SIGNATURE-----