Bug 425644 - bzr init fails: failed to load bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack1: cannot import name U32
bzr init fails: failed to load bzrlib.repofmt.pack_repo.RepositoryFormatKnitP...
Status: RESOLVED FIXED
: 433565 (view as bug list)
Classification: openSUSE
Product: openSUSE 11.1
Classification: openSUSE
Component: Development
Factory
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Klaus Singvogel
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-11 20:16 UTC by Felix Möller
Modified: 2008-10-28 22:14 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
output of bzr init (1.92 KB, text/plain)
2008-09-11 20:18 UTC, Felix Möller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Möller 2008-09-11 20:16:48 UTC
I just tried to use bzr on my factory Installation but it does not work.

Steps to reproduce:
$ mkdir tmp
$ cd tmp
$ bzr init

I will attach the error message to avoid wordwrap.
Comment 1 Felix Möller 2008-09-11 20:18:02 UTC
Created attachment 239172 [details]
output of bzr init
Comment 2 Felix Möller 2008-09-11 20:18:56 UTC
Klaus has most entries in the changelog ...
Comment 3 Klaus Singvogel 2008-09-12 10:54:03 UTC
I didn't have seen this message before. No experience yet.

But I already submitted new version of bzr yesterday (1.6.1), with lots of fixes, and some new features in the protocol.
But this version didn't got checkin yet. Maybe we should wait and see if this new version (protocol) helps?
Comment 4 Felix Möller 2008-09-12 11:06:43 UTC
I have tried 1.6.1 and 1.7rc1 from the homepage but they did not work either. I think 1.6.1 has the same error as 1.5 and 1.7 had a different one. Will report tonight.
Comment 5 Felix Möller 2008-09-12 17:01:13 UTC
Ok with upstream 1.6.1 I get:
fm@macbook:~/bzr-1.6.1/dir> ../install/bin/bzr init
/home/fm/bzr-1.6.1/install/lib/python2.6/site-packages/bzrlib/lazy_import.py:195: DeprecationWarning: the sha module is deprecated; use the hashlib module instead                                                                                                                      
  module = __import__(module_python_path, scope, scope, [])                                                                                 
bzr: ERROR: exceptions.TypeError: object.__init__() takes no parameters 

and with 1.7rc1 I get:
fm@macbook:~/bzr-1.7rc1/dir> ../install/bin/bzr init
/home/fm/bzr-1.7rc1/install/lib/python2.6/site-packages/bzrlib/lazy_import.py:195: DeprecationWarning: the sha module is deprecated; use the hashlib module instead                                                                                                                     
  module = __import__(module_python_path, scope, scope, [])                                                                                 
bzr: ERROR: exceptions.TypeError: object.__init__() takes no parameters 

so they are the same.
Comment 6 Felix Möller 2008-09-12 18:29:17 UTC
The U32 was removed with:
http://svn.python.org/view/python/trunk/Lib/gzip.py?rev=61821&r1=61813&r2=61821

bzr: ERROR: exceptions.TypeError: object.__init__() takes no parameters 
disappears after removing the second argument to __init__(). ;)
Comment 7 Felix Möller 2008-09-12 19:22:20 UTC
I have reported this upstream at:
https://bugs.launchpad.net/bzr/+bug/269535
Comment 8 Felix Möller 2008-09-14 11:04:29 UTC
citing from https://bugs.launchpad.net/bzr/+bug/269535/comments/7 :

 In python 2.6, it fails to call object.__init__ if parameters are
 specified but if you delete the parameters the call to __init__
 for the next base class is wrong.

 And that's only the first failing test. So in the short term,
 you'd better look at how openSuse can tie python-2.5 as a
 dependency for bzr.

 bzr currently requires python 2.4 or 2.5, obviously we *will*
 support 2.6, but we don't right now.

Klaus is there any chance to have a python 2.5? What happens if not?

I was in #bzr on freenode and the bzr guys are looking into it ...
Comment 9 Klaus Singvogel 2008-09-15 09:27:12 UTC
Felix, big thanks for working this out.

I think this is an issue in python-2.6 and not in bzr. If bzr works with python-2.4 and python-2.5, but fails with python-2.6(beta3), then python has to fix this this. Therefore I reassign this bugzilla to the python maintainer:
Jan Matejek

Jan Matejek: please fix python to become more backward compatible. Thanks in advance.
Comment 10 Jan Matejek 2008-09-15 10:11:32 UTC
(In reply to comment #9 from Klaus Singvogel)
> Felix, big thanks for working this out.
> 
> I think this is an issue in python-2.6 and not in bzr. If bzr works with
> python-2.4 and python-2.5, but fails with python-2.6(beta3), then python has to
> fix this this.

neat idea, let's extend this logic to other cases.... um, no, let's rather not extend it to anything. :ep

> Therefore I reassign this bugzilla to the python maintainer:
> Jan Matejek
> 
> Jan Matejek: please fix python to become more backward compatible. Thanks in
> advance.
> 

i will look into what exactly has caused this incompatibility (it is possible that it's a bug and it will go away with recently released 2.6rc1) and provide further details, stay tuned
Comment 11 Felix Möller 2008-09-15 10:47:22 UTC
Jan, this is AFAIK caused by the changed __init__ behaviour of python see http://bugs.python.org/issue1683368 . 

vila in #bzr is working to get it resolved on bzr's side. Have a look at the linked launchpad report.
Comment 12 Jan Matejek 2008-09-15 16:52:06 UTC
apparently, vile has almost finished the 2.6 port, we're now eliminating bugs
Comment 13 Jan Matejek 2008-09-16 17:27:05 UTC
according to the launchpad report, it is fixed in py26bzr branch. it depends on one patch to python that i've added in buildservice, 

i've prepared a bzr package in my home project in buildservice, see https://build.opensuse.org/package/show?package=bzr&project=home%3Amatejcik

as such, returning to bzr maintainer
Comment 14 Felix Möller 2008-09-16 17:56:17 UTC
I tried your package from https://api.opensuse.org/build/home:matejcik/openSUSE_Factory/i586/bzr/bzr-1.8dev-2.1.i586.rpm 

it segfaults on bzr "branch lp:~vila/bzr/py26bzr" but I guess this is expected as in https://bugs.launchpad.net/bzr/+bug/268993

Otherwise it worked well when playing with it. Thanks.
Comment 15 Felix Möller 2008-09-18 20:14:36 UTC
Klaus I think we need python-paramiko, otherwise one gets:

$ bzr push --create-prefix sftp://k4641-1@ftp8.planet-school.de/
bzr: ERROR: Unsupported protocol for url "sftp://k4641-1@ftp8.planet-school.de/": Unable to import paramiko (required for sftp support): No module named paramiko

it is in devel:languages:python/openSUSE_Factory
Comment 16 Klaus Singvogel 2008-09-19 10:20:49 UTC
Felix: sorry, but we have feature freeze for next product.
Comment 17 Klaus Singvogel 2008-09-19 10:54:27 UTC
Felix: I understood the situation in this way that this happens only using above BZR server.
Is this limitation to one server correct?

With which bzr version does it happen?

Comment 18 Felix Möller 2008-09-19 11:28:16 UTC
This is home:matejcik/openSUSE_Factory/i586/bzr/bzr-1.8dev-2.1.i586.rpm 

Without paramiko I guess all sftp connections will fail.

I just tried to follow the five minute tutorial from http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html#publishing-your-branch-with-sftp which publishes the branch to sftp, so it might be quiet common...

Right now this module is in:
devel:languages:python/openSUSE_Factory
devel:languages:python/bleeding_edge_python_Factory
home:dkukawka/openSUSE_Factory
home:maw:bzr/openSUSE_Factory
home:mge1512:virtualisation/openSUSE_Factory

So it seems like others are using it too.

You might ask maw, as he is packaging bzr in his home repo. I just started with bazaar two weeks ago so I do not know how common sftp is.
Comment 19 Klaus Singvogel 2008-09-23 10:13:47 UTC
Ok, working on it.
Comment 21 Klaus Singvogel 2008-09-23 15:25:45 UTC
Ok, a submission for sha/gzip fix was STABLE done a few minutes ago.
I expect a checkin for beta2 in the next days.

Regarding adding new package "python-paramiko" for sftp feature to distri: a solution has still to be found. The project manager (Christoph Thiel) gave his Ok at least. Please wait.
Comment 23 Klaus Singvogel 2008-09-24 10:01:09 UTC
ptyhon-paramiko is submitted, checkin will hopefully made for next build.

closing therefore.

Felix Möller: If you notice further issues in bzr, please open a new bugzilla. Only related information should added (and reopened) here. Thanks for understanding.
Comment 24 Jan Matejek 2008-10-08 16:29:11 UTC
*** Bug 433565 has been marked as a duplicate of this bug. ***
Comment 25 Felix Möller 2008-10-28 22:14:38 UTC
(In reply to comment #23 from Klaus Singvogel)
> Felix Möller: If you notice further issues in bzr, please open a new bugzilla.
> Only related information should added (and reopened) here. Thanks for
> understanding.
for the record as this does not work yet I have opened bug #439687