python-nose is broken with python 2.6.3-dev

Bug #389942 reported by Darren Dale
40
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Python
Fix Committed
Unknown
nose
Unknown
Unknown
nose (Ubuntu)
Invalid
High
Unassigned
python2.6 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: python-nose

python-nose is broken in Karmic alpha 2:

$ nosetests
Traceback (most recent call last):
  File "/usr/bin/nosetests", line 8, in <module>
    load_entry_point('nose==0.10.4', 'console_scripts', 'nosetests')()
  File "/usr/lib/pymodules/python2.6/nose/core.py", line 219, in __init__
    argv=argv, testRunner=testRunner, testLoader=testLoader)
  File "/usr/lib/python2.6/unittest.py", line 819, in __init__
    self.runTests()
  File "/usr/lib/pymodules/python2.6/nose/core.py", line 298, in runTests
    result = self.testRunner.run(self.test)
TypeError: unbound method run() must be called with TextTestRunner instance as first argument (got ContextSuite instance instead)

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

After a manual update to nose version 0.11.0 it is still fully broken the exact same way.
There is something broken here but I'm not sure what the root cause is...

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

It works fine with python2.5 but not with Python 2.6.2+ (release26-maint, Jun 19 2009, 15:16:33)

Revision history for this message
Darren Dale (dsdale24) wrote :

Perhaps something to do with where the package is installed? Maybe pkg_resources doesn't know how to handle all the unconventional package locations created by debian's python policy.

Revision history for this message
Stefan van der Walt (stefanv) wrote :

This looks similar to https://bugs.launchpad.net/ubuntu/+source/nose/+bug/337585

I can confirm that the problem still exists.

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :
Revision history for this message
Andrew Straw (astraw) wrote :

It seems a difference between -0ubuntu1 and -0ubuntu2 (jaunty and karmic alpha 2) is this. It looks very relevant.

--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -798,8 +798,10 @@ Examples:
                                                in MyTestCase
 """
     def __init__(self, module='__main__', defaultTest=None,
- argv=None, testRunner=TextTestRunner,
+ argv=None, testRunner=None,
                  testLoader=defaultTestLoader):
+ if testRunner is None:
+ testRunner = TextTestRunner
         if type(module) == type(''):
             self.module = __import__(module)
             for part in module.split('.')[1:]:

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : Re: [Bug 389942] Re: python-nose is broken in Karmic alpha 2

Andrew Straw wrote:
> It seems a difference between -0ubuntu1 and -0ubuntu2 (jaunty and karmic
> alpha 2) is this. It looks very relevant.
>
> --- a/Lib/unittest.py
> +++ b/Lib/unittest.py
> @@ -798,8 +798,10 @@ Examples:
> in MyTestCase
> """
> def __init__(self, module='__main__', defaultTest=None,
> - argv=None, testRunner=TextTestRunner,
> + argv=None, testRunner=None,
> testLoader=defaultTestLoader):
> + if testRunner is None:
> + testRunner = TextTestRunner
> if type(module) == type(''):
> self.module = __import__(module)
> for part in module.split('.')[1:]:
>
>
https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/395362

Revision history for this message
Max Bowsher (maxb) wrote : Re: python-nose is broken in Karmic alpha 2

NB that the change mentioned above is an upstream one.

The problem is in essence that an upstream change to unittest reveals a bug in how nose overrides TestProgram.runTests.

I shall file a bug upstream.

summary: - python-nose is broken in Karmic alpha 2
+ python-nose is broken with python 2.6.3-dev
Revision history for this message
Max Bowsher (maxb) wrote :
Revision history for this message
spiderbit (stefan-canta-game) wrote :

http://bugs.python.org/issue6177

<- as i see it this bug is fixed since over a month in upstream, would make me happy if the maintainer could make a new python-release package that fix fix this problem.

Changed in nose (Ubuntu):
assignee: nobody → Python (python)
Revision history for this message
spiderbit (stefan-canta-game) wrote :

sorry, assigned to wrong person, ubuntu-core-dev is "the" maintainer

Changed in nose (Ubuntu):
assignee: Python (python) → Ubuntu Core Development Team (ubuntu-core-dev)
James Westby (james-w)
Changed in nose (Ubuntu):
assignee: Ubuntu Core Development Team (ubuntu-core-dev) → nobody
importance: Undecided → High
status: New → Triaged
Changed in python2.6 (Ubuntu):
importance: Undecided → High
status: New → Triaged
Changed in python:
status: Unknown → Fix Committed
Revision history for this message
fherdom (fhernandeze) wrote : Re: [Bug 389942] Re: python-nose is broken with python 2.6.3-dev

no problem, if i can help you... i work all day with python

2009/7/7 spiderbit <email address hidden>:
> sorry, assigned to wrong person, ubuntu-core-dev is "the" maintainer
>
> ** Changed in: nose (Ubuntu)
>     Assignee: Python (python) => Ubuntu Core Development Team (ubuntu-core-dev)
>
> --
> python-nose is broken with python 2.6.3-dev
> https://bugs.launchpad.net/bugs/389942
> You received this bug notification because you are a member of Python,
> which is a bug assignee.
>

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

Where is the fix??
http://bugs.python.org/issue6177 does not provide the fix. It is the commit which *breaks* python-nose.

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

> Where is the fix??
> http://bugs.python.org/issue6177 does not provide the fix. It is the commit which *breaks* python-nose.
>
>
nosetests returns

Traceback (most recent call last):
  File "/usr/bin/nosetests", line 8, in <module>
    load_entry_point('nose==0.11.1', 'console_scripts', 'nosetests')()
  File "/usr/lib/pymodules/python2.6/nose/core.py", line 113, in __init__
    argv=argv, testRunner=testRunner, testLoader=testLoader)
  File "/usr/lib/python2.6/unittest.py", line 819, in __init__
    self.runTests()
  File "/usr/lib/pymodules/python2.6/nose/core.py", line 192, in runTests
    result = self.testRunner.run(self.test)
TypeError: unbound method run() must be called with TextTestRunner
instance as first argument (got ContextSuite instance instead)

It is still broken.

Xavier

Revision history for this message
spiderbit (stefan-canta-game) wrote :

Hmm ok I think you are right.

I did not test it. But i think you are right. Sorry i read next time more accuratly. I thought i see a bug that describes the bug, and a patch. But it seems to be another problem which fix broke this.

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

Indeed :)
Nose is still fully broken in karmic :(

File "/usr/lib/pymodules/python2.6/nose/core.py", line 192, in runTests
    result = self.testRunner.run(self.test)
TypeError: unbound method run() must be called with TextTestRunner instance as first argument (got ContextSuite instance instead)

Revision history for this message
JP (jpellerin+nose) wrote :

This is the upstream bug (in python core, not nose): http://bugs.python.org/issue6418

According to Michael Foord, it's fixed in the 2.6 branch and trunk. Maybe karmic isn't updated yet? I have no idea how or when that process happens.

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

This bug was fixed in the package python2.6 - 2.6.2-0ubuntu3

---------------
python2.6 (2.6.2-0ubuntu3) karmic; urgency=low

  * Add debian/patches/issue6418.dpatch taken from the 2.6 release branch
    to fix problems with other test runners. (LP: #389942)

 -- James Westby <email address hidden> Fri, 24 Jul 2009 11:24:35 +0200

Changed in python2.6 (Ubuntu):
status: Triaged → Fix Released
James Westby (james-w)
Changed in nose (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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