summaryrefslogtreecommitdiffstats
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2021-09-03 16:21:03 (GMT)
committerGitHub <noreply@github.com>2021-09-03 16:21:03 (GMT)
commitbc1c49fa94b2abf70e6937373bf1e6b5378035c5 (patch)
tree8f107f19a99cf89178e79d9c9378108a0f4ba7f4 /Lib/webbrowser.py
parent85ea2d6165dec0cffa6302eb6dc40406eae1edf5 (diff)
downloadcpython-bc1c49fa94b2abf70e6937373bf1e6b5378035c5.zip
cpython-bc1c49fa94b2abf70e6937373bf1e6b5378035c5.tar.gz
cpython-bc1c49fa94b2abf70e6937373bf1e6b5378035c5.tar.bz2
bpo-42255: Deprecate webbrowser.MacOSX from Python 3.11 (GH-27837)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/webbrowser.py')
-rwxr-xr-xLib/webbrowser.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index ec3cece..d8a9915 100755
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -8,6 +8,7 @@ import shutil
import sys
import subprocess
import threading
+import warnings
__all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"]
@@ -629,6 +630,8 @@ if sys.platform == 'darwin':
Internet System Preferences panel, will be used.
"""
def __init__(self, name):
+ warnings.warn(f'{self.__class__.__name__} is deprecated in 3.11'
+ ' use MacOSXOSAScript instead.', DeprecationWarning, stacklevel=2)
self.name = name
def open(self, url, new=0, autoraise=True):