git review 1.24 fails on OS X 10.9.2 with pkg_resources.DistributionNotFound: git-review

Bug #1337701 reported by Artem Borzilov
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
git-review
Triaged
Medium
Unassigned

Bug Description

After i updated git-review it fails with the following traceback:

air-aleksandra:rally uppi$ git review
Traceback (most recent call last):
  File "/usr/local/bin/git-review", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/git_review/cmd.py", line 1132, in main
    (os.path.split(sys.argv[0])[-1], get_version()))
  File "/Library/Python/2.7/site-packages/git_review/cmd.py", line 180, in get_version
    provider = pkg_resources.get_provider(requirement)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 197, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: git-review

After installing git-review==1.23 it works again.

Revision history for this message
chenhaiq (chenhaiq) wrote :

This is a problem in pkg_resources, and can be fixed by: sudo pip install --upgrade setuptools.
It works fine with setuptools-5.3.

Revision history for this message
Jeremy Stanley (fungi) wrote :

It looks like this is fixed by running the new setuptools 0.7 or later rather than the older distribute fork of setuptools (it can also be solved by running git-review from a relatively modern virtualenv). However, since there's no effective way to force a newer setuptools on install, the most we can hope to do is catch this exception and provide a slightly more helpful error message to the end user with relevant recommendations.

Changed in git-review:
status: New → Triaged
importance: Undecided → Medium
Changed in git-review:
assignee: nobody → Akshay Chhajed (akshaychhajedmail)
assignee: Akshay Chhajed (akshaychhajedmail) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.