Skip to content
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

gh-104804: Remove webbrowser.MacOSX class, deprecated in Python 3.11 #104816

Merged
merged 8 commits into from
May 26, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented May 23, 2023

Closes #104804.

Remove webbrowser.MacOSX class, deprecated in Python 3.11 in gh-86421.


Also fix Sphinx warnings in webbrowser.rst (helps gh-101100):

  • I don't think we need to define envvars for PATH or KDEDIR

  • We could define .. envvar:: BROWSER right before the first mention, but it looks a little out of place having a BROWSER before the third paragraph. Thoughts?

  • I also don't think we need to define the dozen or so Mozilla, Opera etc. classes. They're listed in the table that shows which type name corresponds to each class, and some of them have extra details like how they're instantiated (Mozilla('mozilla'), GenericBrowser('lynx')), so plain literal text makes sense here. Repeating each class below would be a lot of duplication for little benefit, especially for this rather short page.

  • https://cpython-previews--104816.org.readthedocs.build/en/104816/library/webbrowser.html


📚 Documentation preview 📚: https://cpython-previews--104816.org.readthedocs.build/

@hugovk hugovk changed the title Remove webbrowser.MacOSX class, deprecated in Python 3.11 gh-104804: Remove webbrowser.MacOSX class, deprecated in Python 3.11 May 23, 2023
@serhiy-storchaka
Copy link
Member

Would not be better to split this PR on two? One for removing, and other for tidying?

@CAM-Gerlach CAM-Gerlach added the stdlib Python modules in the Lib dir label May 23, 2023
@hugovk
Copy link
Member Author

hugovk commented May 23, 2023

I can do, but they are intertwined: this bit is removed, which otherwise has warnings that would need fixing, or waiting for part 1 to be merged:

.. deprecated-removed:: 3.11 3.13
   :class:`MacOSX` is deprecated, use :class:`MacOSXOSAScript` instead.

Seems easier to do both at once. But either way is fine for me :)

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

I had a handful of doc-related suggestions. Otherwise, the core change looks good. The removal of the :class: syntax for things that are really code snippits (and not formally documented anyway) makes sense, as does silencing warnings for env vars not explicitly defined by or primarily/exclusively used by Python itself.

Ideally it would be nice to split it into two PRs as @serhiy-storchaka , but as a practical matter given they interlinked, maybe not worth the extra effort.

Misc/NEWS.d/3.11.0a1.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.13.rst Outdated Show resolved Hide resolved
Doc/library/webbrowser.rst Show resolved Hide resolved
@hugovk hugovk added the 3.13 bugs and security fixes label May 25, 2023
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM if you fix the typo in the NEWS entry.

Co-authored-by: Victor Stinner <vstinner@python.org>
@hugovk hugovk merged commit 5ab4bc0 into python:main May 26, 2023
@hugovk hugovk deleted the rm-webbrowser-MacOSX branch May 26, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes stdlib Python modules in the Lib dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove deprecated webbrowser.MacOSX class
5 participants