Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 807769 - dev-python/weasyprint-53.0: No module named...
Summary: dev-python/weasyprint-53.0: No module named...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL: https://github.com/Kozea/WeasyPrint/i...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-11 22:23 UTC by EK
Modified: 2021-08-29 18:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EK 2021-08-11 22:23:53 UTC
After updating from weasyprint-52.5 that worked fine, new version (53) failed to start:

# /usr/bin/python3 -m weasyprint.tools.navigator'
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3.9/site-packages/weasyprint/__init__.py", line 322, in <module>
    from .css import preprocess_stylesheet  # noqa isort:skip
  File "/usr/lib/python3.9/site-packages/weasyprint/css/__init__.py", line 27, in <module>
    from . import computed_values, counters, media_queries
  File "/usr/lib/python3.9/site-packages/weasyprint/css/computed_values.py", line 16, in <module>
    from ..text.ffi import ffi, pango, units_to_double
ModuleNotFoundError: No module named 'weasyprint.text'

As this situation way similar to reported in #806788, following recommendations, and attempt to install dev-python/pyproject2setuppy-18 and rebuild weasyprint was taken, but it appeared that there's no 'weasyprint.tools.navigator' after installation of version 53:

# /usr/bin/python3 -m weasyprint.tools.navigator'
/usr/lib/python-exec/python3.9/python3: Error while finding module specification for 'weasyprint.tools.navigator' (ModuleNotFoundError: No module named 'weasyprint.tools')
Comment 1 Aaron W. Swenson gentoo-dev 2021-08-12 13:13:54 UTC
(In reply to EK from comment #0)
> After updating from weasyprint-52.5 that worked fine, new version (53)
> failed to start:
> 
> # /usr/bin/python3 -m weasyprint.tools.navigator'...

It was removed by upstream. I've opened a bug about this because it looks like it was removed in error.

https://github.com/Kozea/WeasyPrint/issues/1422
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-08-12 14:02:40 UTC
I'm not using this thing.  Could you judge whether this is critical enough to justify package.mask/
Comment 3 EK 2021-08-12 14:42:33 UTC
We run weasyprint as a service daemon (in order not to call binaries from web scripts but instead use TCP socket) and absence of weasyprint.tools.navigator makes it completely unusable. Thus, IMHO it's critical enough.

It's still possible to use weasyprint from command line to capture web pages, however, so for certain cases current version will do. 

Another problem is that ebuilds for previous version (weasyprint-52.5) that was stable, are already removed, so masking current version requires reverting ebuild for previous one
Comment 4 Guillaume Ayoub 2021-08-13 13:03:38 UTC
(I’m a member of CourtBouillon, WeasyPrint’s maintainer.)

weasyprint.tools included code that was originally written to "play" (according to the documentation). It’s been removed from version 53 because it relies on features (namely PNG export) that’s not available in WeasyPrint anymore.

So, even if the use case was an interesting way to use these tools, this code is not and won’t be available in WeasyPrint 53+. WeasyPrint’s documentation will be updated accordingly (see https://github.com/Kozea/WeasyPrint/issues/1422).

Sorry for the inconvenience.
Comment 5 Aaron W. Swenson gentoo-dev 2021-08-29 18:35:30 UTC
(In reply to Guillaume Ayoub from comment #4)