[Twisted-Python] trial and python 2.5.2?
Hi, I'm trying to run trial from twisted-8.1.0 on SuSE-11.0 with python 2.5.2 and get the following error (with super and old style classes IMHO). What would be the fix or workaround for this? BTW on SuSE-10.3 with python 2.5.1 everything is OK. Thank you Mike mike@linux-lp:~/python/twisted> tar jxf Twisted-8.1.0.tar.bz2 mike@linux-lp:~/python/twisted> cd Twisted-8.1.0 mike@linux-lp:~/python/twisted/Twisted-8.1.0> ./bin/trial twisted /home/mike/python/twisted/Twisted-8.1.0/twisted/python/reflect.py:377: DeprecationWarning: twisted.flow is unmaintained. return __import__(importName) /home/mike/python/twisted/Twisted-8.1.0/twisted/scripts/test/test_mktap.py:16: DeprecationWarning: mktap and related support modules are deprecated as of Twisted 8.0. Use Twisted Application Plugins with the 'twistd' command directly, as described in 'Writing a Twisted Application Plugin for twistd' chapter of the Developer Guide. from twisted.scripts.mktap import run, getid /home/mike/python/twisted/Twisted-8.1.0/twisted/enterprise/util.py:19: DeprecationWarning: twisted.enterprise.util is deprecated since Twisted 8.0.0. category=DeprecationWarning) /home/mike/python/twisted/Twisted-8.1.0/twisted/test/test_persisted.py:161: DeprecationWarning: twisted.persisted.marmalade is deprecated from twisted.persisted import marmalade /home/mike/python/twisted/Twisted-8.1.0/twisted/words/im/__init__.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future. warnings.warn("twisted.im will be undergoing a rewrite at some point in the future.") Traceback (most recent call last): File "./bin/trial", line 24, in <module> run() File "/home/mike/python/twisted/Twisted-8.1.0/twisted/scripts/trial.py", line 361, in run test_result = trialRunner.run(suite) File "/home/mike/python/twisted/Twisted-8.1.0/twisted/trial/runner.py", line 780, in run suite = TrialSuite([test]) File "/home/mike/python/twisted/Twisted-8.1.0/twisted/trial/runner.py", line 263, in __init__ super(TrialSuite, self).__init__([suite]) TypeError: super() argument 1 must be type, not classobj Exception exceptions.TypeError: TypeError("'NoneType' object is not callable",) in <bound method Popen3.__del__ of <popen2.Popen3 instance at 0x933a78c>> ignored mike@linux-lp:~/python/twisted/Twisted-8.1.0> mike@linux-lp:~/python/twisted/Twisted-8.1.0> python --version Python 2.5.2 mike@linux-lp:~/python/twisted/Twisted-8.1.0>
On Sun, 13 Jul 2008 18:34:47 -0400, Mikhail Terekhov <termim@gmail.com> wrote:
Hi,
I'm trying to run trial from twisted-8.1.0 on SuSE-11.0 with python 2.5.2 and get the following error (with super and old style classes IMHO). What would be the fix or workaround for this? BTW on SuSE-10.3 with python 2.5.1 everything is OK.
Can you look at unittest.py from the standard library on each of these systems and see if TestSuite is new-style or classic? Note that it does not subclass object, but the module has `__metaclass__ = type´, making all classes that don't subclass something new-style. TestSuite should be new-style - it is in my Python 2.5.1 installation and it is in the 2.5 release branch. Jean-Paul
Jean-Paul Calderone wrote:
Can you look at unittest.py from the standard library on each of these systems and see if TestSuite is new-style or classic? Note that it does not subclass object, but the module has `__metaclass__ = type´, making all classes that don't subclass something new-style.
TestSuite should be new-style - it is in my Python 2.5.1 installation and it is in the 2.5 release branch.
I found the problem. It was an obsolete package python-unit-1.4.1 from the SuSE repository devel:/languages:/python that installed old version of the unittest.py into site-packages directory and shadowed the correct one. Somehow I installed it without even noticing :( I've asked maintainers of this repository to remove the obsolete beast. Sorry for the noise. Mikhail
participants (2)
-
Jean-Paul Calderone
-
Mikhail Terekhov