Bug 247191 - deskutils/py-vdirsyncer-0.16.8 requires an older version of devel/py-click
Summary: deskutils/py-vdirsyncer-0.16.8 requires an older version of devel/py-click
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bartek Rutkowski
Keywords: needs-patch
Depends on:
Reported: 2020-06-12 03:57 UTC by Simeon Simeonov
Modified: 2020-06-26 17:36 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (robak)


Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Simeonov 2020-06-12 03:57:31 UTC
After installing and running vdirsyncer one gets:
$ /usr/local/bin/vdirsyncer -vdebug sync

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (Click 7.0 (/usr/local/lib/python3.8/site-packages), Requirement.parse('click<6.0,>=5.0'), {'vdirsyncer'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/vdirsyncer", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'click<6.0,>=5.0' distribution was not found and is required by vdirsyncer

I guess some RUN_DEPENDS may be used, but running click 5 and 7 at the same time
is not a good option for many,
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-06-15 03:11:47 UTC
Currently the port declares:

  py37-click>=5.0 : devel/py-click@py37

Whereas upstream (setup.py) declares:


Ports MUST exactly match the dependencies declared by the upstream package [1]. Doing so also allows maintainers of ports that other ports depene on to easily audit consumers for incompatible version specs and address the issue proactively, before these failures impact users.

See also section on Modifying dependencies (which may apply in cases where upstreams declare "<X" and you would like to modify/remove that)

All the other dependencies declared by deskutils/py-vdirsyncer should be audited against upstream <version-spec> declarations and updated to match.

[1] https://wiki.freebsd.org/Python/PortsPolicy#Dependencies
Comment 2 commit-hook freebsd_committer 2020-06-26 17:34:19 UTC
A commit references this bug:

Author: rigoletto
Date: Fri Jun 26 17:34:06 UTC 2020
New revision: 540535
URL: https://svnweb.freebsd.org/changeset/ports/540535

  deskutils/py-vdirsyncer: Add compatibility with latest py-click.

  - vdirsyncer was failing at runtime due to requering
    a outdated py-click version.

  PR:		247191
  Reported by:	Simeon Simeonov <sgs@pichove.org>

Comment 3 Alexandre C. Guimarães freebsd_committer 2020-06-26 17:36:19 UTC
Thanks! :-)