8000 gh-92613: Deprecate other uuencode functionality per PEP 594 & document as such by CAM-Gerlach · Pull Request #92758 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-92613: Deprecate other uuencode functionality per PEP 594 & document as such #92758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
gh-92613: Add deprecation warning for binascii uuencode functions
  • Loading branch information
CAM-Gerlach committed Nov 8, 2022
commit 45112865d6b722c680ce15ff324a196bcbc69382
14 changes: 14 additions & 0 deletions Modules/binascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ binascii_a2b_uu_impl(PyObject *module, Py_buffer *data)
Py_ssize_t ascii_len, bin_len;
binascii_state *state;

if (PyErr_WarnEx(PyExc_DeprecationWarning,
"'binascii.a2b_uu' is deprecated and scheduled for "
"removal in Python 3.13",
1)) {
return NULL;
}

ascii_data = data->buf;
ascii_len = data->len;

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

if (PyErr_WarnEx(PyExc_DeprecationWarning,
"'binascii.b2a_uu' is deprecated and scheduled for "
"removal in Python 3.13",
1)) {
return NULL;
}

_PyBytesWriter_Init(&writer);
bin_data = data->buf;
bin_len = data->len;
Expand Down
0