From 7e1255870808e606e12cdfd445245f6acbd4bf3e Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Wed, 27 Sep 2023 22:23:04 +1300 Subject: [PATCH] chore: Restrict WeasyPrint versions WeasyPrint==60.0 is breaking tests for some Python versions. Until we figure out the issues restrict WeasyPrint==60.0. --- .github/workflows/checks.yml | 6 +++--- docker/base.Dockerfile | 2 +- setup.cfg | 2 +- tox.ini | 2 +- xml2rfc/run.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e397d5da..ba8dd860 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" + 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" - 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" + 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" - 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" +# 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" # - name: Generate Valid Tests # run: | # make yestests || true diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index da8ba667..e9be51c9 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -59,7 +59,7 @@ RUN pip3 install --upgrade \ # Install Python dependencies RUN pip3 install -r requirements.txt \ - "weasyprint>=53.0" \ + "weasyprint>=53.0,<60.0" \ decorator \ dict2xml \ "pypdf>=3.2.1" diff --git a/setup.cfg b/setup.cfg index a1e3cc30..d4dca607 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,7 +45,7 @@ console_scripts = xml2rfc = xml2rfc.run:main [options.extras_require] -pdf = weasyprint>=53.0,!=57.0 +pdf = weasyprint>=53.0,!=57.0,<60.0 [bdist_wheel] universal = 1 diff --git a/tox.ini b/tox.ini index 3ad68919..8bcd28c5 100644 --- a/tox.ini +++ b/tox.ini @@ -34,4 +34,4 @@ deps = decorator dict2xml pypdf>=3.2.1 - weasyprint>=53.0,!=57.0 + weasyprint>=53.0,!=57.0,<60.0 diff --git a/xml2rfc/run.py b/xml2rfc/run.py index d8a60195..0ec94216 100755 --- a/xml2rfc/run.py +++ b/xml2rfc/run.py @@ -87,7 +87,7 @@ def get_pdf_help(missing_libs=""): 2. Next, install weasyprint python modules using pip. - pip install 'weasyprint>=53.0' + pip install 'weasyprint>=53.0,<60.0' 3. Finally, install the full Noto Font and Roboto Mono packages: