From 26470fe16a257c665a260eb509db5edabd189288 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 12 Feb 2024 01:17:08 -0800 Subject: [PATCH] Suppress reportlab deprecation warning --- pyproject.toml | 5 ++++- tests/test_rotation.py | 6 +----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 36c2e3f2..19660401 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -131,7 +131,10 @@ norecursedirs = ["lib", ".pc", ".git", "venv", "output", "cache", "resources"] testpaths = ["tests"] addopts = "-n auto" markers = ["slow"] -filterwarnings = ["ignore:.*XMLParser.*:DeprecationWarning"] +filterwarnings = [ + "ignore:.*XMLParser.*:DeprecationWarning", + 'ignore:.*ast.NameConstant.*:DeprecationWarning', +] [tool.mypy] diff --git a/tests/test_rotation.py b/tests/test_rotation.py index cac7e103..47443c4c 100644 --- a/tests/test_rotation.py +++ b/tests/test_rotation.py @@ -4,10 +4,10 @@ from __future__ import annotations import operator -import warnings from io import BytesIO from math import cos, pi, sin from os import fspath +from subprocess import run import img2pdf import pikepdf @@ -22,10 +22,6 @@ from ocrmypdf.pdfinfo import PdfInfo from .conftest import check_ocrmypdf, run_ocrmypdf_api -warnings.filterwarnings( - "ignore", category=DeprecationWarning, module="reportlab.lib.rl_safe_eval" -) - # pylintx: disable=unused-variable RENDERERS = ['hocr', 'sandwich']