Skip to content

Commit 87b9035

Browse files
committed
pythongh-92613: Deprecate built-in decoding support for uuencode in email
1 parent 9b28da8 commit 87b9035

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Lib/email/message.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
__all__ = ['Message', 'EmailMessage']
88

99
import binascii
10-
import re
1110
import quopri
11+
import re
12+
import warnings
1213
from io import BytesIO, StringIO
1314

1415
# Intrapackage imports
@@ -318,6 +319,10 @@ def get_payload(self, i=None, decode=False):
318319
self.policy.handle_defect(self, defect)
319320
return value
320321
elif cte in ('x-uuencode', 'uuencode', 'uue', 'x-uue'):
322+
warnings._deprecated(
323+
'Support for decoding legacy uuencoded payloads in messages '
324+
'is deprecated and scheduled for removal in Python {remove}',
325+
remove=(3, 13))
321326
try:
322327
return _decode_uu(bpayload)
323328
except ValueError:

0 commit comments

Comments
 (0)