pip install breezy does not install dulwich

Bug #1796215 reported by Aaron Bentley on 2018-10-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jelmer Vernooij

Bug Description

$ pip install breezy
Collecting breezy
  Downloading https://files.pythonhosted.org/packages/1a/40/ed59d795e695441ea30704db38078f0d570893265486edbc609a46241512/breezy-3.0a1.tar.gz (9.1MB)
    100% |████████████████████████████████| 9.1MB 142kB/s
Collecting configobj (from breezy)
  Downloading https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz
Collecting six>=1.9.0 (from breezy)
  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Building wheels for collected packages: breezy, configobj
  Running setup.py bdist_wheel for breezy ... done
  Stored in directory: /home/abentley/.cache/pip/wheels/64/75/f9/e714dc8b6c16c89e6dd834dfe28cc723f0f4a3f9c38a331d75
  Running setup.py bdist_wheel for configobj ... done
  Stored in directory: /home/abentley/.cache/pip/wheels/f1/e4/16/4981ca97c2d65106b49861e0b35e2660695be7219a2d351ee0
Successfully built breezy configobj
Installing collected packages: six, configobj, breezy
Successfully installed breezy-3.0a1 configobj-5.0.6 six-1.11.0

$ cd ssimwave/big
abentley@skinny:~/ssimwave/big$ brz info
brz: ERROR: Unable to import library "dulwich": bzr-git: Please install dulwich, https://www.dulwich.io/
$ pip install dulwich
Collecting dulwich
  Downloading https://files.pythonhosted.org/packages/fc/1b/c499026353d48cbf45e325017da2246110802c5095c99c903cb70ba68102/dulwich-0.19.6.tar.gz (349kB)
    100% |████████████████████████████████| 358kB 1.8MB/s
Collecting urllib3>=1.21 (from dulwich)
  Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl
Collecting certifi (from dulwich)
  Using cached https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl
Building wheels for collected packages: dulwich
  Running setup.py bdist_wheel for dulwich ... done
  Stored in directory: /home/abentley/.cache/pip/wheels/d3/1f/0f/381ad5c2e1e8cb4e5e5c6cf385475a0921f880b1aac56afa81
Successfully built dulwich
Installing collected packages: urllib3, certifi, dulwich
Successfully installed certifi-2018.8.24 dulwich-0.19.6 urllib3-1.23
$ brz info
brz: ERROR: KeyError: 'cc908f20046b3d116725d4c248c5faf7a3eb70e0'

Traceback (most recent call last):
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/commands.py", line 1009, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/commands.py", line 1194, in run_bzr
    ret = run(*run_argv)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/commands.py", line 760, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/commands.py", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/commands.py", line 1211, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/builtins.py", line 1844, in run
    verbose=noise_level, outfile=self.outf)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/info.py", line 354, in show_bzrdir_info
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/git/dir.py", line 593, in open_workingtree
    return GitWorkingTree(self, repo, branch)
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/git/workingtree.py", line 122, in __init__
  File "/home/abentley/.local/lib/python2.7/site-packages/breezy/git/workingtree.py", line 677, in _reset_data
    self.store.__getitem__, self.store[head].tree)
  File "/home/abentley/.local/lib/python2.7/site-packages/dulwich/object_store.py", line 119, in __getitem__
    type_num, uncomp = self.get_raw(sha)
  File "/home/abentley/.local/lib/python2.7/site-packages/dulwich/object_store.py", line 461, in get_raw
    raise KeyError(hexsha)
KeyError: 'cc908f20046b3d116725d4c248c5faf7a3eb70e0'

Related branches

Jelmer Vernooij (jelmer) on 2018-10-05
Changed in brz:
status: New → Triaged
importance: Undecided → High
milestone: none → 3.0.0
Jelmer Vernooij (jelmer) wrote :

So "pip install breezy[git]" will install Dulwich as well. Perhaps it makes sense to just always install Dulwich so things work out of the box. mgz, do you have thoughts?

It looks like there is a good way to set a default set of extras that users can opt out of: https://github.com/pypa/setuptools/issues/1139

Aaron Bentley (abentley) wrote :

I got the distinct impression that git support was built in. If you want git support to be optional, I recommend making it a plugin.

On Fri, Oct 05, 2018 at 03:10:34AM -0000, Aaron Bentley wrote:
> I got the distinct impression that git support was built in. If you
> want git support to be optional, I recommend making it a plugin.
It is indeed built in, but in order to use it you do need dulwich
installed - much in the same way that you can run bzr without
testtools, but need to install testtools to run the tests.

I think it would make sense to just make dulwich a mandatory
dependency, if we think git usage is common enough. The overhead of
installing it is minimal.

Jelmer Vernooij <email address hidden>
PGP Key: https://www.jelmer.uk/D729A457.asc

Aaron Bentley (abentley) wrote :

I know that it is built in. I'm suggesting that if you want it to be optional, you make it a plugin, because otherwise you have to explain builtin-but-not-enabled clearly so that people aren't surprised when it isn't available out-of-the-box.

But I would rather it was built in and worked out-of-the-box.

Jelmer Vernooij (jelmer) on 2018-10-05
Changed in brz:
assignee: nobody → Jelmer Vernooij (jelmer)
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer) on 2018-10-13
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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