Skip to content

Commit 697d026

Browse files
authored
BUG: pickle compat with UTC tz's (#16611)
closes #16608
1 parent bf99975 commit 697d026

File tree

5 files changed

+99
-2
lines changed

5 files changed

+99
-2
lines changed

doc/source/whatsnew.rst

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ These are new features and improvements of note in each release.
2020

2121
.. include:: whatsnew/v0.21.0.txt
2222

23+
.. include:: whatsnew/v0.20.3.txt
24+
2325
.. include:: whatsnew/v0.20.2.txt
2426

2527
.. include:: whatsnew/v0.20.0.txt

doc/source/whatsnew/v0.20.3.txt

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
.. _whatsnew_0203:
2+
3+
v0.20.3 (June ??, 2017)
4+
-----------------------
5+
6+
This is a minor bug-fix release in the 0.20.x series and includes some small regression fixes,
7+
bug fixes and performance improvements.
8+
We recommend that all users upgrade to this version.
9+
10+
.. contents:: What's new in v0.20.3
11+
:local:
12+
:backlinks: none
13+
14+
15+
.. _whatsnew_0203.enhancements:
16+
17+
Enhancements
18+
~~~~~~~~~~~~
19+
20+
21+
22+
23+
24+
25+
.. _whatsnew_0203.performance:
26+
27+
Performance Improvements
28+
~~~~~~~~~~~~~~~~~~~~~~~~
29+
30+
31+
32+
33+
34+
35+
.. _whatsnew_0203.bug_fixes:
36+
37+
Bug Fixes
38+
~~~~~~~~~
39+
40+
41+
42+
43+
Conversion
44+
^^^^^^^^^^
45+
46+
- Bug in pickle compat prior to the v0.20.x series, when ``UTC`` is a timezone in a Series/DataFrame/Index (:issue:`16608`)
47+
48+
Indexing
49+
^^^^^^^^
50+
51+
52+
53+
I/O
54+
^^^
55+
56+
57+
58+
Plotting
59+
^^^^^^^^
60+
61+
62+
63+
64+
Groupby/Resample/Rolling
65+
^^^^^^^^^^^^^^^^^^^^^^^^
66+
67+
68+
69+
Sparse
70+
^^^^^^
71+
72+
73+
74+
75+
Reshaping
76+
^^^^^^^^^
77+
78+
79+
80+
Numeric
81+
^^^^^^^
82+
83+
84+
Categorical
85+
^^^^^^^^^^^
86+
87+
88+
Other
89+
^^^^^

pandas/compat/pickle_compat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def load_reduce(self):
1515
args = stack.pop()
1616
func = stack[-1]
1717

18-
if type(args[0]) is type:
18+
if len(args) and type(args[0]) is type:
1919
n = args[0].__name__ # noqa
2020

2121
try:
Binary file not shown.

pandas/tests/io/generate_legacy_storage_files.py

100644100755
+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/env/bin python
2+
13
""" self-contained to write legacy storage (pickle/msgpack) files """
24
from __future__ import print_function
35
from warnings import catch_warnings
@@ -125,7 +127,11 @@ def create_data():
125127
mixed_dup=mixed_dup_df,
126128
dt_mixed_tzs=DataFrame({
127129
u'A': Timestamp('20130102', tz='US/Eastern'),
128-
u'B': Timestamp('20130603', tz='CET')}, index=range(5))
130+
u'B': Timestamp('20130603', tz='CET')}, index=range(5)),
131+
dt_mixed2_tzs=DataFrame({
132+
u'A': Timestamp('20130102', tz='US/Eastern'),
133+
u'B': Timestamp('20130603', tz='CET'),
134+
u'C': Timestamp('20130603', tz='UTC')}, index=range(5))
129135
)
130136

131137
with catch_warnings(record=True):

0 commit comments

Comments
 (0)