diff options
author | Brett Cannon <brett@python.org> | 2022-04-30 01:22:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-30 01:22:10 (GMT) |
commit | c2b579741dc36f4b7da00d4361d651544996d8f4 (patch) | |
tree | 00a35a32af2cd12ce9b140a9fe31310a7aee4f0c | |
parent | 7861a9e3276cf9bf2bfa56d86f29ef06b2456f87 (diff) | |
download | cpython-c2b579741dc36f4b7da00d4361d651544996d8f4.zip cpython-c2b579741dc36f4b7da00d4361d651544996d8f4.tar.gz cpython-c2b579741dc36f4b7da00d4361d651544996d8f4.tar.bz2 |
gh-91217: deprecate xdrlib (GH-92066)
Automerge-Triggered-By: GH:brettcannon
-rw-r--r-- | Doc/whatsnew/3.11.rst | 1 | ||||
-rw-r--r-- | Lib/test/test_xdrlib.py | 4 | ||||
-rw-r--r-- | Lib/xdrlib.py | 3 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-04-21-21-06-54.gh-issue-91217.2cVma_.rst | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 5f1f995..3ba35a8 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1081,6 +1081,7 @@ Deprecated * :mod:`sunau` * :mod:`telnetlib` * :mod:`uu` + * :mod:`xdrlib` (Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in :gh:`68966`.) diff --git a/Lib/test/test_xdrlib.py b/Lib/test/test_xdrlib.py index 3df5f26..226b70a 100644 --- a/Lib/test/test_xdrlib.py +++ b/Lib/test/test_xdrlib.py @@ -1,6 +1,8 @@ import unittest +from test.support import warnings_helper + +xdrlib = warnings_helper.import_deprecated("xdrlib") -import xdrlib class XDRTest(unittest.TestCase): diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index d6e1aeb..b56ffa5 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -7,6 +7,9 @@ See: RFC 1014 import struct from io import BytesIO from functools import wraps +import warnings + +warnings._deprecated(__name__, remove=(3, 13)) __all__ = ["Error", "Packer", "Unpacker", "ConversionError"] diff --git a/Misc/NEWS.d/next/Library/2022-04-21-21-06-54.gh-issue-91217.2cVma_.rst b/Misc/NEWS.d/next/Library/2022-04-21-21-06-54.gh-issue-91217.2cVma_.rst new file mode 100644 index 0000000..14f2c4d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-04-21-21-06-54.gh-issue-91217.2cVma_.rst @@ -0,0 +1 @@ +Deprecate the xdrlib module. |