binary_stream cannot be imported from fastimport (the other project removed that function)

Bug #1314771 reported by Zygmunt Krynicki
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr-fastimport (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Running bzr fast-export I get (see below). Some poking around changelogs for python-fastimport seems to show that some methods were removed and supposedly moved to the bzr-fastimport plugin but that is not the case in lp:bzr-fastimport. This effectively breaks all bzr-exporters from working.

bzr: ERROR: exceptions.ImportError: cannot import name binary_stream

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/fastimport/cmds.py", line 693, in run
    from bzrlib.plugins.fastimport import exporter
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/fastimport/exporter.py", line 67, in <module>
    from fastimport.helpers import (
ImportError: cannot import name binary_stream

bzr 2.7.0dev1 on python 2.7.6 (Linux-3.13.0-24-generic-x86_64-with-
    Ubuntu-14.10-utopic)
arguments: ['/usr/bin/bzr', 'fast-export', '--quiet', '--plain', '--marks',
    '.git/launchpad/bzr.+upstream.marks', '--git-branch',
    'launchpad/+upstream', '.git/launchpad/repo/+upstream']
plugins: bash_completion[2.7.0dev1], builddeb[2.8.6], builder[0.7.3],
    bzrtools[2.6.0], changelog_merge[2.7.0dev1], fastimport[0.13.0],
    grep[2.7.0dev1], launchpad[2.7.0dev1], netrc_credential_store[2.7.0dev1],
    news_merge[2.7.0dev1], po_merge[2.7.0dev1], qbzr[0.23.1],
    rewrite[0.6.4dev], weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'pl_PL.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: bzr-fastimport 0.13.0-4
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Apr 30 20:49:27 2014
InstallationDate: Installed on 2014-01-15 (104 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140115)
PackageArchitecture: all
SourcePackage: bzr-fastimport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've fixed (and verified) this locally. Attaching debdiff

Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff of the fixed package" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Daniel Holbach (dholbach) wrote :

Jelmer: is this something which could be fixed/changed upstream?

Revision history for this message
Daniel Holbach (dholbach) wrote :

Sorry. I misunderstood the problem at hand.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Daniel, Zygmunt,

These functions have been removed in python-fastimport, as they did not belong in python-fastimport. Since they are bzr-fastimport specific, they should be added to bzr-fastimport instead. This should not be significantly more work than adding an ubuntu-specific patch to python-fastimport that reverts the original changes.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bzr-fastimport (Ubuntu):
status: New → Confirmed
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.