Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
093b6706
Commit
093b6706
authored
Jan 13, 2007
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate the sets module.
parent
6fd4549b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
0 deletions
+15
-0
Doc/lib/libsets.tex
Doc/lib/libsets.tex
+2
-0
Lib/sets.py
Lib/sets.py
+4
-0
Lib/test/test___all__.py
Lib/test/test___all__.py
+2
-0
Lib/test/test_sets.py
Lib/test/test_sets.py
+4
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/lib/libsets.tex
View file @
093b6706
...
...
@@ -9,6 +9,8 @@
\sectionauthor
{
Raymond D. Hettinger
}{
python@rcn.com
}
\versionadded
{
2.3
}
\deprecated
{
2.6
}{
The built-in
\code
{
set
}
/
\code
{
frozneset
}
types replace this
module.
}
The
\module
{
sets
}
module provides classes for constructing and manipulating
unordered collections of unique elements. Common uses include membership
...
...
Lib/sets.py
View file @
093b6706
...
...
@@ -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."""
...
...
Lib/test/test___all__.py
View file @
093b6706
...
...
@@ -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
):
...
...
Lib/test/test_sets.py
View file @
093b6706
#!/usr/bin/env python
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
"the sets module is deprecated"
,
DeprecationWarning
,
"test
\
.
t
est_sets"
)
import
unittest
,
operator
,
copy
,
pickle
,
random
from
sets
import
Set
,
ImmutableSet
from
test
import
test_support
...
...
Misc/NEWS
View file @
093b6706
...
...
@@ -109,6 +109,9 @@ Core and builtins
Library
-------
-
The
sets
module
has
been
deprecated
.
Use
the
built
-
in
set
/
frozenset
types
instead
.
-
Bug
#
1610795
:
make
ctypes
.
util
.
find_library
work
on
BSD
systems
.
-
Fixes
for
64
-
bit
Windows
:
In
ctypes
.
wintypes
,
correct
the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment