Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c9e1350

Browse files
committed
Deprecate unused functions in _path
1 parent 251ae54 commit c9e1350

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

src/_path_wrapper.cpp

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,19 @@ static PyObject *Py_points_in_path(PyObject *self, PyObject *args)
9393

9494
const char *Py_point_on_path__doc__ =
9595
"point_on_path(x, y, radius, path, trans)\n"
96-
"--\n\n";
96+
"--\n\n"
97+
".. deprecated:: 3.8\n";
9798

9899
static PyObject *Py_point_on_path(PyObject *self, PyObject *args)
99100
{
101+
char const* msg =
102+
"_path.point_on_path is deprecated since Matplotlib 3.8 and will be removed "
103+
"two minor releases later as it is not used in the library. If you rely on "
104+
"it, please let us know.";
105+
if (PyErr_WarnEx(PyExc_DeprecationWarning, msg, 1)) {
106+
return NULL;
107+
}
108+
100109
double x, y, r;
101110
py::PathIterator path;
102111
agg::trans_affine trans;
@@ -125,10 +134,19 @@ static PyObject *Py_point_on_path(PyObject *self, PyObject *args)
125134

126135
const char *Py_points_on_path__doc__ =
127136
"points_on_path(points, radius, path, trans)\n"
128-
"--\n\n";
137+
"--\n\n"
138+
".. deprecated:: 3.8\n";
129139

130140
static PyObject *Py_points_on_path(PyObject *self, PyObject *args)
131141
{
142+
char const* msg =
143+
"_path.points_on_path is deprecated since Matplotlib 3.8 and will be removed "
144+
"two minor releases later as it is not used in the library. If you rely on "
145+
"it, please let us know.";
146+
if (PyErr_WarnEx(PyExc_DeprecationWarning, msg, 1)) {
147+
return NULL;
148+
}
149+
132150
numpy::array_view<const double, 2> points;
133151
double r;
134152
py::PathIterator path;
@@ -156,10 +174,19 @@ static PyObject *Py_points_on_path(PyObject *self, PyObject *args)
156174

157175
const char *Py_get_path_extents__doc__ =
158176
"get_path_extents(path, trans)\n"
159-
"--\n\n";
177+
"--\n\n"
178+
".. deprecated:: 3.8\n";
160179

161180
static PyObject *Py_get_path_extents(PyObject *self, PyObject *args)
162181
{
182+
char const* msg =
183+
"_path.get_path_extents is deprecated since Matplotlib 3.8 and will be "
184+
"removed two minor releases later as it is not used in the library. If you "
185+
"rely on it, please let us know.";
186+
if (PyErr_WarnEx(PyExc_DeprecationWarning, msg, 1)) {
187+
return NULL;
188+
}
189+
163190
py::PathIterator path;
164191
agg::trans_affine trans;
165192

0 commit comments

Comments
 (0)