Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions python/grass/pygrass/vector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,6 @@ def write(self, geo_obj, cat=None, attrs=None):

"""
self.n_lines += 1
if not isinstance(cat, int) and not isinstance(cat, str):
# likely the case of using 7.0 API
import warnings

warnings.warn(
"Vector.write(geo_obj, attrs=(...)) is"
" deprecated, specify cat explicitly",
DeprecationWarning,
)
# try to accommodate
attrs = cat
cat = None
if attrs and cat is None:
# TODO: this does not work as expected when there are
# already features in the map when we opened it
Expand Down
8 changes: 4 additions & 4 deletions scripts/v.rast.stats/testsuite/test_v_rast_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def setUp(self):
vt.open("w", tab_cols=cols)
line1 = Line([(1, 1), (2, 1), (2, 2)])
line2 = Line([(10, 20), (15, 22), (20, 32), (30, 40)])
vt.write(line1, ("first",))
vt.write(line2, ("second",))
vt.write(line1, attrs=("first",))
vt.write(line2, attrs=("second",))
vt.table.conn.commit()
vt.close()

Expand All @@ -67,8 +67,8 @@ def setUp(self):
cent2 = Centroid(x=2.75, y=2.75)
vt.write(area1)
vt.write(area2)
vt.write(cent1, ("first",))
vt.write(cent2, ("second",))
vt.write(cent1, attrs=("first",))
vt.write(cent2, attrs=("second",))
vt.table.conn.commit()
vt.close()

Expand Down
Loading