Skip to content

Commit c2b5797

Browse files
authored
gh-91217: deprecate xdrlib (GH-92066)
Automerge-Triggered-By: GH:brettcannon
1 parent 7861a9e commit c2b5797

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

Doc/whatsnew/3.11.rst

+1
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,7 @@ Deprecated
10811081
* :mod:`sunau`
10821082
* :mod:`telnetlib`
10831083
* :mod:`uu`
1084+
* :mod:`xdrlib`
10841085

10851086
(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in
10861087
:gh:`68966`.)

Lib/test/test_xdrlib.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import unittest
2+
from test.support import warnings_helper
3+
4+
xdrlib = warnings_helper.import_deprecated("xdrlib")
25

3-
import xdrlib
46

57
class XDRTest(unittest.TestCase):
68

Lib/xdrlib.py

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import struct
88
from io import BytesIO
99
from functools import wraps
10+
import warnings
11+
12+
warnings._deprecated(__name__, remove=(3, 13))
1013

1114
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
1215

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate the xdrlib module.

0 commit comments

Comments
 (0)