+------------------------+-----------------------------------------+-------+
| ``'windows-default'`` | :class:`WindowsDefault` | \(2) |
+------------------------+-----------------------------------------+-------+
-| ``'macosx'`` | :class:`MacOSX('default')` | \(3) |
+| ``'macosx'`` | :class:`MacOSXOSAScript('default')` | \(3) |
+------------------------+-----------------------------------------+-------+
-| ``'safari'`` | :class:`MacOSX('safari')` | \(3) |
+| ``'safari'`` | :class:`MacOSXOSAScript('safari')` | \(3) |
+------------------------+-----------------------------------------+-------+
| ``'google-chrome'`` | :class:`Chrome('google-chrome')` | |
+------------------------+-----------------------------------------+-------+
.. versionadded:: 3.3
Support for Chrome/Chromium has been added.
+.. deprecated-removed:: 3.11 3.13
+ :class:`MacOSX` is deprecated, use :class:`MacOSXOSAScript` instead.
+
Here are some simple examples::
url = 'https://docs.python.org/'
Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython).
(Contributed by Victor Stinner in :issue:`40360`.)
+* :class:`webbrowser.MacOSX` is deprecated and will be removed in Python 3.13.
+ It is untested and undocumented and also not used by webbrowser itself.
+ (Contributed by Dong-hee Na in :issue:`42255`.)
+
Removed
=======
import sys
import subprocess
import threading
+import warnings
__all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"]
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):