summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2007-01-13 00:29:49 (GMT)
committerBrett Cannon <bcannon@gmail.com>2007-01-13 00:29:49 (GMT)
commit093b67061ac54b603483fed1038d686b34cc61f5 (patch)
tree924e09dbbdc388bfb9c89acfafa6f1760e96337f /Lib
parent6fd4549bc68642ad638f384f760d06295d4e3579 (diff)
downloadcpython-093b67061ac54b603483fed1038d686b34cc61f5.zip
cpython-093b67061ac54b603483fed1038d686b34cc61f5.tar.gz
cpython-093b67061ac54b603483fed1038d686b34cc61f5.tar.bz2
Deprecate the sets module.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/sets.py4
-rw-r--r--Lib/test/test___all__.py2
-rw-r--r--Lib/test/test_sets.py4
3 files changed, 10 insertions, 0 deletions
diff --git a/Lib/sets.py b/Lib/sets.py
index 32a0dd6..99ee931 100644
--- a/Lib/sets.py
+++ b/Lib/sets.py
@@ -80,6 +80,10 @@ except ImportError:
__all__ = ['BaseSet', 'Set', 'ImmutableSet']
+import warnings
+warnings.warn("the sets module is deprecated", DeprecationWarning,
+ stacklevel=2)
+
class BaseSet(object):
"""Common base class for mutable and immutable sets."""
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
index c45e139..dbc6bc3 100644
--- a/Lib/test/test___all__.py
+++ b/Lib/test/test___all__.py
@@ -9,6 +9,8 @@ warnings.filterwarnings("ignore",
"the gopherlib module is deprecated",
DeprecationWarning,
"<string>")
+warnings.filterwarnings("ignore", "the sets module is deprecated",
+ DeprecationWarning, "<string>")
class AllTest(unittest.TestCase):
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py
index 85e4a22..efa388f 100644
--- a/Lib/test/test_sets.py
+++ b/Lib/test/test_sets.py
@@ -1,5 +1,9 @@
#!/usr/bin/env python
+import warnings
+warnings.filterwarnings("ignore", "the sets module is deprecated",
+ DeprecationWarning, "test\.test_sets")
+
import unittest, operator, copy, pickle, random
from sets import Set, ImmutableSet
from test import test_support