Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.11.0 not backwards compatible with 0.10.0 desipite semver #29

Closed
guneemwelloeux opened this issue Aug 27, 2024 · 3 comments
Closed

0.11.0 not backwards compatible with 0.10.0 desipite semver #29

guneemwelloeux opened this issue Aug 27, 2024 · 3 comments

Comments

@guneemwelloeux
Copy link

According to semantic versioning, 0.11.0 is supposed to be compatible with 0.10.0, but a non-compatible change was introduced, leading to client code failing:

File "/usr/local/lib/python3.9/site-packages/weasyprint/pdf/__init__.py", line 127, in generate_pdf
    pdf = pydyf.PDF((version or '1.7'), identifier)
TypeError: __init__() takes 1 positional argument but 3 were given

This version should really have been labelled 1.0.0, and should be pulled from PyPI.

@liZe
Copy link
Member

liZe commented Aug 27, 2024

Hi!

Thanks for the report. This has been already been discussed in #27.

According to semantic versioning, 0.11.0 is supposed to be compatible with 0.10.0

That’s not true: 0.x.y versions the public API SHOULD NOT be considered stable. Moreover, this API had already been marked as deprecated in version 0.10.0.

@liZe liZe closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2024
@MarekSuchanek
Copy link

MarekSuchanek commented Nov 28, 2024

If this project/package is not stable, then maybe other projects like https://github.com/Kozea/WeasyPrint should not rely on this at all or must use ONLY exact version match... Shall I report it there?

It seems that you @liZe do there the exact opposite for some reason (Kozea/WeasyPrint@33763ad)... Now when someone needs to install an older version, gets runtime errors 👏🏻

@liZe
Copy link
Member

liZe commented Nov 29, 2024

It seems that you @liZe do there the exact opposite for some reason (Kozea/WeasyPrint@33763ad)... Now when someone needs to install an older version, gets runtime errors 👏🏻

This has been discussed in Kozea/WeasyPrint#2297: adding upper bounds for dependencies created more problems than the ones it solved. We only support the latest stable version of WeasyPrint, so if users want to pin an older version of WeasyPrint, they may have to pin some older versions of its dependencies too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants