Skip to content

Commit 4cab5b9

Browse files
committed
pythongh-92613: Add deprecation warning for binascii uuencode functions
1 parent bbc22c4 commit 4cab5b9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Modules/binascii.c

+14
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ binascii_a2b_uu_impl(PyObject *module, Py_buffer *data)
223223
Py_ssize_t ascii_len, bin_len;
224224
binascii_state *state;
225225

226+
if (PyErr_WarnEx(PyExc_DeprecationWarning,
227+
"'binascii.a2b_uu' is deprecated and scheduled for "
228+
"removal in Python 3.13",
229+
1)) {
230+
return NULL;
231+
}
232+
226233
ascii_data = data->buf;
227234
ascii_len = data->len;
228235

@@ -321,6 +328,13 @@ binascii_b2a_uu_impl(PyObject *module, Py_buffer *data, int backtick)
321328
Py_ssize_t bin_len, out_len;
322329
_PyBytesWriter writer;
323330

331+
if (PyErr_WarnEx(PyExc_DeprecationWarning,
332+
"'binascii.b2a_uu' is deprecated and scheduled for "
333+
"removal in Python 3.13",
334+
1)) {
335+
return NULL;
336+
}
337+
324338
_PyBytesWriter_Init(&writer);
325339
bin_data = data->buf;
326340
bin_len = data->len;

0 commit comments

Comments
 (0)