Skip to content

Commit 24b19a8

Browse files
committed
debug
1 parent 147f4eb commit 24b19a8

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

pandas/core/categorical.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def __init__(self, values, categories=None, ordered=False, fastpath=False):
331331
# TODO: check for old style usage. These warnings should be removes
332332
# after 0.18/ in 2016
333333
if (is_integer_dtype(values) and
334-
not is_integer_dtype(dtype.categories)):
334+
not is_integer_dtype(dtype.categories)):
335335
warn("Values and categories have different dtypes. Did you "
336336
"mean to use\n'Categorical.from_codes(codes, "
337337
"categories)'?", RuntimeWarning, stacklevel=2)
@@ -345,6 +345,13 @@ def __init__(self, values, categories=None, ordered=False, fastpath=False):
345345
self._dtype = dtype
346346
self._codes = coerce_indexer_dtype(codes, dtype.categories)
347347

348+
def __getstate__(self):
349+
# import pdb; pdb.set_trace()
350+
pass
351+
def __setstate__(self):
352+
# import pdb; pdb.set_trace()
353+
super().__setstate__()
354+
348355
@property
349356
def categories(self):
350357
return self.dtype.categories

pandas/io/pickle.py

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def read_pickle(path, compression='infer'):
7474
"""
7575
path = _stringify_path(path)
7676
inferred_compression = _infer_compression(path, compression)
77+
# import pdb; pdb.set_trace()
7778

7879
def read_wrapper(func):
7980
# wrapper file handle open/close operation

pandas/tests/test_config.py

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33

44
import pandas as pd
5+
import pandas.util.testing as tm
56

67
import warnings
78

@@ -428,3 +429,8 @@ def test_option_context_scope(self):
428429

429430
# Ensure the current context is reset
430431
assert self.cf.get_option(option_name) == original_value
432+
433+
def test_html_border_deprecated(self):
434+
with tm.assert_produces_warning(FutureWarning):
435+
with pd.option_context("html.border", 0):
436+
pass

0 commit comments

Comments
 (0)