]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-91217: deprecate-pipes (GH-91779)
authorBrett Cannon <brett@python.org>
Fri, 22 Apr 2022 02:28:34 +0000 (19:28 -0700)
committerGitHub <noreply@github.com>
Fri, 22 Apr 2022 02:28:34 +0000 (19:28 -0700)
Doc/whatsnew/3.11.rst
Lib/pipes.py
Lib/test/test_pipes.py
Misc/NEWS.d/next/Library/2022-04-17-12-07-50.gh-issue-91217.TIvrsq.rst [new file with mode: 0644]

index c3a8a7e42a110bc2ff619d618477e6573bc18f83..75ea70b7a18322b3162aeb8f542af6bc239e6907 100644 (file)
@@ -919,6 +919,7 @@ Deprecated
   * :mod:`nis`
   * :mod:`nntplib`
   * :mod:`ossaudiodev`
+  * :mod:`pipes`
 
   (Contributed by Brett Cannon in :issue:`47061`.)
 
index 8cc74b0f1f781b15a095f33ce0d2bdd88ccfe008..61d63b48d3e4c544d8bf59199b18e1fec319af46 100644 (file)
@@ -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
index 6335e7cbe09c4e4e0ff5c78764251cf191da4882..09e21153ec858a82e605e17e6b4e7f305173e11d 100644 (file)
@@ -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 (file)
index 0000000..fc8ed57
--- /dev/null
@@ -0,0 +1 @@
+Deprecate the 'pipes' module.