Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-104804: Remove webbrowser.MacOSX class, deprecated in Python 3.11#104816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
8 commits Select commit Hold shift + click to select a range
9d6603f Remove webbrowser.MacOSX class, deprecated in Python 3.11
hugovk 58edef7 Fix Sphinx warnings
hugovk 863db43 Update docs
hugovk 8325375 Add MacOSXOSAScript as 'versionadded:: 3.2'
hugovk 3b676e5 Merge remote-tracking branch 'upstream/main' into rm-webbrowser-MacOSX
hugovk ffb2e44 Fix typo
hugovk 38092f5 Merge branch 'main' into rm-webbrowser-MacOSX
hugovk 4333217 Fix typo
hugovk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -20,7 +20,7 @@ will be used if graphical browsers are not available or an X11 display isn't | ||
| available. If text-mode browsers are used, the calling process will block until | ||
| the user exits the browser. | ||
| If the environment variable :envvar:`BROWSER` exists, it is interpreted as the | ||
| If the environment variable :envvar:`!BROWSER` exists, it is interpreted as the | ||
| :data:`os.pathsep`-separated list of browsers to try ahead of the platform | ||
| defaults. When the value of a list part contains the string ``%s``, then it is | ||
| interpreted as a literal browser command line to be used with the argument URL | ||
| @@ -97,7 +97,7 @@ The following functions are defined: | ||
| Setting *preferred* to ``True`` makes this browser a preferred result for | ||
| a :func:`get` call with no argument. Otherwise, this entry point is only | ||
| useful if you plan to either set the :envvar:`BROWSER` variable or call | ||
| useful if you plan to either set the :envvar:`!BROWSER` variable or call | ||
| :func:`get` with a nonempty argument matching the name of a handler you | ||
| declare. | ||
| @@ -111,49 +111,49 @@ for the controller classes, all defined in this module. | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | Type Name | Class Name | Notes | | ||
| +========================+=========================================+=======+ | ||
| | ``'mozilla'`` | :class:`Mozilla('mozilla')` | | | ||
| | ``'mozilla'`` | ``Mozilla('mozilla')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'firefox'`` | :class:`Mozilla('mozilla')` | | | ||
| | ``'firefox'`` | ``Mozilla('mozilla')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'epiphany'`` | :class:`Epiphany('epiphany')` | | | ||
| | ``'epiphany'`` | ``Epiphany('epiphany')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'kfmclient'`` | :class:`Konqueror()` | \(1) | | ||
| | ``'kfmclient'`` | ``Konqueror()`` | \(1) | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'konqueror'`` | :class:`Konqueror()` | \(1) | | ||
| | ``'konqueror'`` | ``Konqueror()`` | \(1) | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'kfm'`` | :class:`Konqueror()` | \(1) | | ||
| | ``'kfm'`` | ``Konqueror()`` | \(1) | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'opera'`` | :class:`Opera()` | | | ||
| | ``'opera'`` | ``Opera()`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'links'`` | :class:`GenericBrowser('links')` | | | ||
| | ``'links'`` | ``GenericBrowser('links')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'elinks'`` | :class:`Elinks('elinks')` | | | ||
| | ``'elinks'`` | ``Elinks('elinks')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'lynx'`` | :class:`GenericBrowser('lynx')` | | | ||
| | ``'lynx'`` | ``GenericBrowser('lynx')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'w3m'`` | :class:`GenericBrowser('w3m')` | | | ||
| | ``'w3m'`` | ``GenericBrowser('w3m')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'windows-default'`` | :class:`WindowsDefault` | \(2) | | ||
| | ``'windows-default'`` | ``WindowsDefault`` | \(2) | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'macosx'`` | :class:`MacOSXOSAScript('default')` | \(3) | | ||
| | ``'macosx'`` | ``MacOSXOSAScript('default')`` | \(3) | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'safari'`` | :class:`MacOSXOSAScript('safari')` | \(3) | | ||
| | ``'safari'`` | ``MacOSXOSAScript('safari')`` | \(3) | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'google-chrome'`` | :class:`Chrome('google-chrome')` | | | ||
| | ``'google-chrome'`` | ``Chrome('google-chrome')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'chrome'`` | :class:`Chrome('chrome')` | | | ||
| | ``'chrome'`` | ``Chrome('chrome')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'chromium'`` | :class:`Chromium('chromium')` | | | ||
| | ``'chromium'`` | ``Chromium('chromium')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| | ``'chromium-browser'`` | :class:`Chromium('chromium-browser')` | | | ||
| | ``'chromium-browser'`` | ``Chromium('chromium-browser')`` | | | ||
| +------------------------+-----------------------------------------+-------+ | ||
| Notes: | ||
| (1) | ||
| "Konqueror" is the file manager for the KDE desktop environment for Unix, and | ||
| only makes sense to use if KDE is running. Some way of reliably detecting KDE | ||
| would be nice; the :envvar:`KDEDIR` variable is not sufficient. Note also that | ||
| would be nice; the :envvar:`!KDEDIR` variable is not sufficient. Note also that | ||
| the name "kfm" is used even when using the :program:`konqueror` command with KDE | ||
| 2 --- the implementation selects the best strategy for running Konqueror. | ||
| @@ -163,6 +163,11 @@ Notes: | ||
| (3) | ||
| Only on macOS platform. | ||
| .. versionadded:: 3.2 | ||
| A new :class:`!MacOSXOSAScript` class has been added | ||
| and is used on Mac instead of the previous :class:`!MacOSX` class. | ||
| This adds support for opening browsers not currently set as the OS default. | ||
| .. versionadded:: 3.3 | ||
| Support for Chrome/Chromium has been added. | ||
| @@ -171,9 +176,6 @@ Notes: | ||
| Removed browsers include Grail, Mosaic, Netscape, Galeon, | ||
| Skipstone, Iceape, and Firefox versions 35 and below. | ||
hugovk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| .. deprecated-removed:: 3.11 3.13 | ||
| :class:`MacOSX` is deprecated, use :class:`MacOSXOSAScript` instead. | ||
| Here are some simple examples:: | ||
| url = 'https://docs.python.org/' | ||
| @@ -222,4 +224,4 @@ module-level convenience functions: | ||
| .. rubric:: Footnotes | ||
| .. [1] Executables named here without a full path will be searched in the | ||
| directories given in the :envvar:`PATH` environment variable. | ||
| directories given in the :envvar:`!PATH` environment variable. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions 2 Misc/NEWS.d/next/Library/2023-05-23-21-25-54.gh-issue-104804.78fiE6.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Remove the untested and undocumented :mod:`webbrowser` :class:`!MacOSX` class, deprecated in Python 3.11. | ||
| Patch by Hugo van Kemenade. |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.