https://gitlab.com/pdftools/pdfposter/-/issues/21 https://gitlab.com/pdftools/pdfposter/-/issues/23 https://gitlab.com/pdftools/pdfposter/-/merge_requests/7 --- dev-requirements.txt.orig 2022-11-04 13:06:05.000000000 -0500 +++ dev-requirements.txt 2024-03-14 17:14:14.000000000 -0500 @@ -2,7 +2,7 @@ setuptools wheel -PyPDF2 +pypdf # for testing reportlab --- pdftools/pdfposter/__init__.py.orig 2022-11-04 13:06:05.000000000 -0500 +++ pdftools/pdfposter/__init__.py 2024-03-14 17:14:14.000000000 -0500 @@ -24,9 +24,9 @@ __license__ = "SPDX-License-Identifier: GPL-3.0-or-later" __version__ = "0.8.1" -from PyPDF2 import PdfWriter, PdfReader, PageObject -from PyPDF2.types import NameObject -from PyPDF2.generic import ContentStream, RectangleObject, IndirectObject +from pypdf import PdfWriter, PdfReader, PageObject +from pypdf.types import NameObject +from pypdf.generic import ContentStream, RectangleObject, IndirectObject import logging from logging import log --- pdftools/pdfposter/cmd.py.orig 2022-11-04 13:06:05.000000000 -0500 +++ pdftools/pdfposter/cmd.py 2024-03-14 17:17:14.000000000 -0500 @@ -27,7 +27,7 @@ from . import main, __version__, DEFAULT_MEDIASIZE, papersizes, DecryptionError import re -import PyPDF2.errors +import pypdf.errors import argparse # pattern for parsing user textual box spec @@ -192,7 +192,7 @@ main(args, infilename=args.infilename, outfilename=args.outfilename) except DecryptionError as e: raise SystemExit(str(e)) - except PyPDF2.errors.PdfReadError as e: + except pypdf.errors.PdfReadError as e: parser.error('The input-file is either currupt or no PDF at all: %s' % e) --- setup.cfg.orig 2022-11-04 13:06:05.000000000 -0500 +++ setup.cfg 2024-03-14 17:14:14.000000000 -0500 @@ -57,7 +57,7 @@ include_package_data = True zip_safe = True install_requires = - PyPDF2 >= 2.1.1, < 3 + pypdf >= 3.0 [options.entry_points] console_scripts = --- test/functional/test_end_to_end.py.orig 2022-11-04 13:06:05.000000000 -0500 +++ test/functional/test_end_to_end.py 2024-03-14 17:17:56.000000000 -0500 @@ -19,13 +19,13 @@ import os, sys from pdftools.pdfposter import cmd -import PyPDF2 +import pypdf CHESSBOARD = os.path.join(os.path.dirname(__file__), '..', 'chessboard.pdf') def get_num_pages(filename): with open(filename, 'rb') as fh: - reader = PyPDF2.PdfReader(fh) + reader = pypdf.PdfReader(fh) return len(reader.pages) def test_without_options(tmpdir): --- test/gen-allboxespage.py.orig 2022-11-04 13:06:05.000000000 -0500 +++ test/gen-allboxespage.py 2024-03-14 17:14:14.000000000 -0500 @@ -37,8 +37,8 @@ from reportlab.lib.pagesizes import A4, legal, landscape from reportlab.pdfgen.canvas import Canvas -from PyPDF2 import PdfFileWriter, PdfFileReader -from PyPDF2.generic import RectangleObject +from pypdf import PdfFileWriter, PdfFileReader +from pypdf.generic import RectangleObject def draw_box(canvas, color, x,y, width,height, text=None): canvas.setStrokeColorRGB(*color) --- test/gen-trimmedpage.py.orig 2022-11-04 13:06:05.000000000 -0500 +++ test/gen-trimmedpage.py 2024-03-14 17:14:14.000000000 -0500 @@ -40,8 +40,8 @@ from reportlab.lib.pagesizes import A4, legal, landscape from reportlab.pdfgen.canvas import Canvas -from PyPDF2 import PdfFileWriter, PdfFileReader -from PyPDF2.generic import RectangleObject +from pypdf import PdfFileWriter, PdfFileReader +from pypdf.generic import RectangleObject def draw_box(canvas, color, x,y, width,height, text=None): canvas.setStrokeColorRGB(*color)