Repository: pandas-dev/pandas

Issue:
API: remove ExcelFile/ExcelObject, clipboard from parses.io.parsers
fair warning in 0.11.1 that in 0.12 this is going to change

top-level imports of `ExcelFile/ExcelObject` are unchanged
this only affects directly importing from the parsers module



Discussion:

Resolving patch:
diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py
--- a/pandas/io/parsers.py
+++ b/pandas/io/parsers.py
@@ -2048,27 +2048,3 @@ def __init__(self, f, **kwds):
     def _make_reader(self, f):
         self.data = FixedWidthReader(f, self.colspecs, self.delimiter,
                                      encoding=self.encoding)
-
-
-##### deprecations in 0.12 #####
-##### remove in 0.12         #####
-
-from pandas.io import clipboard
-def read_clipboard(**kwargs):
-    warn("read_clipboard is now a top-level accessible via pandas.read_clipboard", FutureWarning)
-    clipboard.read_clipboard(**kwargs)
-
-def to_clipboard(obj):
-    warn("to_clipboard is now an object level method accessible via obj.to_clipboard()", FutureWarning)
-    clipboard.to_clipboard(obj)
-
-from pandas.io import excel
-class ExcelWriter(excel.ExcelWriter):
-    def __init__(self, path):
-        warn("ExcelWriter can now be imported from: pandas.io.excel", FutureWarning)
-        super(ExcelWriter, self).__init__(path)
-
-class ExcelFile(excel.ExcelFile):
-    def __init__(self, path_or_buf, **kwds):
-        warn("ExcelFile can now be imported from: pandas.io.excel", FutureWarning)
-        super(ExcelFile, self).__init__(path_or_buf, **kwds)


Test patch:
diff --git a/pandas/io/tests/test_excel.py b/pandas/io/tests/test_excel.py
--- a/pandas/io/tests/test_excel.py
+++ b/pandas/io/tests/test_excel.py
@@ -254,20 +254,20 @@ def test_excel_read_buffer(self):
         f = open(pth, 'rb')
         xl = ExcelFile(f)
         xl.parse('Sheet1', index_col=0, parse_dates=True)
-        
+
     def test_read_xlrd_Book(self):
         _skip_if_no_xlrd()
         _skip_if_no_xlwt()
-        
+
         import xlrd
-        
+
         pth = '__tmp_excel_read_worksheet__.xls'
         df = self.frame
-        
+
         with ensure_clean(pth) as pth:
             df.to_excel(pth, "SheetA")
             book = xlrd.open_workbook(pth)
-            
+
             with ExcelFile(book, engine="xlrd") as xl:
                 result = xl.parse("SheetA")
                 tm.assert_frame_equal(df, result)
@@ -1004,26 +1004,6 @@ def check_called(func):
         check_called(lambda: df.to_excel('something.xls', engine='dummy'))
         set_option('io.excel.xlsx.writer', val)
 
-
-class ExcelLegacyTests(SharedItems, unittest.TestCase):
-    def test_deprecated_from_parsers(self):
-
-        # since 0.12 changed the import path
-        import warnings
-
-        with warnings.catch_warnings():
-            warnings.filterwarnings(action='ignore', category=FutureWarning)
-
-            _skip_if_no_xlrd()
-            from pandas.io.parsers import ExcelFile as xf
-            xf(self.xls1)
-
-            _skip_if_no_xlwt()
-            with ensure_clean('test.xls') as path:
-                from pandas.io.parsers import ExcelWriter as xw
-                xw(path)
-
-
 if __name__ == '__main__':
     nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
                    exit=False)