[patch] adjust dependencies for python-ectd and patroni

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[patch] adjust dependencies for python-ectd and patroni

Denis Laxalde
Hi,

I noticed two issues with patroni and python3-etcd packages in CentOS7.

First, the python3-etcd package, installed alone without patroni, is
missing some dependencies:

    $ /usr/bin/python3.6 -m pydoc etcd
    problem in etcd - ModuleNotFoundError: No module named 'dns'

then installing python36-dns:

    $ /usr/bin/python3.6 -m pydoc etcd
    problem in etcd - ModuleNotFoundError: No module named 'urllib3'

Then, the base patroni package is missing the urllib3 dependency:

    $ patronictl --help
    Traceback (most recent call last):
      File "/usr/bin/patronictl", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3095, in <module>
        @_call_aside
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in _build_master
        ws.require(__requires__)
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 888, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'urllib3[secure]!=1.21,>=1.19.1' distribution was not found and is required by patroni
    $ /usr/bin/python3.6 -m pydoc patroni.api
    problem in patroni.api - ModuleNotFoundError: No module named 'urllib3'

This would be pulled by patroni-etcd, but I believe the dependency
belongs to the base package.

I suggest the attached two patches to fix these issues.

Thanks,
Denis

0001-Add-urllib3-and-dns-dependencies-to-python-etcd.patch (1K) Download Attachment
0002-Move-urllib3-dependencies-to-patroni-base-package.patch (2K) Download Attachment