diff --git a/IPython/Extensions/pickleshare.py b/IPython/Extensions/pickleshare.py old mode 100644 new mode 100755 index 976ae8d..40bfb8b --- a/IPython/Extensions/pickleshare.py +++ b/IPython/Extensions/pickleshare.py @@ -40,8 +40,6 @@ import UserDict import warnings import glob -from sets import Set as set - def gethashfile(key): return ("%02x" % abs(hash(key) % 256))[-2:] diff --git a/IPython/Magic.py b/IPython/Magic.py index e9d3437..b1b3ce7 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -29,7 +29,6 @@ import textwrap from cStringIO import StringIO from getopt import getopt,GetoptError from pprint import pprint, pformat -from sets import Set # cProfile was added in Python2.5 try: @@ -69,7 +68,7 @@ def compress_dhist(dh): head, tail = dh[:-10], dh[-10:] newhead = [] - done = Set() + done = set() for h in head: if h in done: continue @@ -143,7 +142,7 @@ python-profiler package from non-free.""") filter(inst_magic,self.__dict__.keys()) + \ filter(inst_bound_magic,self.__class__.__dict__.keys()) out = [] - for fn in Set(magics): + for fn in set(magics): out.append(fn.replace('magic_','',1)) out.sort() return out diff --git a/IPython/external/mglob.py b/IPython/external/mglob.py old mode 100644 new mode 100755 index 3810f32..ed3679f --- a/IPython/external/mglob.py +++ b/IPython/external/mglob.py @@ -73,8 +73,6 @@ __version__ = "0.2" import os,glob,fnmatch,sys,re -from sets import Set as set - def expand(flist,exp_dirs = False): """ Expand the glob(s) in flist. diff --git a/IPython/iplib.py b/IPython/iplib.py index b974ba5..9fc3e23 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -47,9 +47,6 @@ import sys import tempfile import traceback import types -import warnings -warnings.filterwarnings('ignore', r'.*sets module*') -from sets import Set from pprint import pprint, pformat # IPython's own modules @@ -1955,7 +1952,7 @@ want to merge them back into the new files.""" % locals() """ line = fn + " " + rest - done = Set() + done = set() while 1: pre,fn,rest = prefilter.splitUserInput(line, prefilter.shell_line_split) diff --git a/IPython/kernel/tests/engineservicetest.py b/IPython/kernel/tests/engineservicetest.py index 4a1c6f8..9544db3 100644 --- a/IPython/kernel/tests/engineservicetest.py +++ b/IPython/kernel/tests/engineservicetest.py @@ -49,8 +49,8 @@ validCommands = ['a=5', time.sleep(0.1)""", """from math import cos; x = 1.0*cos(0.5)""", # Semicolons lead to Discard ast nodes that should be discarded - """from sets import Set -s = Set() + """s = 1 +s = set() """, # Trailing whitespace should be allowed. """import math math.cos(1.0)""", # Test a method call with a discarded return value