Kozea / WeasyPrint

The awesome document factory
https://weasyprint.org
BSD 3-Clause "New" or "Revised" License
7.23k stars 686 forks source link

adapt to pydyf v0.11.0 to avoid TypeError: PDF.__init__() takes 1 positional argument but 3 were given #2205

Closed teese closed 4 months ago

teese commented 4 months ago

A few days ago in an update to 0.11.0, pydyf removed the version and identifier parameters from their PDF class: Here's the commit: https://github.com/CourtBouillon/pydyf/commit/15a4625f9f010e42b43643b55514b03823c601d2

I assume pydyf doesn't use semantic versioning, because this looks like a breaking change to me.

My current version of weasyprint (59.0) now gives an error "TypeError: PDF.init() takes 1 positional argument but 3 were given"

I assume this is due to line 120 of weasyprint/pdf/init.py, which includes both a version and identifier. pdf = pydyf.PDF((version or '1.7'), identifier)

grewn0uille commented 4 months ago

Hi,

That’s a duplicate of #2204, #2203, #2202 and #2200.