diff --git a/stdlib/webbrowser.pyi b/stdlib/webbrowser.pyi index 8ed7f919c78f..e2c63ee35d74 100644 --- a/stdlib/webbrowser.pyi +++ b/stdlib/webbrowser.pyi @@ -65,15 +65,29 @@ if sys.platform == "win32": if sys.platform == "darwin": if sys.version_info < (3, 13): - @deprecated("Deprecated; removed in Python 3.13.") + @deprecated("Deprecated; removed in Python 3.13. Use `MacOSXOSAScript` instead.") class MacOSX(BaseBrowser): def __init__(self, name: str) -> None: ... def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - class MacOSXOSAScript(BaseBrowser): # In runtime this class does not have `name` and `basename` - if sys.version_info >= (3, 11): - def __init__(self, name: str = "default") -> None: ... - else: - def __init__(self, name: str) -> None: ... + if sys.version_info >= (3, 15): + class MacOS(BaseBrowser): + def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... + @deprecated("Deprecated since Python 3.15; will be removed in Python 3.17. Use `MacOS` instead.") + class MacOSXOSAScript(BaseBrowser): # In runtime this class does not have `name` and `basename` + if sys.version_info >= (3, 11): + def __init__(self, name: str = "default") -> None: ... + else: + def __init__(self, name: str) -> None: ... + + def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... + + else: + class MacOSXOSAScript(BaseBrowser): # In runtime this class does not have `name` and `basename` + if sys.version_info >= (3, 11): + def __init__(self, name: str = "default") -> None: ... + else: + def __init__(self, name: str) -> None: ... + + def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ...