Bug 1655540 - python-xhtml2pdf: Remove (sub)packages from Fedora 30+: python2-xhtml2pdf
Summary: python-xhtml2pdf: Remove (sub)packages from Fedora 30+: python2-xhtml2pdf
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-xhtml2pdf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PY2REMOVAL
TreeView+ depends on / blocked
 
Reported: 2018-12-03 12:06 UTC by Miro Hrončok
Modified: 2019-01-09 14:02 UTC (History)
7 users (show)

Fixed In Version: python-xhtml2pdf-0.1a2-11.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-09 14:02:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2018-12-03 12:06:50 UTC
In line with the Mass Python 2 Package Removal [0], the following (sub)packages of python-xhtml2pdf were marked for removal:

 * python2-xhtml2pdf

According to our query, those (sub)packages only provide a Python 2 importable module. If this is not true, please tell us why, so we can fix our query.

Please remove them from your package.

As said in the change document, if there is no objection in a week, we will remove the package(s) as soon as we get to it. This change might not match your packaging style, so we'd prefer if you did the change. If you need more time, please let us know here.

If you do the change yourself, it would help us a lot by reducing the amount of packages we need to mass change.

We hope this doesn't come to you as a surprise. If you want to know our motivation for this, please read the change document [0].

[0] https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

Comment 1 Miro Hrončok 2018-12-03 12:13:44 UTC
Note that the package contains:

/usr/bin/pisa-2.7
/usr/bin/xhtml2pdf-2.7


I've evaluate those redundant (they do the same thing as pisa and xhtml2pdf).

https://xhtml2pdf.readthedocs.io/en/latest/usage.html#using-in-command-line

Also note that /usr/bin/xhtml2pdf (pisa) is link to /usr/bin/xhtml2pdf-2 (pisa-2) but it is in the python3  package.

$ file /usr/bin/xhtml2pdf 
/usr/bin/xhtml2pdf: broken symbolic link to ./xhtml2pdf-2
$ file /usr/bin/pisa
/usr/bin/pisa: broken symbolic link to ./pisa-2


Also, the package is broken:

$ xhtml2pdf-3.7 --help
Traceback (most recent call last):
  File "/usr/bin/xhtml2pdf-3.7", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3112, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3096, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3125, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 578, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 895, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 781, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyPdf2' distribution was not found and is required by xhtml2pdf

$ sudo dnf install 'python3dist(pypdf2)'
...

$ xhtml2pdf-3.7 --help
Traceback (most recent call last):
  File "/usr/bin/xhtml2pdf-3.7", line 11, in <module>
    load_entry_point('xhtml2pdf==0.1a2', 'console_scripts', 'xhtml2pdf')()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 484, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2714, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2332, in load
    return self.resolve()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2338, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.7/site-packages/xhtml2pdf/pisa.py", line 19, in <module>
    from xhtml2pdf.document import pisaDocument
  File "/usr/lib/python3.7/site-packages/xhtml2pdf/document.py", line 4, in <module>
    from xhtml2pdf.context import pisaContext
  File "/usr/lib/python3.7/site-packages/xhtml2pdf/context.py", line 30, in <module>
    import xhtml2pdf.parser
  File "/usr/lib/python3.7/site-packages/xhtml2pdf/parser.py", line 17, in <module>
    from html5lib import treebuilders, inputstream
ImportError: cannot import name 'inputstream' from 'html5lib' (/usr/lib/python3.7/site-packages/html5lib/__init__.py)


Note You need to log in before you can comment on or make changes to this bug.