aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2007-02-23 19:28:25 +0000
committerPJ Eby <distutils-sig@python.org>2007-02-23 19:28:25 +0000
commitaba13220b952cd60df2a8f7cf44394d28a5f1814 (patch)
tree62f9cec890c14a240cdf722a081fce80e17b84b1 /setuptools
parentae8b6ede870d8d62c3d08b9697a92f75e6f99d9c (diff)
downloadexternal_python_setuptools-aba13220b952cd60df2a8f7cf44394d28a5f1814.tar.gz
external_python_setuptools-aba13220b952cd60df2a8f7cf44394d28a5f1814.tar.bz2
external_python_setuptools-aba13220b952cd60df2a8f7cf44394d28a5f1814.zip
Get rid of 'sets' module usage under Python 2.4+, so that no warnings
are issued by Python 2.6. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4053871
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/tests/test_resources.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index a4b20de1..1b15a9eb 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -1,7 +1,10 @@
from unittest import TestCase, makeSuite
from pkg_resources import *
import pkg_resources, sys
-from sets import ImmutableSet
+try:
+ frozenset
+except NameError:
+ from sets import ImmutableSet as frozenset
class Metadata(EmptyProvider):
"""Mock object to return metadata as if from an on-disk distribution"""
@@ -18,7 +21,6 @@ class Metadata(EmptyProvider):
def get_metadata_lines(self,name):
return yield_lines(self.get_metadata(name))
-
class DistroTests(TestCase):
def testCollection(self):
@@ -337,7 +339,7 @@ class RequirementsTests(TestCase):
self.assertEqual(hash(r1), hash(r2))
self.assertEqual(
hash(r1), hash(("twisted", ((">=",parse_version("1.2")),),
- ImmutableSet(["foo","bar"])))
+ frozenset(["foo","bar"])))
)
def testVersionEquality(self):