diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 4e21cc25..73b2637c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -90,7 +90,7 @@ jobs: echo "Installing pip + wheel..." python -m pip install --upgrade pip wheel echo "Installing requirements.txt + test dependencies..." - python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=3.2.1" "weasyprint>=53.0,!=57.0,!=60.0" + python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint>=53.0,!=57.0,!=60.0" - name: Generate Valid Tests run: | @@ -151,7 +151,7 @@ jobs: echo "Installing pip + wheel..." python -m pip install --upgrade pip wheel echo "Installing requirements.txt + test dependencies..." - python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=3.2.1" "weasyprint>=53.0,!=57.0,!=60.0" + python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint>=53.0,!=57.0,!=60.0" - name: Generate Valid Tests run: | @@ -201,7 +201,7 @@ jobs: # echo "Installing pip + wheel..." # python -m pip install --upgrade pip wheel # echo "Installing requirements.txt + test dependencies..." -# python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=3.2.1" "weasyprint>=53.0,!=57.0,!=60.0" +# python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint>=53.0,!=57.0,!=60.0" # - name: Generate Valid Tests # run: | # make yestests || true diff --git a/tox.ini b/tox.ini index 1d62294a..016901e0 100644 --- a/tox.ini +++ b/tox.ini @@ -33,5 +33,5 @@ deps = pyflakes decorator dict2xml - pypdf>=3.2.1 + pypdf>=4.1.0 weasyprint>=53.0,!=57.0,!=60.0 diff --git a/xml2rfc/walkpdf.py b/xml2rfc/walkpdf.py index a74a5485..665e363d 100644 --- a/xml2rfc/walkpdf.py +++ b/xml2rfc/walkpdf.py @@ -15,7 +15,7 @@ def walk(obj, seen): dobj = {} # Direct objects iobj = [] # Indirect objects - if hasattr(obj, 'keys'): + if isinstance(obj, pypdf.generic.DictionaryObject): for key in obj.keys(): k = key[1:] if key.startswith('/') else key d, i = walk(obj[key], seen)