summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2022-04-14 12:50:11 -0700
committerGitHub <noreply@github.com>2022-04-14 12:50:11 -0700
commit1b6cd872f440ee99989debc1bdecd8bea5a368bf (patch)
tree332eb451152af540a90d96b4b7d13482e780f061
parent861974b514bc15ca1a3021f32a2d381c22f1a971 (diff)
downloadcpython-git-1b6cd872f440ee99989debc1bdecd8bea5a368bf.tar.gz
gh-91217: deprecate msilib (GH-91515)
-rw-r--r--Doc/whatsnew/3.11.rst1
-rw-r--r--Lib/msilib/__init__.py3
-rw-r--r--Lib/test/test_msilib.py5
-rw-r--r--Misc/NEWS.d/next/Library/2022-04-12-19-42-20.gh-issue-91217.b9_Rz9.rst1
4 files changed, 9 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 894ec8a9d0..f8e86f6ba3 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -857,6 +857,7 @@ Deprecated
* :mod:`chunk`
* :mod:`crypt`
* :mod:`imghdr`
+ * :mod:`msilib`
(Contributed by Brett Cannon in :issue:`47061`.)
diff --git a/Lib/msilib/__init__.py b/Lib/msilib/__init__.py
index 0e85aa2896..565bf631ab 100644
--- a/Lib/msilib/__init__.py
+++ b/Lib/msilib/__init__.py
@@ -6,6 +6,9 @@ import os
import re
import string
import sys
+import warnings
+
+warnings._deprecated(__name__, remove=(3, 13))
AMD64 = "AMD64" in sys.version
# Keep msilib.Win64 around to preserve backwards compatibility.
diff --git a/Lib/test/test_msilib.py b/Lib/test/test_msilib.py
index e29cd4a84c..db16f62a4c 100644
--- a/Lib/test/test_msilib.py
+++ b/Lib/test/test_msilib.py
@@ -3,7 +3,10 @@ import os
import unittest
from test.support.import_helper import import_module
from test.support.os_helper import TESTFN, unlink
-msilib = import_module('msilib')
+import warnings
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+ msilib = import_module('msilib')
import msilib.schema
diff --git a/Misc/NEWS.d/next/Library/2022-04-12-19-42-20.gh-issue-91217.b9_Rz9.rst b/Misc/NEWS.d/next/Library/2022-04-12-19-42-20.gh-issue-91217.b9_Rz9.rst
new file mode 100644
index 0000000000..ee1fc22dea
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-04-12-19-42-20.gh-issue-91217.b9_Rz9.rst
@@ -0,0 +1 @@
+Deprecate msilib.