From 8c7241812ef60c9379d200f21524b1b2f474beea Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 16 Jun 2009 20:00:57 +0100 Subject: [PATCH] Fixed deprecation warning with Python 2.6 --- ROX-Lib2/python/rox/tasks.py | 5 ++--- ROX-Lib2/tests/python/testall.py | 2 +- ROX-Lib2/tests/python/testbasedir.py | 2 +- ROX-Lib2/tests/python/testchoices.py | 2 +- ROX-Lib2/tests/python/testicon_theme.py | 2 +- ROX-Lib2/tests/python/testmenu.py | 2 +- ROX-Lib2/tests/python/testoptions.py | 2 +- ROX-Lib2/tests/python/testprocesses.py | 2 +- ROX-Lib2/tests/python/testproxy.py | 2 +- ROX-Lib2/tests/python/testrox.py | 2 +- ROX-Lib2/tests/python/testsu.py | 2 +- ROX-Lib2/tests/python/testtasks.py | 2 +- ROX-Lib2/tests/python/testxxmlrpc.py | 2 +- 13 files changed, 14 insertions(+), 15 deletions(-) diff --git a/ROX-Lib2/python/rox/tasks.py b/ROX-Lib2/python/rox/tasks.py index ed42026..9fab0fc 100644 --- a/ROX-Lib2/python/rox/tasks.py +++ b/ROX-Lib2/python/rox/tasks.py @@ -37,7 +37,6 @@ callbacks. See the Task class (below) for more information. import rox, gobject from rox import g import gobject -from sets import Set, ImmutableSet # The list of Blockers whose event has happened, in the order they were # triggered @@ -77,7 +76,7 @@ class Blocker: def __init__(self): self.happened = False # False until event triggered - self._rox_lib_tasks = Set() # Tasks waiting on this blocker + self._rox_lib_tasks = set() # Tasks waiting on this blocker def trigger(self): """The event has happened. Note that this cannot be undone; @@ -260,7 +259,7 @@ def _handle_run_queue(): # new one for future idling. _idle_blocker = IdleBlocker() - tasks = ImmutableSet(next._rox_lib_tasks) + tasks = frozenset(next._rox_lib_tasks) #print "Resume", tasks for task in tasks: # Run 'task'. diff --git a/ROX-Lib2/tests/python/testall.py b/ROX-Lib2/tests/python/testall.py index d9c7251..0759f38 100755 --- a/ROX-Lib2/tests/python/testall.py +++ b/ROX-Lib2/tests/python/testall.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 import unittest, os, sys my_dir = os.path.dirname(sys.argv[0]) diff --git a/ROX-Lib2/tests/python/testbasedir.py b/ROX-Lib2/tests/python/testbasedir.py index 6fa8973..54948c4 100755 --- a/ROX-Lib2/tests/python/testbasedir.py +++ b/ROX-Lib2/tests/python/testbasedir.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 import unittest import os, sys, shutil from os.path import dirname, abspath, join diff --git a/ROX-Lib2/tests/python/testchoices.py b/ROX-Lib2/tests/python/testchoices.py index d1cb2ea..f9211e6 100755 --- a/ROX-Lib2/tests/python/testchoices.py +++ b/ROX-Lib2/tests/python/testchoices.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 import unittest import os, sys, shutil from os.path import dirname, abspath, join diff --git a/ROX-Lib2/tests/python/testicon_theme.py b/ROX-Lib2/tests/python/testicon_theme.py index bbd1b84..a80f9dc 100755 --- a/ROX-Lib2/tests/python/testicon_theme.py +++ b/ROX-Lib2/tests/python/testicon_theme.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 import unittest import os, sys, shutil from os.path import dirname, abspath, join diff --git a/ROX-Lib2/tests/python/testmenu.py b/ROX-Lib2/tests/python/testmenu.py index 522ec16..555e532 100755 --- a/ROX-Lib2/tests/python/testmenu.py +++ b/ROX-Lib2/tests/python/testmenu.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 import unittest import os, sys, shutil from os.path import dirname, abspath, join diff --git a/ROX-Lib2/tests/python/testoptions.py b/ROX-Lib2/tests/python/testoptions.py index 03404d1..82e9fb0 100755 --- a/ROX-Lib2/tests/python/testoptions.py +++ b/ROX-Lib2/tests/python/testoptions.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 import unittest import os, sys, shutil from os.path import dirname, abspath, join diff --git a/ROX-Lib2/tests/python/testprocesses.py b/ROX-Lib2/tests/python/testprocesses.py index 329b857..86d3115 100755 --- a/ROX-Lib2/tests/python/testprocesses.py +++ b/ROX-Lib2/tests/python/testprocesses.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 from __future__ import generators import unittest import sys diff --git a/ROX-Lib2/tests/python/testproxy.py b/ROX-Lib2/tests/python/testproxy.py index 76d850a..aecb74c 100755 --- a/ROX-Lib2/tests/python/testproxy.py +++ b/ROX-Lib2/tests/python/testproxy.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 from __future__ import generators import unittest import sys diff --git a/ROX-Lib2/tests/python/testrox.py b/ROX-Lib2/tests/python/testrox.py index 8f2fb2d..bd90bdc 100755 --- a/ROX-Lib2/tests/python/testrox.py +++ b/ROX-Lib2/tests/python/testrox.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 import unittest import os, sys, shutil from StringIO import StringIO diff --git a/ROX-Lib2/tests/python/testsu.py b/ROX-Lib2/tests/python/testsu.py index 41b20cb..f13edf0 100755 --- a/ROX-Lib2/tests/python/testsu.py +++ b/ROX-Lib2/tests/python/testsu.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 from __future__ import generators import unittest import sys, os diff --git a/ROX-Lib2/tests/python/testtasks.py b/ROX-Lib2/tests/python/testtasks.py index 7943d8d..1e666c5 100755 --- a/ROX-Lib2/tests/python/testtasks.py +++ b/ROX-Lib2/tests/python/testtasks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 from __future__ import generators import unittest import sys diff --git a/ROX-Lib2/tests/python/testxxmlrpc.py b/ROX-Lib2/tests/python/testxxmlrpc.py index 9838f3c..34ee3db 100755 --- a/ROX-Lib2/tests/python/testxxmlrpc.py +++ b/ROX-Lib2/tests/python/testxxmlrpc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python2.6 from __future__ import generators import unittest import sys, StringIO -- 2.11.4.GIT