move of bzrlib.util.bencode into bzrlib.bencode breaks bzr-gtk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Bazaar |
High
|
Unassigned | ||
| Bazaar GTK+ Frontends |
Undecided
|
Jelmer Vernooij |
Bug Description
In revision
4410 revid:<email address hidden>
of bzr.dev, bencode.py moved from bzrlib.util to bzrlib. Thus, code like:
commit.py:from bzrlib.util import bencode
revisionview.
of bzr-gtk breaks. bzr-gtk needs an update, or bzrlib needs a backward compatibility feature...
Related branches
- Andrew Bennetts: Approve on 2009-06-09
- Diff: 43 lines
tags: | added: mysql |
GuilhemBichot (guilhem-bichot) wrote : | #1 |
Changed in bzr-gtk: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
status: | New → Fix Released |
GuilhemBichot (guilhem-bichot) wrote : | #2 |
Hi Jelmer. Probably not a complete fix: after pulling bzr-gtk (revno 644), I still see
./revisionview.
./tests/
./tests/
./tests/
For example "bzr gmissing" fails.
John A Meinel (jameinel) wrote : | #3 |
I did submit: https:/
which would at least allow backwards compatibility. It will cause DeprecationWarnings in development versions (those are suppressed in release versions).
Of course, ProgressBarStack has been deprecated since 1.12, and bzr-gtk still used it...
Anyway, changing the imports is the 'correct' thing to do, I just thought I'd mention that likely 1.16 will have backwards compatibility anyway.
Changed in bzr: | |
importance: | Undecided → High |
milestone: | none → 1.16 |
status: | New → Fix Committed |
Jonathan Lange (jml) wrote : | #4 |
Looks like this has landed on trunk already.
Changed in bzr: | |
status: | Fix Committed → Fix Released |
I had to do such fix in our MySQL-internal plugin:
-from bzrlib.util import bencode
+try:
+ from bzrlib import bencode
+except ImportError: # bencode was in "util" in the past
+ from bzrlib.util import bencode
because it has to work with pre-rename and post-rename bzr (colleagues may upgrade our plugin without upgrading bzr).
Maybe bzr-gtk needs to do the same?