Skip to content

Commit 2ffe75b

Browse files
committed
Non-maintainer upload. * Apply patch by Rebecca N. Palmer Closes: #858260
1 parent fed980c commit 2ffe75b

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

debian/changelog

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
pandas (0.19.2-5.1) unstable; urgency=medium
2+
3+
* Non-maintainer upload.
4+
* Apply patch by Rebecca N. Palmer
5+
Closes: #858260
6+
7+
-- Andreas Tille <[email protected]> Sun, 02 Apr 2017 07:06:36 +0200
8+
19
pandas (0.19.2-5) unstable; urgency=medium
210

311
* And one more test to skip on non-amd64 -- test_round_trip_valid_encodings

debian/patches/858260.patch

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Author: Rebecca N. Palmer <[email protected]>
2+
Bug-Debian: https://bugs.debian.org/858260
3+
Last-Update: Sat, 1 Apr 2017 23:21:31 +0100
4+
Description: Use tiinfo correctly
5+
The underlying issue (but not strictly a bug as the documentation
6+
specifically says not to do that -
7+
http://sources.debian.net/src/python-tz/2016.7-0.2/pytz/tzinfo.py/#L247
8+
) is that passing a pytz tzinfo to the datetime constructor uses its
9+
first listed offset, not its correct offset for that date:
10+
.
11+
>>> datetime.datetime(2017,4,1,tzinfo=pytz.timezone('Europe/London'))
12+
datetime.datetime(2017, 4, 1, 0, 0, tzinfo=<DstTzInfo 'Europe/London'
13+
GMT0:00:00 STD>)
14+
>>> pytz.timezone('Europe/London').localize(datetime.datetime(2017,4,1))
15+
datetime.datetime(2017, 4, 1, 0, 0, tzinfo=<DstTzInfo 'Europe/London'
16+
BST+1:00:00 DST>)
17+
18+
--- a/pandas/tests/test_multilevel.py
19+
+++ b/pandas/tests/test_multilevel.py
20+
@@ -84,9 +84,9 @@ class TestMultiLevel(tm.TestCase):
21+
# GH 7112
22+
import pytz
23+
tz = pytz.timezone('Asia/Tokyo')
24+
- expected_tuples = [(1.1, datetime.datetime(2011, 1, 1, tzinfo=tz)),
25+
- (1.2, datetime.datetime(2011, 1, 2, tzinfo=tz)),
26+
- (1.3, datetime.datetime(2011, 1, 3, tzinfo=tz))]
27+
+ expected_tuples = [(1.1, tz.localize(datetime.datetime(2011, 1, 1))),
28+
+ (1.2, tz.localize(datetime.datetime(2011, 1, 2))),
29+
+ (1.3, tz.localize(datetime.datetime(2011, 1, 3)))]
30+
expected = Index([1.1, 1.2, 1.3] + expected_tuples)
31+
self.assert_index_equal(result, expected)
32+
33+
@@ -104,9 +104,9 @@ class TestMultiLevel(tm.TestCase):
34+
35+
result = midx_lv3.append(midx_lv2)
36+
expected = Index._simple_new(
37+
- np.array([(1.1, datetime.datetime(2011, 1, 1, tzinfo=tz), 'A'),
38+
- (1.2, datetime.datetime(2011, 1, 2, tzinfo=tz), 'B'),
39+
- (1.3, datetime.datetime(2011, 1, 3, tzinfo=tz), 'C')] +
40+
+ np.array([(1.1, tz.localize(datetime.datetime(2011, 1, 1)), 'A'),
41+
+ (1.2, tz.localize(datetime.datetime(2011, 1, 2)), 'B'),
42+
+ (1.3, tz.localize(datetime.datetime(2011, 1, 3)), 'C')] +
43+
expected_tuples), None)
44+
self.assert_index_equal(result, expected)
45+

debian/patches/series

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ deb_disable_googleanalytics
99
deb_skip_sequencelike_on_armel
1010
deb_skip_test_pytables_failure
1111
up_buggy_overflows
12+
858260.patch

0 commit comments

Comments
 (0)