From 5f143a25b4a78bbb8591806aeeae6c6230b4551b Mon Sep 17 00:00:00 2001 From: Christos Gkoutzigiannis Date: Wed, 15 Jun 2022 14:40:32 +0300 Subject: [PATCH] Remove deprecated method delete_row --- gspread/worksheet.py | 17 ----------------- tests/worksheet_test.py | 14 -------------- 2 files changed, 31 deletions(-) diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 1974696cb..11f2336c6 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -1438,23 +1438,6 @@ def insert_cols(self, values, col=1, value_input_option=ValueInputOption.raw): return self.spreadsheet.values_append(range_label, params, body) - def delete_row(self, index): - """.. deprecated:: 5.0 - - Deletes the row from the worksheet at the specified index. - - :param int index: Index of a row for deletion. - """ - import warnings - - warnings.warn( - "Worksheet.delete_row() is deprecated, " - "Please use `Worksheet.delete_rows()` instead.", - DeprecationWarning, - stacklevel=2, - ) - return self.delete_rows(index) - @cast_to_a1_notation def add_protected_range( self, diff --git a/tests/worksheet_test.py b/tests/worksheet_test.py index ce07d4a51..5c4f1abe4 100644 --- a/tests/worksheet_test.py +++ b/tests/worksheet_test.py @@ -752,20 +752,6 @@ def test_insert_row(self): b3 = self.sheet.acell("B3", value_render_option=utils.ValueRenderOption.formula) self.assertEqual(b3.value, formula) - @pytest.mark.vcr() - def test_delete_row(self): - sg = self._sequence_generator() - - for i in range(5): - value_list = [next(sg) for i in range(10)] - self.sheet.append_row(value_list) - - prev_row = self.sheet.row_values(1) - next_row = self.sheet.row_values(3) - self.sheet.delete_row(2) - self.assertEqual(self.sheet.row_values(1), prev_row) - self.assertEqual(self.sheet.row_values(2), next_row) - @pytest.mark.vcr() def test_clear(self): rows = [