GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-42255: Deprecate webbrowser.MacOSX from Python 3.11 by corona10 · Pull Request #27837 · python/cpython

bpo-42255: Deprecate webbrowser.MacOSX from Python 3.11 #27837

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.

Sign up for GitHub

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
ambv merged 2 commits into python:main from corona10:bpo-42255
Sep 3, 2021

Uh oh!

There was an error while loading. Please reload this page.

Merged

bpo-42255: Deprecate webbrowser.MacOSX from Python 3.11 #27837

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
8f670b5
bpo-42255: Deprecate webbrowser.MacOSX from Python 3.11
corona10 Aug 19, 2021
39b243b
s/3.12/3.13/
ambv Sep 3, 2021
File filter
Filter by extension

Clear filters
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

7 changes: 5 additions & 2 deletions 7 Doc/library/webbrowser.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ for the controller classes, all defined in this module.
+------------------------+-----------------------------------------+-------+
| ``'windows-default'`` | :class:`WindowsDefault` | \(2) |
+------------------------+-----------------------------------------+-------+
| ``'macosx'`` | :class:`MacOSX('default')` | \(3) |
| ``'macosx'`` | :class:`MacOSXOSAScript('default')` | \(3) |
Comment thread Outdated

@corona10 corona10 Aug 19, 2021

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section should be backported

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
+------------------------+-----------------------------------------+-------+
| ``'safari'`` | :class:`MacOSX('safari')` | \(3) |
| ``'safari'`` | :class:`MacOSXOSAScript('safari')` | \(3) |
Comment thread Outdated

@corona10 corona10 Aug 19, 2021

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section should be backported

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ambv ambv Sep 3, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can reasonably call renaming MacOSX to MacOSXOSAScript a "backport" of this PR since it is about the deprecation. I'll of course accept PRs to 3.10 and 3.9 that make this doc change.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
+------------------------+-----------------------------------------+-------+
| ``'google-chrome'`` | :class:`Chrome('google-chrome')` | |
+------------------------+-----------------------------------------+-------+
Expand Down Expand Up @@ -174,6 +174,9 @@ Notes:
.. 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/'
Expand Down
4 changes: 4 additions & 0 deletions 4 Doc/whatsnew/3.11.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ Deprecated
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
=======
Expand Down
3 changes: 3 additions & 0 deletions 3 Lib/webbrowser.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sys
import subprocess
import threading
import warnings

__all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"]

Expand Down Expand Up @@ -629,6 +630,8 @@ class MacOSX(BaseBrowser):
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):
Expand Down
3 changes: 3 additions & 0 deletions 3 Misc/NEWS.d/next/Library/2021-08-19-23-49-10.bpo-42255.ofe3ms.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
: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.
Patch by Dong-hee Na.
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.