Skip to content

COMPAT: 3.6 #14679

Closed
Closed
@jreback

Description

@jreback

after #14678

Bunch of Deprecation Warnings

/home/travis/build/jreback/pandas/pandas/io/tests/json/test_pandas.py:974: DeprecationWarning: invalid escape sequence \[
  TypeError, '\[unicode\] is not implemented as a table column')

only a small number of 3.6 failures remain.

======================================================================
ERROR: pandas.io.tests.test_pickle.TestPickle.test_round_trip_current
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 52, in try_read
    return pkl.load(fh)
  File "pandas/tslib.pyx", line 407, in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:10434)
    ts = convert_to_tsobject(ts_input, tz, unit, 0, 0)
  File "pandas/tslib.pyx", line 1542, in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28780)
    raise TypeError('Cannot convert input to Timestamp')
TypeError: Cannot convert input to Timestamp
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 57, in try_read
    return pc.load(fh, encoding=encoding, compat=False)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
  File "pandas/tslib.pyx", line 407, in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:10434)
    ts = convert_to_tsobject(ts_input, tz, unit, 0, 0)
  File "pandas/tslib.pyx", line 1542, in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28780)
    raise TypeError('Cannot convert input to Timestamp')
TypeError: Cannot convert input to Timestamp
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 65, in read_pickle
    return try_read(path)
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 62, in try_read
    return pc.load(fh, encoding=encoding, compat=True)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
  File "pandas/tslib.pyx", line 407, in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:10434)
    ts = convert_to_tsobject(ts_input, tz, unit, 0, 0)
  File "pandas/tslib.pyx", line 1542, in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28780)
    raise TypeError('Cannot convert input to Timestamp')
TypeError: Cannot convert input to Timestamp
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 52, in try_read
    return pkl.load(fh)
  File "pandas/tslib.pyx", line 407, in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:10434)
    ts = convert_to_tsobject(ts_input, tz, unit, 0, 0)
  File "pandas/tslib.pyx", line 1542, in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28780)
    raise TypeError('Cannot convert input to Timestamp')
TypeError: Cannot convert input to Timestamp
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 57, in try_read
    return pc.load(fh, encoding=encoding, compat=False)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
  File "pandas/tslib.pyx", line 407, in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:10434)
    ts = convert_to_tsobject(ts_input, tz, unit, 0, 0)
  File "pandas/tslib.pyx", line 1542, in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28780)
    raise TypeError('Cannot convert input to Timestamp')
TypeError: Cannot convert input to Timestamp
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/jreback/pandas/pandas/io/tests/test_pickle.py", line 239, in test_round_trip_current
    result = pd.read_pickle(path)
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 68, in read_pickle
    return try_read(path, encoding='latin1')
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 62, in try_read
    return pc.load(fh, encoding=encoding, compat=True)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
  File "pandas/tslib.pyx", line 407, in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:10434)
    ts = convert_to_tsobject(ts_input, tz, unit, 0, 0)
  File "pandas/tslib.pyx", line 1542, in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28780)
    raise TypeError('Cannot convert input to Timestamp')
TypeError: Cannot convert input to Timestamp
======================================================================
ERROR: test_transactions (pandas.io.tests.test_sql.TestSQLiteFallback)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/sql.py", line 1401, in execute
    cur.execute(*args)
sqlite3.OperationalError: no such table: test_trans
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/tests/test_sql.py", line 2004, in test_transactions
    self._transaction_test()
  File "/home/travis/build/jreback/pandas/pandas/io/tests/test_sql.py", line 476, in _transaction_test
    res = self.pandasSQL.read_query('SELECT * FROM test_trans')
  File "/home/travis/build/jreback/pandas/pandas/io/sql.py", line 1436, in read_query
    cursor = self.execute(*args)
  File "/home/travis/build/jreback/pandas/pandas/io/sql.py", line 1413, in execute
    raise_with_traceback(ex)
  File "/home/travis/build/jreback/pandas/pandas/compat/__init__.py", line 339, in raise_with_traceback
    raise exc.with_traceback(traceback)
  File "/home/travis/build/jreback/pandas/pandas/io/sql.py", line 1401, in execute
    cur.execute(*args)
pandas.io.sql.DatabaseError: Execution failed on sql 'SELECT * FROM test_trans': no such table: test_trans
======================================================================
ERROR: test_roundtrip_pickle (pandas.tseries.tests.test_offsets.TestCustomBusinessMonthBegin)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tseries/tests/test_offsets.py", line 1980, in test_roundtrip_pickle
    _check_roundtrip(self._object())
  File "/home/travis/build/jreback/pandas/pandas/tseries/tests/test_offsets.py", line 1977, in _check_roundtrip
    unpickled = self.round_trip_pickle(obj)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 96, in round_trip_pickle
    pd.to_pickle(obj, path)
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 20, in to_pickle
    pkl.dump(obj, f, protocol=pkl.HIGHEST_PROTOCOL)
TypeError: can't pickle numpy.busdaycalendar objects
======================================================================
ERROR: test_roundtrip_pickle (pandas.tseries.tests.test_offsets.TestCustomBusinessMonthEnd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tseries/tests/test_offsets.py", line 1980, in test_roundtrip_pickle
    _check_roundtrip(self._object())
  File "/home/travis/build/jreback/pandas/pandas/tseries/tests/test_offsets.py", line 1977, in _check_roundtrip
    unpickled = self.round_trip_pickle(obj)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 96, in round_trip_pickle
    pd.to_pickle(obj, path)
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 20, in to_pickle
    pkl.dump(obj, f, protocol=pkl.HIGHEST_PROTOCOL)
TypeError: can't pickle numpy.busdaycalendar objects
======================================================================
ERROR: test_partial_slicing_with_multiindex (pandas.tseries.tests.test_timeseries.TestSlicing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tseries/tests/test_timeseries.py", line 4971, in test_partial_slicing_with_multiindex
    self.assertRaises(KeyError, f)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2380, in assertRaises
    _callable(*args, **kwargs)
  File "/home/travis/build/jreback/pandas/pandas/tseries/tests/test_timeseries.py", line 4969, in f
    df_multi.loc[('2013-06-19', 'ACCT1', 'ABC')]
  File "/home/travis/build/jreback/pandas/pandas/core/indexing.py", line 1309, in __getitem__
    return self._getitem_tuple(key)
  File "/home/travis/build/jreback/pandas/pandas/core/indexing.py", line 800, in _getitem_tuple
    self._has_valid_tuple(tup)
  File "/home/travis/build/jreback/pandas/pandas/core/indexing.py", line 150, in _has_valid_tuple
    if not self._has_valid_type(k, i):
  File "/home/travis/build/jreback/pandas/pandas/core/indexing.py", line 1409, in _has_valid_type
    if key not in ax:
  File "/home/travis/build/jreback/pandas/pandas/indexes/multi.py", line 1042, in __contains__
    self.get_loc(key)
  File "/home/travis/build/jreback/pandas/pandas/indexes/multi.py", line 1643, in get_loc
    loc = self._get_level_indexer(key, level=0)
  File "/home/travis/build/jreback/pandas/pandas/indexes/multi.py", line 1917, in _get_level_indexer
    i = labels.searchsorted(loc, side='left')
TypeError: '>' not supported between instances of 'int' and 'slice'
======================================================================
ERROR: test_pickle (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 52, in try_read
    return pkl.load(fh)
TypeError: __new__() takes exactly one argument (2 given)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 57, in try_read
    return pc.load(fh, encoding=encoding, compat=False)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
TypeError: __new__() takes exactly one argument (2 given)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 65, in read_pickle
    return try_read(path)
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 62, in try_read
    return pc.load(fh, encoding=encoding, compat=True)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
TypeError: __new__() takes exactly one argument (2 given)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 52, in try_read
    return pkl.load(fh)
TypeError: __new__() takes exactly one argument (2 given)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 57, in try_read
    return pc.load(fh, encoding=encoding, compat=False)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
TypeError: __new__() takes exactly one argument (2 given)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tseries/tests/test_timeseries.py", line 2219, in test_pickle
    p = self.round_trip_pickle(NaT)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 97, in round_trip_pickle
    return pd.read_pickle(path)
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 68, in read_pickle
    return try_read(path, encoding='latin1')
  File "/home/travis/build/jreback/pandas/pandas/io/pickle.py", line 62, in try_read
    return pc.load(fh, encoding=encoding, compat=True)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 117, in load
    return up.load()
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/pickle.py", line 1050, in load
    dispatch[key[0]](self)
  File "/home/travis/build/jreback/pandas/pandas/compat/pickle_compat.py", line 21, in load_reduce
    stack[-1] = func(*args)
TypeError: __new__() takes exactly one argument (2 given)
======================================================================
ERROR: Test case for when the object being moved has exactly one reference.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/test_util.py", line 326, in test_exactly_one_ref
    as_stolen_buf = move_into_mutable_buffer(b[:-3])
pandas.util._move.BadMove: b'test'
======================================================================
FAIL: test_argsort (pandas.tests.indexes.test_base.TestMixedIntIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1789, in test_argsort
    result = idx.argsort()
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1784, in argsort
    return result.argsort(*args, **kwargs)
TypeError: '>' not supported between instances of 'str' and 'int'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1789, in test_argsort
    result = idx.argsort()
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2452, in __exit__
    return self.handle_success(exc_type, exc_value, traceback)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2465, in handle_success
    raise_with_traceback(e, traceback)
  File "/home/travis/build/jreback/pandas/pandas/compat/__init__.py", line 339, in raise_with_traceback
    raise exc.with_traceback(traceback)
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1789, in test_argsort
    result = idx.argsort()
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1784, in argsort
    return result.argsort(*args, **kwargs)
AssertionError: "unorderable types" does not match "'>' not supported between instances of 'str' and 'int'"
======================================================================
FAIL: test_numpy_argsort (pandas.tests.indexes.test_base.TestMixedIntIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1799, in test_numpy_argsort
    result = np.argsort(idx)
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 913, in argsort
    return argsort(axis, kind, order)
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1784, in argsort
    return result.argsort(*args, **kwargs)
TypeError: '>' not supported between instances of 'str' and 'int'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1799, in test_numpy_argsort
    result = np.argsort(idx)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2452, in __exit__
    return self.handle_success(exc_type, exc_value, traceback)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2465, in handle_success
    raise_with_traceback(e, traceback)
  File "/home/travis/build/jreback/pandas/pandas/compat/__init__.py", line 339, in raise_with_traceback
    raise exc.with_traceback(traceback)
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1799, in test_numpy_argsort
    result = np.argsort(idx)
  File "/home/travis/miniconda/envs/pandas/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 913, in argsort
    return argsort(axis, kind, order)
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1784, in argsort
    return result.argsort(*args, **kwargs)
AssertionError: "unorderable types" does not match "'>' not supported between instances of 'str' and 'int'"
======================================================================
FAIL: test_order (pandas.tests.indexes.test_base.TestMixedIntIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1780, in test_order
    idx.order()
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1730, in order
    ascending=ascending)
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1710, in sort_values
    _as = self.argsort()
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1784, in argsort
    return result.argsort(*args, **kwargs)
TypeError: '>' not supported between instances of 'str' and 'int'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1780, in test_order
    idx.order()
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2452, in __exit__
    return self.handle_success(exc_type, exc_value, traceback)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2465, in handle_success
    raise_with_traceback(e, traceback)
  File "/home/travis/build/jreback/pandas/pandas/compat/__init__.py", line 339, in raise_with_traceback
    raise exc.with_traceback(traceback)
  File "/home/travis/build/jreback/pandas/pandas/tests/indexes/test_base.py", line 1780, in test_order
    idx.order()
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1730, in order
    ascending=ascending)
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1710, in sort_values
    _as = self.argsort()
  File "/home/travis/build/jreback/pandas/pandas/indexes/base.py", line 1784, in argsort
    return result.argsort(*args, **kwargs)
AssertionError: "unorderable types" does not match "'>' not supported between instances of 'str' and 'int'"
======================================================================
FAIL: test_basic_indexing (pandas.tests.series.test_indexing.TestSeriesIndexing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jreback/pandas/pandas/tests/series/test_indexing.py", line 1356, in test_basic_indexing
    self.assertRaises(IndexError, s.__setitem__, 5, 0)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2380, in assertRaises
    _callable(*args, **kwargs)
  File "/home/travis/build/jreback/pandas/pandas/util/testing.py", line 2450, in __exit__
    raise AssertionError("{0} not raised.".format(name))
AssertionError: IndexError not raised.
----------------------------------------------------------------------
Ran 10330 tests in 439.233s
FAILED (SKIP=724, errors=7, failures=4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Compatpandas objects compatability with Numpy or Python functions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions