From ea6d7218767da55ee6529307052f8656c8e7c1a8 Mon Sep 17 00:00:00 2001 From: jreback Date: Wed, 10 Apr 2013 07:59:55 -0400 Subject: [PATCH 1/5] CLN: moved all data for tests to /data sub-dir of the tests --- .../io/tests/{ => data/legacy_hdf}/legacy.h5 | Bin .../{ => data/legacy_hdf}/legacy_0.10.h5 | Bin .../{ => data/legacy_hdf}/legacy_table.h5 | Bin .../{ => data/legacy_hdf}/pytables_native.h5 | Bin .../{ => data/legacy_hdf}/pytables_native2.h5 | Bin pandas/io/tests/{ => data}/salary.table | 0 pandas/io/tests/{ => data}/test.xls | Bin pandas/io/tests/{ => data}/test.xlsx | Bin pandas/io/tests/{ => data}/test1.csv | 0 pandas/io/tests/{ => data}/test2.csv | 0 pandas/io/tests/{ => data}/test2.xls | Bin pandas/io/tests/{ => data}/test3.xls | Bin pandas/io/tests/data/unicode_series.csv | 18 ++++++++++ pandas/io/tests/{ => data}/utf16_ex.txt | Bin pandas/io/tests/test_cparser.py | 7 +--- pandas/io/tests/test_excel.py | 6 +--- pandas/io/tests/test_parsers.py | 16 +++------ pandas/io/tests/test_pickle.py | 32 ++++++++++++++++++ pandas/io/tests/test_pytables.py | 25 ++++---------- pandas/tests/test_format.py | 8 +---- pandas/util/testing.py | 14 ++++++++ 21 files changed, 79 insertions(+), 47 deletions(-) rename pandas/io/tests/{ => data/legacy_hdf}/legacy.h5 (100%) rename pandas/io/tests/{ => data/legacy_hdf}/legacy_0.10.h5 (100%) rename pandas/io/tests/{ => data/legacy_hdf}/legacy_table.h5 (100%) rename pandas/io/tests/{ => data/legacy_hdf}/pytables_native.h5 (100%) rename pandas/io/tests/{ => data/legacy_hdf}/pytables_native2.h5 (100%) rename pandas/io/tests/{ => data}/salary.table (100%) rename pandas/io/tests/{ => data}/test.xls (100%) rename pandas/io/tests/{ => data}/test.xlsx (100%) rename pandas/io/tests/{ => data}/test1.csv (100%) rename pandas/io/tests/{ => data}/test2.csv (100%) rename pandas/io/tests/{ => data}/test2.xls (100%) rename pandas/io/tests/{ => data}/test3.xls (100%) create mode 100644 pandas/io/tests/data/unicode_series.csv rename pandas/io/tests/{ => data}/utf16_ex.txt (100%) create mode 100644 pandas/io/tests/test_pickle.py diff --git a/pandas/io/tests/legacy.h5 b/pandas/io/tests/data/legacy_hdf/legacy.h5 similarity index 100% rename from pandas/io/tests/legacy.h5 rename to pandas/io/tests/data/legacy_hdf/legacy.h5 diff --git a/pandas/io/tests/legacy_0.10.h5 b/pandas/io/tests/data/legacy_hdf/legacy_0.10.h5 similarity index 100% rename from pandas/io/tests/legacy_0.10.h5 rename to pandas/io/tests/data/legacy_hdf/legacy_0.10.h5 diff --git a/pandas/io/tests/legacy_table.h5 b/pandas/io/tests/data/legacy_hdf/legacy_table.h5 similarity index 100% rename from pandas/io/tests/legacy_table.h5 rename to pandas/io/tests/data/legacy_hdf/legacy_table.h5 diff --git a/pandas/io/tests/pytables_native.h5 b/pandas/io/tests/data/legacy_hdf/pytables_native.h5 similarity index 100% rename from pandas/io/tests/pytables_native.h5 rename to pandas/io/tests/data/legacy_hdf/pytables_native.h5 diff --git a/pandas/io/tests/pytables_native2.h5 b/pandas/io/tests/data/legacy_hdf/pytables_native2.h5 similarity index 100% rename from pandas/io/tests/pytables_native2.h5 rename to pandas/io/tests/data/legacy_hdf/pytables_native2.h5 diff --git a/pandas/io/tests/salary.table b/pandas/io/tests/data/salary.table similarity index 100% rename from pandas/io/tests/salary.table rename to pandas/io/tests/data/salary.table diff --git a/pandas/io/tests/test.xls b/pandas/io/tests/data/test.xls similarity index 100% rename from pandas/io/tests/test.xls rename to pandas/io/tests/data/test.xls diff --git a/pandas/io/tests/test.xlsx b/pandas/io/tests/data/test.xlsx similarity index 100% rename from pandas/io/tests/test.xlsx rename to pandas/io/tests/data/test.xlsx diff --git a/pandas/io/tests/test1.csv b/pandas/io/tests/data/test1.csv similarity index 100% rename from pandas/io/tests/test1.csv rename to pandas/io/tests/data/test1.csv diff --git a/pandas/io/tests/test2.csv b/pandas/io/tests/data/test2.csv similarity index 100% rename from pandas/io/tests/test2.csv rename to pandas/io/tests/data/test2.csv diff --git a/pandas/io/tests/test2.xls b/pandas/io/tests/data/test2.xls similarity index 100% rename from pandas/io/tests/test2.xls rename to pandas/io/tests/data/test2.xls diff --git a/pandas/io/tests/test3.xls b/pandas/io/tests/data/test3.xls similarity index 100% rename from pandas/io/tests/test3.xls rename to pandas/io/tests/data/test3.xls diff --git a/pandas/io/tests/data/unicode_series.csv b/pandas/io/tests/data/unicode_series.csv new file mode 100644 index 0000000000000..2485e149edb06 --- /dev/null +++ b/pandas/io/tests/data/unicode_series.csv @@ -0,0 +1,18 @@ +1617,King of New York (1990) +1618,All Things Fair (1996) +1619,"Sixth Man, The (1997)" +1620,Butterfly Kiss (1995) +1621,"Paris, France (1993)" +1622,"C�r�monie, La (1995)" +1623,Hush (1998) +1624,Nightwatch (1997) +1625,Nobody Loves Me (Keiner liebt mich) (1994) +1626,"Wife, The (1995)" +1627,Lamerica (1994) +1628,Nico Icon (1995) +1629,"Silence of the Palace, The (Saimt el Qusur) (1994)" +1630,"Slingshot, The (1993)" +1631,Land and Freedom (Tierra y libertad) (1995) +1632,� k�ldum klaka (Cold Fever) (1994) +1633,Etz Hadomim Tafus (Under the Domin Tree) (1994) +1634,Two Friends (1986) diff --git a/pandas/io/tests/utf16_ex.txt b/pandas/io/tests/data/utf16_ex.txt similarity index 100% rename from pandas/io/tests/utf16_ex.txt rename to pandas/io/tests/data/utf16_ex.txt diff --git a/pandas/io/tests/test_cparser.py b/pandas/io/tests/test_cparser.py index 5a7e646eca0eb..b352b189a74b8 100644 --- a/pandas/io/tests/test_cparser.py +++ b/pandas/io/tests/test_cparser.py @@ -31,15 +31,10 @@ import pandas._parser as parser -def curpath(): - pth, _ = os.path.split(os.path.abspath(__file__)) - return pth - - class TestCParser(unittest.TestCase): def setUp(self): - self.dirpath = curpath() + self.dirpath = tm.get_data_path('/') self.csv1 = os.path.join(self.dirpath, 'test1.csv') self.csv2 = os.path.join(self.dirpath, 'test2.csv') self.xls1 = os.path.join(self.dirpath, 'test.xls') diff --git a/pandas/io/tests/test_excel.py b/pandas/io/tests/test_excel.py index 00005c7570a28..ccd9cbc56b2a5 100644 --- a/pandas/io/tests/test_excel.py +++ b/pandas/io/tests/test_excel.py @@ -65,10 +65,6 @@ def _skip_if_no_excelsuite(): _skip_if_no_openpyxl() -def curpath(): - pth, _ = os.path.split(os.path.abspath(__file__)) - return pth - _seriesd = tm.getSeriesData() _tsd = tm.getTimeSeriesData() _frame = DataFrame(_seriesd)[:10] @@ -81,7 +77,7 @@ def curpath(): class ExcelTests(unittest.TestCase): def setUp(self): - self.dirpath = curpath() + self.dirpath = tm.get_data_path() self.csv1 = os.path.join(self.dirpath, 'test1.csv') self.csv2 = os.path.join(self.dirpath, 'test2.csv') self.xls1 = os.path.join(self.dirpath, 'test.xls') diff --git a/pandas/io/tests/test_parsers.py b/pandas/io/tests/test_parsers.py index 358f64df685d7..0e64211163ae3 100644 --- a/pandas/io/tests/test_parsers.py +++ b/pandas/io/tests/test_parsers.py @@ -59,7 +59,7 @@ def setUp(self): import warnings warnings.filterwarnings(action='ignore', category=FutureWarning) - self.dirpath = curpath() + self.dirpath = tm.get_data_path() self.csv1 = os.path.join(self.dirpath, 'test1.csv') self.csv2 = os.path.join(self.dirpath, 'test2.csv') self.xls1 = os.path.join(self.dirpath, 'test.xls') @@ -1208,7 +1208,7 @@ def test_url(self): url = ('https://raw.github.com/pydata/pandas/master/' 'pandas/io/tests/salary.table') url_table = self.read_table(url) - dirpath = curpath() + dirpath = tm.get_data_path() localtable = os.path.join(dirpath, 'salary.table') local_table = self.read_table(localtable) tm.assert_frame_equal(url_table, local_table) @@ -1229,7 +1229,7 @@ def test_file(self): # FILE if sys.version_info[:2] < (2, 6): raise nose.SkipTest("file:// not supported with Python < 2.6") - dirpath = curpath() + dirpath = tm.get_data_path() localtable = os.path.join(dirpath, 'salary.table') local_table = self.read_table(localtable) @@ -1404,7 +1404,7 @@ def test_utf16_bom_skiprows(self): tm.assert_frame_equal(result, expected) def test_utf16_example(self): - path = os.path.join(self.dirpath, 'utf16_ex.txt') + path = tm.get_data_path('utf16_ex.txt') # it works! and is the right length result = self.read_table(path, encoding='utf-16') @@ -1476,8 +1476,7 @@ def convert_score(x): tm.assert_frame_equal(result, result2) def test_unicode_encoding(self): - pth = psplit(psplit(curpath())[0])[0] - pth = os.path.join(pth, 'tests/data/unicode_series.csv') + pth = tm.get_data_path('unicode_series.csv') result = self.read_csv(pth, header=None, encoding='latin-1') result = result.set_index(0) @@ -2185,11 +2184,6 @@ def assert_same_values_and_dtype(res, exp): assert_almost_equal(res, exp) -def curpath(): - pth, _ = os.path.split(os.path.abspath(__file__)) - return pth - - if __name__ == '__main__': nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'], exit=False) diff --git a/pandas/io/tests/test_pickle.py b/pandas/io/tests/test_pickle.py new file mode 100644 index 0000000000000..fc04f2c8500c5 --- /dev/null +++ b/pandas/io/tests/test_pickle.py @@ -0,0 +1,32 @@ +# pylint: disable=E1101,E1103,W0232 + +from datetime import datetime, timedelta +import operator +import pickle +import unittest +import nose +import os + +import numpy as np +from numpy.testing import assert_array_equal +from pandas.util.testing import assert_almost_equal +from pandas.util import py3compat +import pandas.core.common as com + +import pandas.util.testing as tm +import pandas as pd + +class TestPickle(unittest.TestCase): + _multiprocess_can_split_ = True + + def setUp(self): + pass + + #def test_hash_error(self): + # self.assertRaises(TypeError, hash, self.strIndex) + +if __name__ == '__main__': + import nose + nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'], + # '--with-coverage', '--cover-package=pandas.core'], + exit=False) diff --git a/pandas/io/tests/test_pytables.py b/pandas/io/tests/test_pytables.py index 1973c578cb9e6..6acf17b1220a7 100644 --- a/pandas/io/tests/test_pytables.py +++ b/pandas/io/tests/test_pytables.py @@ -2324,25 +2324,23 @@ def _check_roundtrip_table(self, obj, comparator, compression=False): comparator(retrieved, obj) def test_pytables_native_read(self): - pth = curpath() try: - store = HDFStore(os.path.join(pth, 'pytables_native.h5'), 'r') + store = HDFStore(tm.get_data_path('legacy_hdf/pytables_native.h5'), 'r') d2 = store['detector/readout'] finally: safe_close(store) try: - store = HDFStore(os.path.join(pth, 'pytables_native2.h5'), 'r') + store = HDFStore(tm.get_data_path('legacy_hdf/pytables_native2.h5'), 'r') str(store) d1 = store['detector'] finally: safe_close(store) def test_legacy_read(self): - pth = curpath() try: - store = HDFStore(os.path.join(pth, 'legacy.h5'), 'r') + store = HDFStore(tm.get_data_path('legacy_hdf/legacy.h5'), 'r') store['a'] store['b'] store['c'] @@ -2352,9 +2350,8 @@ def test_legacy_read(self): def test_legacy_table_read(self): # legacy table types - pth = curpath() try: - store = HDFStore(os.path.join(pth, 'legacy_table.h5'), 'r') + store = HDFStore(tm.get_data_path('legacy_hdf/legacy_table.h5'), 'r') store.select('df1') store.select('df2') store.select('wp1') @@ -2376,23 +2373,21 @@ def test_legacy_table_read(self): def test_legacy_0_10_read(self): # legacy from 0.10 - pth = curpath() try: - store = HDFStore(os.path.join(pth, 'legacy_0.10.h5'), 'r') + store = HDFStore(tm.get_data_path('legacy_hdf/legacy_0.10.h5'), 'r') for k in store.keys(): store.select(k) finally: safe_close(store) def test_copy(self): - pth = curpath() def do_copy(f = None, new_f = None, keys = None, propindexes = True, **kwargs): try: import os if f is None: - f = os.path.join(pth, 'legacy_0.10.h5') + f = tm.get_data_path('legacy_hdf/legacy_0.10.h5') store = HDFStore(f, 'r') @@ -2446,11 +2441,10 @@ def test_legacy_table_write(self): raise nose.SkipTest # legacy table types - pth = curpath() df = tm.makeDataFrame() wp = tm.makePanel() - store = HDFStore(os.path.join(pth, 'legacy_table.h5'), 'a') + store = HDFStore(tm.get_data_path('legacy_hdf/legacy_table.h5'), 'a') self.assertRaises(Exception, store.append, 'df1', df) self.assertRaises(Exception, store.append, 'wp1', wp) @@ -2532,11 +2526,6 @@ def test_store_datetime_mixed(self): # self.assertRaises(Exception, store.put, 'foo', df, table=True) -def curpath(): - pth, _ = os.path.split(os.path.abspath(__file__)) - return pth - - def _test_sort(obj): if isinstance(obj, DataFrame): return obj.reindex(sorted(obj.index)) diff --git a/pandas/tests/test_format.py b/pandas/tests/test_format.py index cb55061ae7c3e..1cfcb465ce6a0 100644 --- a/pandas/tests/test_format.py +++ b/pandas/tests/test_format.py @@ -27,11 +27,6 @@ _frame = DataFrame(tm.getSeriesData()) -def curpath(): - pth, _ = os.path.split(os.path.abspath(__file__)) - return pth - - class TestDataFrameFormatting(unittest.TestCase): _multiprocess_can_split_ = True @@ -491,8 +486,7 @@ def test_unicode_problem_decoding_as_ascii(self): unicode(dm.to_string()) def test_string_repr_encoding(self): - pth = curpath() - filepath = os.path.join(pth, 'data', 'unicode_series.csv') + filepath = tm.get_data_path('unicode_series.csv') df = pandas.read_csv(filepath, header=None, encoding='latin1') repr(df) repr(df[1]) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index bc2aa7628bf28..a3205f3834be7 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -93,6 +93,20 @@ def ensure_clean(filename = None): except: pass +def get_data_path(f = None): + """ return the path of a data file, these are relative to the current test dir """ + + if f is None: + f = '' + import inspect, os + + # get our callers file + frame,filename,line_number,function_name,lines,index = \ + inspect.getouterframes(inspect.currentframe())[1] + + base_dir = os.path.abspath(os.path.dirname(filename)) + return os.path.join(base_dir, 'data/%s' % f) + #------------------------------------------------------------------------------ # Comparators From f600e204cc199838c4ab8f2153b4217b03595680 Mon Sep 17 00:00:00 2001 From: jreback Date: Wed, 10 Apr 2013 09:41:30 -0400 Subject: [PATCH 2/5] ENH: added legacy pickel generation/testing suppport TST: added io/tests/test_pickle.py to test stored pickles added io/tests/generate_legacy_pickles.py to create legacy pickles on various arch and sytems (need contributions) added some sample pickles for 0.10.1/0.11.0 --- .../0.10.1/AMD64_windows_2.7.3.pickle | Bin 0 -> 2267 bytes .../0.10.1/x86_64_linux_2.7.3.pickle | Bin 0 -> 2245 bytes .../0.11.0/x86_64_linux_2.7.3.pickle | Bin 0 -> 2245 bytes pandas/io/tests/generate_legacy_pickles.py | 74 ++++++++++++++++++ pandas/io/tests/test_pickle.py | 39 +++++++-- 5 files changed, 105 insertions(+), 8 deletions(-) create mode 100644 pandas/io/tests/data/legacy_pickle/0.10.1/AMD64_windows_2.7.3.pickle create mode 100644 pandas/io/tests/data/legacy_pickle/0.10.1/x86_64_linux_2.7.3.pickle create mode 100644 pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_2.7.3.pickle create mode 100644 pandas/io/tests/generate_legacy_pickles.py diff --git a/pandas/io/tests/data/legacy_pickle/0.10.1/AMD64_windows_2.7.3.pickle b/pandas/io/tests/data/legacy_pickle/0.10.1/AMD64_windows_2.7.3.pickle new file mode 100644 index 0000000000000000000000000000000000000000..a78e0214775a63209c3d5443e18f66663d93abfc GIT binary patch literal 2267 zcmbVNTW=Fb6yEg(l4(oh;*egrlv~+A>p}<=C~ce&62cNE4H+)2tZLVpFjnn#&hA(u z5)rLL9Fd2JXP)>M`~V)Q`pg?|y!54y@Kk2!V();HsI?`ZUCo&@-}jyGjDJt9fbHNN z5ecg#0{)hEaJF8(OBNtg37Yk#~vgv-OjGcnrMM7FA)SiI5l(5wOpHL^g3=D+xJSP($#7S*agny=PL#Ju_vf)CbvENkPhKOaBHl}fzehd901XuwC4 zMYWeOYND+M3*;`E3fS4t1+9txiVg-$R%$taF z5PUxP2Yg|q@Me%O@M;knt2HXWO?!cNhlB|B^2~i@*zauOo!CKeplzEk1&Pcm?d85b z=wN#k+hf?igza%6T5mM#(Ep}P%5XS_Bt{hR0TiPNN7_J+iqi4SwdkINn`95R=!wq} zcFKH}DATPkvYhq4Da|s+5@ooFrnQM2$IW2--GN$ha4LvgJN~kk8n3^fym^$*S=NQ2 zjhAtJ`0P-jpT`&TPw&O?*emyWe~y{w4kpfxJ96B?8Gb38f)gSR!Pg?5hHpe1hJuJ^ z;9J6cuJK8(G3|8slq@H^JH(so>7I6SPA7AQdH1{IoJr=K<=*I$^IbCM9Ji3nA#1)* zb2K*ac^aGZLK(g{QC<`~QxfG5%7e;%yE&;JjSi22Gc80qIu&M5({WHUPds(yE`jH_^AwYrU=)QXUy~e z>?ua-qk!eZ7~D|(9-tFklADGkx7w1d+o`qqc6cJ$=wE$1=x7zyii-LM*Ri99%zJ%b h#{ars*U77MbRDJgZA0aslM4LeP)rr)SmUT!cnd=j8(#nb literal 0 HcmV?d00001 diff --git a/pandas/io/tests/data/legacy_pickle/0.10.1/x86_64_linux_2.7.3.pickle b/pandas/io/tests/data/legacy_pickle/0.10.1/x86_64_linux_2.7.3.pickle new file mode 100644 index 0000000000000000000000000000000000000000..a9c288a01df050861cf5fe32d4d8956212d5026c GIT binary patch literal 2245 zcmbtV%W@M(6rIt7N9Se7GR}(-NC?AA*s^gPRT+Y8b=3=&y(mtL z>!2I59D)O`wS{eedl3#guI*;G;*w~Yt*sIShj8lpm}|K6~T%jK)D_#=PZ zN#;MU0CMIm^|-b^jz#sFkCti;5;3o_ir|CNP+_z%JUB9#cu={_Yk!E-E6pZ+G*?t* z2%{$MTChwWpi;m_M@sS)KJGyOB!*5o+L}h&BhgNnXf2KwI~uC3UQ#NiRm`Z!%3E!} z+;00gT?-iW(k$)D^{G0uXNQ7nzoie*-<%WeqVC(H!v2u5EA^(wAZLK;?+US^g*dXm z5HY?NlL}`sj)zoyxoP4a_&>N?IJ**h4FaESz~>IlXtPKQ%M~=^F>hAnAo$|+Blyxt z;f)|+;MF5EU2j%@pZ5aqHxeTFif10Jz}L<$wh`umV;#qQBRFKX=wWW&;|{i`usx0K z%h;YFvg<~pPP{K+Qh{#;AbCp>zk~92!gn1QCq-p`>)P~4!bY+Dd$hyn@VZ65?-Y3_ zFPcS8b&BvyG_SqmIBo{pZ(gDe2d9EaBDYyvU8(0!{`)i6YgyxkKmHZ*@!u!%{XG7& z^w+wGr=Gb_`+J#r>gmp@q7i2toZ(Yo2+qn_fO9eq!+9A;ATQ%ZxImcCwH@Tz(r!RCmce0x@oJbkrE#D#KVj^Xf`(cNa9}+2J+%<6u+4gy+R6IG>-5wob}q;SJu_h1e6;TO;Mo5u?BL0NL%E`CbKzhJI5Cbkhbp zPf*KAYL_LonF?Gnsm&%f&l#KP0H^kgL9NuG#%wH=XYF7S z^?88Kayf1pa@CL UV+edV!Tz2@F;#qpyiqIv8bUi0D*ylh literal 0 HcmV?d00001 diff --git a/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_2.7.3.pickle b/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_2.7.3.pickle new file mode 100644 index 0000000000000000000000000000000000000000..a9c288a01df050861cf5fe32d4d8956212d5026c GIT binary patch literal 2245 zcmbtV%W@M(6rIt7N9Se7GR}(-NC?AA*s^gPRT+Y8b=3=&y(mtL z>!2I59D)O`wS{eedl3#guI*;G;*w~Yt*sIShj8lpm}|K6~T%jK)D_#=PZ zN#;MU0CMIm^|-b^jz#sFkCti;5;3o_ir|CNP+_z%JUB9#cu={_Yk!E-E6pZ+G*?t* z2%{$MTChwWpi;m_M@sS)KJGyOB!*5o+L}h&BhgNnXf2KwI~uC3UQ#NiRm`Z!%3E!} z+;00gT?-iW(k$)D^{G0uXNQ7nzoie*-<%WeqVC(H!v2u5EA^(wAZLK;?+US^g*dXm z5HY?NlL}`sj)zoyxoP4a_&>N?IJ**h4FaESz~>IlXtPKQ%M~=^F>hAnAo$|+Blyxt z;f)|+;MF5EU2j%@pZ5aqHxeTFif10Jz}L<$wh`umV;#qQBRFKX=wWW&;|{i`usx0K z%h;YFvg<~pPP{K+Qh{#;AbCp>zk~92!gn1QCq-p`>)P~4!bY+Dd$hyn@VZ65?-Y3_ zFPcS8b&BvyG_SqmIBo{pZ(gDe2d9EaBDYyvU8(0!{`)i6YgyxkKmHZ*@!u!%{XG7& z^w+wGr=Gb_`+J#r>gmp@q7i2toZ(Yo2+qn_fO9eq!+9A;ATQ%ZxImcCwH@Tz(r!RCmce0x@oJbkrE#D#KVj^Xf`(cNa9}+2J+%<6u+4gy+R6IG>-5wob}q;SJu_h1e6;TO;Mo5u?BL0NL%E`CbKzhJI5Cbkhbp zPf*KAYL_LonF?Gnsm&%f&l#KP0H^kgL9NuG#%wH=XYF7S z^?88Kayf1pa@CL UV+edV!Tz2@F;#qpyiqIv8bUi0D*ylh literal 0 HcmV?d00001 diff --git a/pandas/io/tests/generate_legacy_pickles.py b/pandas/io/tests/generate_legacy_pickles.py new file mode 100644 index 0000000000000..47f2fc73f8e8b --- /dev/null +++ b/pandas/io/tests/generate_legacy_pickles.py @@ -0,0 +1,74 @@ +""" self-contained to write legacy pickle files """ + +def create_data(): + """ create the pickle data """ + + import numpy as np + import pandas + from pandas import (Series,DataFrame,Panel, + SparseSeries,SparseDataFrame,SparsePanel, + Index,MultiIndex,PeriodIndex, + date_range,Timestamp) + + data = { + 'A': [0., 1., 2., 3., np.nan], + 'B': [0, 1, 0, 1, 0], + 'C': ['foo1', 'foo2', 'foo3', 'foo4', 'foo5'], + 'D': date_range('1/1/2009', periods=5), + 'E' : [0., 1, Timestamp('20100101'),'foo',2.], + } + + series = dict(float = Series(data['A']), + int = Series(data['B']), + mixed = Series(data['E'])) + frame = dict(float = DataFrame(dict(A = series['float'], B = series['float'] + 1)), + int = DataFrame(dict(A = series['int'] , B = series['int'] + 1)), + mixed = DataFrame(dict([ (k,data[k]) for k in ['A','B','C','D']]))) + panel = dict(float = Panel(dict(ItemA = frame['float'], ItemB = frame['float']+1))) + + return dict( series = series, + frame = frame, + panel = panel ) + +def write_legacy_pickles(): + + # force our cwd to be the first searched + import sys + sys.path.insert(0,'.') + + import os + import numpy as np + import pandas + import pandas.util.testing as tm + import platform as pl + import cPickle as pickle + + print "This script generates a pickle file for the current arch, system, and python version" + + base_dir, _ = os.path.split(os.path.abspath(__file__)) + base_dir = os.path.join(base_dir,'data/legacy_pickle') + + # could make this a parameter? + version = None + + + if version is None: + version = pandas.__version__ + pth = os.path.join(base_dir, str(version)) + try: + os.mkdir(pth) + except: + pass + + # construct a reasonable platform name + f = '_'.join([ str(pl.machine()), str(pl.system().lower()), str(pl.python_version()) ]) + pth = os.path.abspath(os.path.join(pth,'%s.pickle' % f)) + + fh = open(pth,'wb') + pickle.dump(create_data(),fh,pickle.HIGHEST_PROTOCOL) + fh.close() + + print "created pickle file: %s" % pth + +if __name__ == '__main__': + write_legacy_pickles() diff --git a/pandas/io/tests/test_pickle.py b/pandas/io/tests/test_pickle.py index fc04f2c8500c5..68e37e5a40322 100644 --- a/pandas/io/tests/test_pickle.py +++ b/pandas/io/tests/test_pickle.py @@ -1,5 +1,7 @@ # pylint: disable=E1101,E1103,W0232 +""" manage legacy pickle tests """ + from datetime import datetime, timedelta import operator import pickle @@ -8,11 +10,6 @@ import os import numpy as np -from numpy.testing import assert_array_equal -from pandas.util.testing import assert_almost_equal -from pandas.util import py3compat -import pandas.core.common as com - import pandas.util.testing as tm import pandas as pd @@ -20,10 +17,36 @@ class TestPickle(unittest.TestCase): _multiprocess_can_split_ = True def setUp(self): - pass + from pandas.io.tests.generate_legacy_pickles import create_data + self.data = create_data() + + def compare(self, vf): + + fh = open(vf,'rb') + data = pickle.load(fh) + fh.close() + + for typ, dv in data.items(): + for dt, result in dv.items(): + + expected = self.data[typ][dt] + + comparator = getattr(tm,"assert_%s_equal" % typ) + comparator(result,expected) + + def test_read_pickles_0_10_1(self): + + pth = tm.get_data_path('legacy_pickle/0.10.1') + for f in os.listdir(pth): + vf = os.path.join(pth,f) + self.compare(vf) + + def test_read_pickles_0_11_0(self): - #def test_hash_error(self): - # self.assertRaises(TypeError, hash, self.strIndex) + pth = tm.get_data_path('legacy_pickle/0.11.0') + for f in os.listdir(pth): + vf = os.path.join(pth,f) + self.compare(vf) if __name__ == '__main__': import nose From 76b0c545056fd5d21a39392345be7fb7d4e48aa2 Mon Sep 17 00:00:00 2001 From: jreback Date: Wed, 10 Apr 2013 11:20:37 -0400 Subject: [PATCH 3/5] BLD: fix setup.py to load correctly data files --- setup.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 8cc08c2a38d8b..707e9e0efc55c 100755 --- a/setup.py +++ b/setup.py @@ -666,12 +666,14 @@ def pxd(name): 'pandas.io.tests', 'pandas.stats.tests', ], - package_data={'pandas.io': ['tests/*.h5', - 'tests/*.csv', - 'tests/*.txt', - 'tests/*.xls', - 'tests/*.xlsx', - 'tests/*.table'], + package_data={'pandas.io': ['tests/data/legacy_hdf/*.h5', + 'tests/data/legacy_pickle/0.10.1/*.pickle', + 'tests/data/legacy_pickle/0.11.0/*.pickle', + 'tests/data/*.csv', + 'tests/data/*.txt', + 'tests/data/*.xls', + 'tests/data/*.xlsx', + 'tests/data/*.table'], 'pandas.tools': ['tests/*.csv'], 'pandas.tests': ['data/*.pickle', 'data/*.csv'], From e71b09daa17c202b3006d14b9b958e0b719acfaa Mon Sep 17 00:00:00 2001 From: jreback Date: Thu, 11 Apr 2013 07:31:32 -0400 Subject: [PATCH 4/5] BUG: reading py2 pickles in py3 ok now --- RELEASE.rst | 1 + pandas/core/common.py | 10 +++++----- pandas/io/tests/test_pickle.py | 10 +++++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/RELEASE.rst b/RELEASE.rst index a542a406fcfaa..ce5ded5cd61c8 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -293,6 +293,7 @@ pandas 0.11.0 - fixed pretty priniting of sets (GH3294_) - Panel() and Panel.from_dict() now respects ordering when give OrderedDict (GH3303_) - DataFrame where with a datetimelike incorrectly selecting (GH3311_) + - Ensure pickles created in py2 can be read in py3 .. _GH3294: https://github.com/pydata/pandas/issues/3294 .. _GH622: https://github.com/pydata/pandas/issues/622 diff --git a/pandas/core/common.py b/pandas/core/common.py index 2ec2fc97258de..4acaa3f421e3a 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -1575,12 +1575,12 @@ def load(path): ------- unpickled : type of object stored in file """ - f = open(path, 'rb') try: - return pickle.load(f) - finally: - f.close() - + with open(path,'rb') as fh: + return pickle.load(fh) + except: + with open(path,'rb') as fh: + return pickle.load(fh, encoding='latin1') class UTF8Recoder: """ diff --git a/pandas/io/tests/test_pickle.py b/pandas/io/tests/test_pickle.py index 68e37e5a40322..90059a136462f 100644 --- a/pandas/io/tests/test_pickle.py +++ b/pandas/io/tests/test_pickle.py @@ -22,9 +22,13 @@ def setUp(self): def compare(self, vf): - fh = open(vf,'rb') - data = pickle.load(fh) - fh.close() + # py3 compat when reading py2 pickle + try: + with open(vf,'rb') as fh: + data = pickle.load(fh) + except: + with open(vf,'rb') as fh: + data = pickle.load(fh, encoding='latin1') for typ, dv in data.items(): for dt, result in dv.items(): From e7a1a6b2791b905bb9e04b96bb81985a2d42a7d6 Mon Sep 17 00:00:00 2001 From: jreback Date: Thu, 11 Apr 2013 08:32:48 -0400 Subject: [PATCH 5/5] ENH: added py3 pickles, revsied to include SparseSeries/SparseDataFrame/Index/MultiIndex --- .../0.10.1/AMD64_windows_2.7.3.pickle | Bin 2267 -> 4381 bytes .../0.10.1/x86_64_linux_2.7.3.pickle | Bin 2245 -> 4338 bytes .../0.11.0/x86_64_linux_2.7.3.pickle | Bin 2245 -> 4338 bytes .../0.11.0/x86_64_linux_3.3.0.pickle | Bin 0 -> 5822 bytes pandas/io/tests/generate_legacy_pickles.py | 55 ++++++++++++++++-- pandas/io/tests/test_pickle.py | 19 +++++- pandas/sparse/tests/test_sparse.py | 3 +- 7 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_3.3.0.pickle diff --git a/pandas/io/tests/data/legacy_pickle/0.10.1/AMD64_windows_2.7.3.pickle b/pandas/io/tests/data/legacy_pickle/0.10.1/AMD64_windows_2.7.3.pickle index a78e0214775a63209c3d5443e18f66663d93abfc..84fbd0d989569135859288eeb525f483414f55f4 100644 GIT binary patch literal 4381 zcmb_fTWnNC7~Zp&UQW3cTS34I736T~%B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yE&;JjSi22Gc80qIu&M5({WHUPds(yE`jH_^AwYrU=)QXUy~e z>?ua-qk!eZ7~D|(9-tFklADGkx7w1d+o`qqc6cJ$=wE$1=x7zyii-LM*Ri99%zJ%b h#{ars*U77MbRDJgZA0aslM4LeP)rr)SmUT!cnd=j8(#nb diff --git a/pandas/io/tests/data/legacy_pickle/0.10.1/x86_64_linux_2.7.3.pickle b/pandas/io/tests/data/legacy_pickle/0.10.1/x86_64_linux_2.7.3.pickle index a9c288a01df050861cf5fe32d4d8956212d5026c..f0787f30c14533a5fd96d1fdb0b2707545b169a5 100644 GIT binary patch literal 4338 zcmb_fTWl0n7~X3yQ*Omp5U@f887^H*DTs*DmP#ojOQ9URz*=W^r=69(^z6(^TUZO~ zZmr728=`_%^u;$56MZo;#>7NJWt&zeoZx*-&X9n#v{zheOeHMhzvi2_r6NGV-v{mrmG@=8M9^ex1U z;XzfPRm8VzljM=SU{Ebe0pi^f4u^OC4G;T}JUNm0QaVh9KciqME54lX z@zjr`31X}!@D}2`=gwY1^o5$*zXIIz;YX(sCwlf@M*Q{rpVwXjyh|TFf_NfO_t~ZS zMz}PUbbr6D8agC1EKp(9aaxn3vqVzaXAaQWQ6vh}6!0UaCJb4ib09{Khea%hqwbyF3OPjRVzG;_4x+HPB@tJIeZaJC$jL#0F6my^vaw}- zb8EBX5yD}h{zl^OPp4@^R~z@E8d^}ZIlYO;Q#VdTYo%)u#)t?P3W^51r`fqJy^60= z-`2Z3nq^nB$nfzZ#CSIL_ucha=nSGSyg*$_Y6m&^6j} z!cXqxXkjm1YcbhpQYmyK($Pb_wlqm|fofLX1t{LEtkY1D)>|=WA3Ln^R$i8y%W8+M zilG|{FlT#N$GtRv_j`1U_(ML z(*WEn@^&;8=td~Ww~0BrNhIEOtw|DGtKW{Rd-EEs9>B_165M9TFb2m0yTj#S3z}3i zacu$%$1`(r8A^e8w@nG|PRHu#waBXNJu;Ab#bUrf=&YZQR&BUb~ z8{1gW9aDmC$0b1(xSu!$?~Rh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cS8b&BvyG_SqmIBo{pZ(gDe2d9EaBDYyvU8(0!{`)i6YgyxkKmHZ*@!u!%{XG7& z^w+wGr=Gb_`+J#r>gmp@q7i2toZ(Yo2+qn_fO9eq!+9A;ATQ%ZxImcCwH@Tz(r!RCmce0x@oJbkrE#D#KVj^Xf`(cNa9}+2J+%<6u+4gy+R6IG>-5wob}q;SJu_h1e6;TO;Mo5u?BL0NL%E`CbKzhJI5Cbkhbp zPf*KAYL_LonF?Gnsm&%f&l#KP0H^kgL9NuG#%wH=XYF7S z^?88Kayf1pa@CL UV+edV!Tz2@F;#qpyiqIv8bUi0D*ylh diff --git a/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_2.7.3.pickle b/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_2.7.3.pickle index a9c288a01df050861cf5fe32d4d8956212d5026c..f0787f30c14533a5fd96d1fdb0b2707545b169a5 100644 GIT binary patch literal 4338 zcmb_fTWl0n7~X3yQ*Omp5U@f887^H*DTs*DmP#ojOQ9URz*=W^r=69(^z6(^TUZO~ zZmr728=`_%^u;$56MZo;#>7NJWt&zeoZx*-&X9n#v{zheOeHMhzvi2_r6NGV-v{mrmG@=8M9^ex1U z;XzfPRm8VzljM=SU{Ebe0pi^f4u^OC4G;T}JUNm0QaVh9KciqME54lX z@zjr`31X}!@D}2`=gwY1^o5$*zXIIz;YX(sCwlf@M*Q{rpVwXjyh|TFf_NfO_t~ZS zMz}PUbbr6D8agC1EKp(9aaxn3vqVzaXAaQWQ6vh}6!0UaCJb4ib09{Khea%hqwbyF3OPjRVzG;_4x+HPB@tJIeZaJC$jL#0F6my^vaw}- zb8EBX5yD}h{zl^OPp4@^R~z@E8d^}ZIlYO;Q#VdTYo%)u#)t?P3W^51r`fqJy^60= z-`2Z3nq^nB$nfzZ#CSIL_ucha=nSGSyg*$_Y6m&^6j} z!cXqxXkjm1YcbhpQYmyK($Pb_wlqm|fofLX1t{LEtkY1D)>|=WA3Ln^R$i8y%W8+M z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>IlXtPKQ%M~=^F>hAnAo$|+Blyxt z;f)|+;MF5EU2j%@pZ5aqHxeTFif10Jz}L<$wh`umV;#qQBRFKX=wWW&;|{i`usx0K z%h;YFvg<~pPP{K+Qh{#;AbCp>zk~92!gn1QCq-p`>)P~4!bY+Dd$hyn@VZ65?-Y3_ zFPcS8b&BvyG_SqmIBo{pZ(gDe2d9EaBDYyvU8(0!{`)i6YgyxkKmHZ*@!u!%{XG7& z^w+wGr=Gb_`+J#r>gmp@q7i2toZ(Yo2+qn_fO9eq!+9A;ATQ%ZxImcCwH@Tz(r!RCmce0x@oJbkrE#D#KVj^Xf`(cNa9}+2J+%<6u+4gy+R6IG>-5wob}q;SJu_h1e6;TO;Mo5u?BL0NL%E`CbKzhJI5Cbkhbp zPf*KAYL_LonF?Gnsm&%f&l#KP0H^kgL9NuG#%wH=XYF7S z^?88Kayf1pa@CL UV+edV!Tz2@F;#qpyiqIv8bUi0D*ylh diff --git a/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_3.3.0.pickle b/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_3.3.0.pickle new file mode 100644 index 0000000000000000000000000000000000000000..e6ed07d75da64251660e5e7471229b899047b758 GIT binary patch literal 5822 zcmbtY2Y6J)7T$z}vM5auY@pZ{m8ggsv5*iHVI|^#8cW2z$qjcyvdK9+ks@nE-5aqW zHtdSM_uhNOUcidIzxVX{o*G}{{b%mXf*78U&%59E|5MIA=gc`XvorVjZaIo2YD#0V zSOce;eJaXPv8^|?q%?J_YfWY9Q`xe*7WT`GOniJwr}h)+IF*c;Po=*SNoTarnN(9Y zKCY>yZsz1vCN;z7ICY0)k6P-PsLQl9x6X<5HMceCbc#7OCqAA1x|U2aHU*^9RNwJR}ATYC$t5^&Qz;;%e1 z8hN@!6f3bz+i2Pr9wtH>;rX?+9lSIVjw5X*vb4RpwS%}dQc;-+SF$vu9j#*x<+M}e z*v^VZ!Li`CF6{!BrdW%Xz8`A~6%qHe+}R%0*V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