Update GS JPEG corruption warning for 10.7.0+

The JPEG truncation bug (1-15 bytes) persists in Ghostscript 10.7.0.
Update the warning message to show the actual GS version instead of
hardcoding "10.6.x", and remove the stale date reference. Also make
the test warning filter match the new message format.
This commit is contained in:
James R. Barlow
2026-04-04 01:59:57 -07:00
parent 7fdeeb3635
commit 83c04e6399
2 changed files with 7 additions and 10 deletions
+3 -6
View File
@@ -19,14 +19,11 @@ from ocrmypdf.exceptions import ExitCode
class Gs106WarningFilter(logging.Filter):
"""Filter out expected Ghostscript 10.6.x warning from test logs."""
"""Filter out expected Ghostscript 10.6+ JPEG encoding warning from test logs."""
def filter(self, record: logging.LogRecord) -> bool:
# Allow all records except the expected Ghostscript 10.6.x warning
return (
"Ghostscript 10.6.x contains JPEG encoding errors"
not in record.getMessage()
)
# Allow all records except the expected Ghostscript 10.6+ warning
return "contains JPEG encoding errors" not in record.getMessage()
@pytest.fixture(autouse=True)