Merge remote-tracking branch 'upstream/main' into deprecated_api · matplotlib/matplotlib@780bb45 · GitHub
Skip to content

Commit 780bb45

Browse files
Merge remote-tracking branch 'upstream/main' into deprecated_api
2 parents 5b205a7 + 870293a commit 780bb45

3 files changed

Lines changed: 9 additions & 21 deletions

File tree

Lines changed: 5 additions & 0 deletions

lib/matplotlib/lines.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,14 +1276,7 @@ def set_xdata(self, x):
12761276
x : 1D array
12771277
"""
12781278
if not np.iterable(x):
1279-
# When deprecation cycle is completed
1280-
# raise RuntimeError('x must be a sequence')
1281-
_api.warn_deprecated(
1282-
since="3.7",
1283-
message="Setting data with a non sequence type "
1284-
"is deprecated since %(since)s and will be "
1285-
"remove %(removal)s")
1286-
x = [x, ]
1279+
raise RuntimeError('x must be a sequence')
12871280
self._xorig = copy.copy(x)
12881281
self._invalidx = True
12891282
self.stale = True
@@ -1297,14 +1290,7 @@ def set_ydata(self, y):
12971290
y : 1D array
12981291
"""
12991292
if not np.iterable(y):
1300-
# When deprecation cycle is completed
1301-
# raise RuntimeError('y must be a sequence')
1302-
_api.warn_deprecated(
1303-
since="3.7",
1304-
message="Setting data with a non sequence type "
1305-
"is deprecated since %(since)s and will be "
1306-
"remove %(removal)s")
1307-
y = [y, ]
1293+
raise RuntimeError('y must be a sequence')
13081294
self._yorig = copy.copy(y)
13091295
self._invalidy = True
13101296
self.stale = True

lib/matplotlib/tests/test_lines.py

Lines changed: 2 additions & 5 deletions

0 commit comments

Comments
 (0)