AttributeError: 'CHKInventoryRepository' object has no attribute 'get_revision_inventory'

Bug #887518 reported by Maurits van Rees
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
setuptoolsbzr
Fix Released
Undecided
Unassigned

Bug Description

When I have the latest trunk installed (or 2.1), I get an error when running 'python setup.py egg_info':

...

  File "/Users/mauritsvanrees/tmp/testbzr/lib/python2.6/site-packages/distribute-0.6.15-py2.6.egg/setuptools/command/sdist.py", line 46, in walk_revctrl
    for item in ep.load()(dirname):
  File "/Users/mauritsvanrees/tmp/testbzr/devel/setuptools_bzr/__init__.py", line 94, in find_files_for_bzr
    paths = bzrlib_find_files_for_bzr(dirname)
  File "/Users/mauritsvanrees/tmp/testbzr/devel/setuptools_bzr/__init__.py", line 66, in bzrlib_find_files_for_bzr
    children = bzrlib_get_children(current)
  File "/Users/mauritsvanrees/tmp/testbzr/devel/setuptools_bzr/__init__.py", line 50, in bzrlib_get_children
    inv = branch.repository.get_revision_inventory(branch.last_revision())
AttributeError: 'CHKInventoryRepository' object has no attribute 'get_revision_inventory'

Changing that line 50 in __init__.py to this does the trick as far as I see:

  inv = branch.repository.get_inventory(branch.last_revision())

Possibly both methods should be tried with a try/except.

This is with Python 2.6.7 and bzrlib 2.5b2.

I just now tried with bzrlib 2.4.2: same error.

Trying with 2.3.4 now, which you manually have to easy_install from http://launchpadlibrarian.net/75242790/bzr-2.3.4.tar.gz as it is not found by easy_install otherwise. Nope. 2.3.4 has the same error.

The checkout in which I am trying this has been created with:

  bzr branch https://code.launchpad.net/~barry/setuptoolsbzr/devel

For completeness sake:

$ bzr --version
Bazaar (bzr) 2.5b2
  Python interpreter: /Users/mauritsvanrees/tmp/testbzr/bin/python 2.6.7
  Python standard library: /Users/mauritsvanrees/tmp/testbzr/lib/python2.6
  Platform: Darwin-10.8.0-i386-64bit
  bzrlib: /Users/mauritsvanrees/tmp/testbzr/lib/python2.6/site-packages/bzr-2.5b2-py2.6-macosx-10.6-x86_64.egg/bzrlib

Ah, looks like get_revision_inventory has been removed since bzr 2.2:
https://bugs.launchpad.net/loggerhead/+bug/528194

Related branches

Revision history for this message
Richard Gomes (frgomes) wrote :

+1 (same error)

Some notes about my environment is:

$ uname -a
Linux apps 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

$ cat /etc/debian_version
7.2

$ python --version
Python 2.7.5

$ pip --version
pip 1.4.1 from /home/rgomes/.virtualenvs/py275/lib/python2.7/site-packages (python 2.7)

$ pip list | fgrep setuptools
setuptools (1.1.7)
setuptools-bzr (2.1)
setuptools-git (1.0)
setuptools-hg (0.4)

$ pip list | fgrep bzr
bzr (2.6.0)
setuptools-bzr (2.1)

Revision history for this message
Richard Gomes (frgomes) wrote :

OK. One way to circumvent the trouble is renaming directory ".bzr" to something else whilst you are developing.
Far from ideal, but keeps the ball rolling.

But this issue is BLOCKER when it's time to release the package.
The command below fails :(

    python setup.py sdist --formats=zip

Revision history for this message
Richard Gomes (frgomes) wrote :

OK. There's a simple way to fix this.

See: http://bazaar.launchpad.net/~tseaver/setuptoolsbzr/lp887518/revision/16#setuptools_bzr/__init__.py

The big question is: Why this very simple fix is hibernating for a full year and not pushed yet onto PyPI?

Revision history for this message
Barry Warsaw (barry) wrote :

It's been languishing because I haven't used this package in ages. I found that using a MANIFEST.in explicitly worked better. However, since this is affecting you, I'll take a look at the fix and try to do a PyPI release. Unless you want to adopt the package ;)

Richard Gomes (frgomes)
Changed in setuptoolsbzr:
status: New → Fix Released
Revision history for this message
Tres Seaver (tseaver) wrote :

In what release? I don't see anything newer than 2.1 here on launchpad, and there is no PyPI entry for 'setuptoolsbzr' at all.

Revision history for this message
Tres Seaver (tseaver) wrote :

Oops: https://pypi.python.org/pypi/setuptools_bzr

but the released version there is 2.1.

Revision history for this message
Richard Gomes (frgomes) wrote : Re: [Bug 887518] Re: AttributeError: 'CHKInventoryRepository' object has no attribute 'get_revision_inventory'

I'm still releasing. I should have closed the bugs after finishing the
release.

Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
sip:<email address hidden>

On 09/01/14 22:24, Tres Seaver wrote:
> In what release? I don't see anything newer than 2.1 here on launchpad,
> and there is no PyPI entry for 'setuptoolsbzr' at all.
>

Revision history for this message
Richard Gomes (frgomes) wrote :

Hello,

It's available now from PyPI and from Launchpad:

https://pypi.python.org/pypi?%3Aaction=search&submit=search&term=setuptools_bzr
  https://launchpad.net/setuptoolsbzr <https://launchpad.net/setuptoolsbzr>

I'm the new maintainer and I closed all open bugs since it's working
very well now for me.
Please let me know if you find issues.

Cheers

Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
sip:<email address hidden>

On 09/01/14 22:24, Tres Seaver wrote:
> In what release? I don't see anything newer than 2.1 here on launchpad,
> and there is no PyPI entry for 'setuptoolsbzr' at all.
>

Revision history for this message
Tres Seaver (tseaver) wrote :

On 01/09/2014 06:24 PM, Richard Gomes wrote:
> It's available now from PyPI and from Launchpad:
>
> https://pypi.python.org/pypi?%3Aaction=search&submit=search&term=setuptools_bzr
>
>
https://launchpad.net/setuptoolsbzr <https://launchpad.net/setuptoolsbzr>
>
> I'm the new maintainer and I closed all open bugs since it's working
> very well now for me. Please let me know if you find issues

Thank you!

Tres.
--
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com

Revision history for this message
Maurits van Rees (maurits-vanrees) wrote :

It is working now. Thanks to Barry for starting this package and thanks to Richard for taking over maintenance.

Oddly, I cannot even install the previous setuptools_bzr 2.1 to double check the previous behavior, because pip or easy_install complains about a missing ez_setup module. Ah well, installing the latest 2.2 works fine and 'python setup.py egg_info' or other setup.py commands then work fine.

Thanks.

Revision history for this message
Richard Gomes (frgomes) wrote :

Hello Maurits,

Thanks a lot for the feedback.

Cheers :)

Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
sip:<email address hidden>

On 10/01/14 01:11, Maurits van Rees wrote:
> It is working now. Thanks to Barry for starting this package and thanks
> to Richard for taking over maintenance.
>
> Oddly, I cannot even install the previous setuptools_bzr 2.1 to double
> check the previous behavior, because pip or easy_install complains about
> a missing ez_setup module. Ah well, installing the latest 2.2 works
> fine and 'python setup.py egg_info' or other setup.py commands then work
> fine.
>
> Thanks.
>

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.