New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traceback parsing changes in 2.15.0 error on valid pycon code blocks #2407
Comments
Thanks for reporting! On a note, though, does CPython not pin Pygments and other dependencies in its CI? I would have expected it, for such a large project where keeping a working CI is critical... |
The direct dependencies are mostly pinned (https://github.com/python/cpython/blob/c3cd3d10788769558a4668e9e5cfff42fe377852/Doc/requirements.txt) but pygments is an indirect dependency, of Sphinx (https://github.com/sphinx-doc/sphinx/blob/2c83af0aab7080e0b78d4a16981eed878b2cac4c/pyproject.toml#L65). |
OK, although it could use a lock file, or the sort-of-lockfile substitute given by |
Yeah, we definitely keep the direct deps pinned; this is just the first time we've seen this issue with the transitive deps and it wouldn't necessarily work cross platform if any of the transitive deps are conditional, and it also work would with other package managers like Conda. AFAIK this is the first time I can recall that we've seen this sort of breakage before from a non-direct dep. Also, the docs build server runs on a whole separate system (AFAIK) that I think is all pinned down, so not sure it would help the actual production builds right now anyway. |
La última versión de Pygments está provocando errores al parsear código de python que es válido. Esto ya ha sido reportado en pygments/pygments#2407, sólo hace falta esperar por el fix, y mientras tanto evitar usar esta nueva versión. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
La última versión de Pygments está provocando errores al parsear código de python que es válido. Esto ya ha sido reportado en pygments/pygments#2407, sólo hace falta esperar por el fix, y mientras tanto evitar usar esta nueva versión. Este problema fue visto en #2372 por primera vez, pero de hecho ya nos está afectando: el último build en CI de `3.11` ya falló por la misma razón. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
…be valid which causes Error to be flagged with output that just happens to look like a traceback Fixes #2407
Fix in #2410 - please try. In general, 2.15 is still better behaved than older versions, which silently swallowed part of the output, as you can see e.g. here:
Note the single "Traceback" line. |
which causes Error to be flagged with console outputs that just happen to look like a traceback Fixes #2407
See also #2411 |
Thanks @birkenfeld & @jeanas for the quick fix! Looks like that at least fixes the error and restores syntax highlighting on the block. It does look a bit odd that all three Any idea when the next release containing this fix will be released? If its soon, we can skip backporting the change to the older security-only CPython branches and just wait for the new version to be released. A lockfile would be nice longer term, but unfortunately, its not quite as simple as just having our GH Actions jobs use it, as the actual production docs site and other docs formats are currently produced by a separately managed build server with its own maintainers, scripts and configuration that would need to be investigated, modified, tested and deployed. |
(Sorry, accidentally hit the submit shortcut before I was done writing it)
Unfortunately, the traceback parsing changes to fix #2226 and #2329 implemented in fe42aac (I can't seem to find the associated pull request) appears to result in Pygments treating certain valid code blocks as invalid, issuing a warning and failing Sphinx builds (with
-W
). In particular, this occurred on the following code block in the CPython'smultiprocessing
module docs:that worked in 2.14.9, which when 2.15.0 was released suddenly broke the CPython Docs CI job with the error:
Here's a more minimal example that also doesn't parse:
This also occurs with an explicit
pycon
lexer specified:and also with arbitrary text after the traceback line:
While this example parses:
Here's an example of a failing run.
The text was updated successfully, but these errors were encountered: