summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/whatsnew/3.11.rst1
-rw-r--r--Lib/pipes.py3
-rw-r--r--Lib/test/test_pipes.py4
-rw-r--r--Misc/NEWS.d/next/Library/2022-04-17-12-07-50.gh-issue-91217.TIvrsq.rst1
4 files changed, 8 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index c3a8a7e..75ea70b 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -919,6 +919,7 @@ Deprecated
* :mod:`nis`
* :mod:`nntplib`
* :mod:`ossaudiodev`
+ * :mod:`pipes`
(Contributed by Brett Cannon in :issue:`47061`.)
diff --git a/Lib/pipes.py b/Lib/pipes.py
index 8cc74b0..61d63b4 100644
--- a/Lib/pipes.py
+++ b/Lib/pipes.py
@@ -60,10 +60,13 @@ To create a new template object initialized to a given one:
import re
import os
import tempfile
+import warnings
# we import the quote function rather than the module for backward compat
# (quote used to be an undocumented but used function in pipes)
from shlex import quote
+warnings._deprecated(__name__, remove=(3, 13))
+
__all__ = ["Template"]
# Conversion step kinds
diff --git a/Lib/test/test_pipes.py b/Lib/test/test_pipes.py
index 6335e7c..09e2115 100644
--- a/Lib/test/test_pipes.py
+++ b/Lib/test/test_pipes.py
@@ -1,10 +1,12 @@
-import pipes
import os
import string
import unittest
import shutil
from test.support import reap_children, unix_shell
from test.support.os_helper import TESTFN, unlink
+from test.support.warnings_helper import import_deprecated
+
+pipes = import_deprecated("pipes")
if os.name != 'posix':
diff --git a/Misc/NEWS.d/next/Library/2022-04-17-12-07-50.gh-issue-91217.TIvrsq.rst b/Misc/NEWS.d/next/Library/2022-04-17-12-07-50.gh-issue-91217.TIvrsq.rst
new file mode 100644
index 0000000..fc8ed57
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-04-17-12-07-50.gh-issue-91217.TIvrsq.rst
@@ -0,0 +1 @@
+Deprecate the 'pipes' module.