summarylogtreecommitdiffstats
path: root/1544.patch
blob: ec9a6609515517358c703bfbcaf7b1b024fbd556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From 15a8f2beecde7bea2e990f1d5aa0c262beac8ee4 Mon Sep 17 00:00:00 2001
From: Martin Fleischmann <martin@martinfleischmann.net>
Date: Tue, 28 Jul 2020 20:38:05 +0100
Subject: [PATCH 1/3] BUG: fix version check for pandas 1.1.0

---
 geopandas/_compat.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/geopandas/_compat.py b/geopandas/_compat.py
index bdf6176b0..907678bc5 100644
--- a/geopandas/_compat.py
+++ b/geopandas/_compat.py
@@ -12,7 +12,7 @@
 
 PANDAS_GE_025 = str(pd.__version__) >= LooseVersion("0.25.0")
 PANDAS_GE_10 = str(pd.__version__) >= LooseVersion("0.26.0.dev")
-PANDAS_GE_11 = str(pd.__version__) >= LooseVersion("1.1.0.dev")
+PANDAS_GE_11 = str(pd.__version__) >= LooseVersion("1.1.0")
 
 
 # -----------------------------------------------------------------------------

From 6ce868a33a2f483b071089d51e178030fa4414d0 Mon Sep 17 00:00:00 2001
From: Martin Fleischmann <martin@martinfleischmann.net>
Date: Tue, 28 Jul 2020 20:40:02 +0100
Subject: [PATCH 2/3] add ValueError

---
 geopandas/tests/test_pandas_methods.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/geopandas/tests/test_pandas_methods.py b/geopandas/tests/test_pandas_methods.py
index d34fe8b12..68906e19d 100644
--- a/geopandas/tests/test_pandas_methods.py
+++ b/geopandas/tests/test_pandas_methods.py
@@ -279,7 +279,7 @@ def test_numerical_operations(s, df):
     with pytest.raises(TypeError):
         s.max()
 
-    with pytest.raises(TypeError):
+    with pytest.raises((TypeError, ValueError)):
         s.idxmax()
 
     # numerical ops raise an error

From 177d97fb68a18644dbc001d8e8fb7ce8a71ccf92 Mon Sep 17 00:00:00 2001
From: Martin Fleischmann <martin@martinfleischmann.net>
Date: Fri, 31 Jul 2020 18:02:35 +0100
Subject: [PATCH 3/3] comments

---
 geopandas/tests/test_pandas_methods.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/geopandas/tests/test_pandas_methods.py b/geopandas/tests/test_pandas_methods.py
index 68906e19d..354a63739 100644
--- a/geopandas/tests/test_pandas_methods.py
+++ b/geopandas/tests/test_pandas_methods.py
@@ -272,7 +272,7 @@ def test_numerical_operations(s, df):
     exp = pd.Series([3, 4], index=["value1", "value2"])
     assert_series_equal(df.sum(), exp)
 
-    # series methods raise error
+    # series methods raise error (not supported for geometry)
     with pytest.raises(TypeError):
         s.sum()
 
@@ -280,6 +280,7 @@ def test_numerical_operations(s, df):
         s.max()
 
     with pytest.raises((TypeError, ValueError)):
+        # TODO: remove ValueError after pandas-dev/pandas#32749
         s.idxmax()
 
     # numerical ops raise an error