diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b976edcd..5ed0c126 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -102,7 +102,7 @@ jobs: echo "Installing pip + wheel..." python -m pip install --upgrade pip wheel echo "Installing test dependencies..." - python -m pip install tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==61.2" "pydyf<0.10.0" + python -m pip install tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==64.1" - name: Generate Valid Tests run: | @@ -158,7 +158,7 @@ jobs: echo "Installing pip + wheel..." python -m pip install --upgrade pip wheel echo "Installing test dependencies..." - python -m pip install tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==61.2" "pydyf<0.10.0" + python -m pip install tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==64.1" - name: Generate Valid Tests run: | diff --git a/pyproject.toml b/pyproject.toml index 8286df9a..790d8ff9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ documentation = "https://ietf-tools.github.io/xml2rfc/" issues = "https://github.com/ietf-tools/xml2rfc/issues" [project.optional-dependencies] -pdf = ["weasyprint==61.2", "pydyf<0.10.0"] +pdf = ["weasyprint==64.1"] [project.scripts] xml2rfc = "xml2rfc.run:main" diff --git a/tox.ini b/tox.ini index a93f1f82..ffec28b3 100644 --- a/tox.ini +++ b/tox.ini @@ -36,5 +36,4 @@ deps = decorator dict2xml pypdf>=4.1.0 - weasyprint==61.2 - pydyf<0.10.0 + weasyprint==64.1 diff --git a/xml2rfc/writers/pdf.py b/xml2rfc/writers/pdf.py index ca9cb77b..a895e677 100644 --- a/xml2rfc/writers/pdf.py +++ b/xml2rfc/writers/pdf.py @@ -42,27 +42,20 @@ def __init__(self, xmlrfc, quiet=None, options=default_options, date=None): logging.basicConfig(level=logging.INFO) - # Weasyprint logger - wplogger = logging.getLogger('weasyprint') - if self.options.quiet: - wplogger.setLevel(logging.CRITICAL) - elif self.options.verbose: - wplogger.setLevel(logging.WARNING) - elif self.options.debug: - wplogger.setLevel(logging.DEBUG) - else: - wplogger.setLevel(logging.ERROR) - - # fontTools logger - ftlogger = logging.getLogger('fontTools') - if self.options.quiet: - ftlogger.setLevel(logging.CRITICAL) - elif self.options.verbose: - ftlogger.setLevel(logging.WARNING) - elif self.options.debug: - ftlogger.setLevel(logging.DEBUG) - else: - ftlogger.setLevel(logging.ERROR) + loggers = [] + loggers.append(logging.getLogger("weasyprint")) + loggers.append(logging.getLogger("fontTools.subset")) + loggers.append(logging.getLogger("fontTools.ttLib")) + loggers.append(logging.getLogger("fontTools.varlib")) + for _logger in loggers: + if self.options.quiet: + _logger.setLevel(logging.CRITICAL) + elif self.options.verbose: + _logger.setLevel(logging.WARNING) + elif self.options.debug: + _logger.setLevel(logging.DEBUG) + else: + _logger.setLevel(logging.ERROR) def pdf(self): if not weasyprint: