8000 bpo-43424: Deprecate `webbrowser.MacOSXOSAScript._name` attribute by sobolevn · Pull Request #30241 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43424: Deprecate webbrowser.MacOSXOSAScript._name attribute #30241

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
merged 4 commits into from
Dec 30, 2021

Conversation

sobolevn
Copy link
Member
@sobolevn sobolevn commented Dec 23, 2021

Changes:

  • Now all BaseBrowser subtypes have the same interface
  • I've also covered name in the docs, since original issue was about it

Looks like MacOSXOSAScript is not tested, so I didn't add any tests except local manual check:

Python 3.11.0a3+ (heads/main-dirty:71ef0b4c2b, Dec 23 2021, 12:38:09) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> a = webbrowser.get()
>>> a.name
'default'
>>> a._name
<stdin>:1: DeprecationWarning: MacOSXOSAScript._name is deprecated in 3.11 use MacOSXOSAScript.name instead.
'default'
>>> a.open('https://python.org')
True

https://bugs.python.org/issue43424

Related python/typeshed#6673

@corona10 corona10 self-requested a review December 29, 2021 13:45
Copy link
Member
@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

except (webbrowser.Error, AttributeError) as err:

We can now remove this skip section with this change.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@sobolevn
Copy link
Member Author

@corona10 thank you! I've removed AttributeError from the list of allowed exceptions.
Because, I belive that webbrowser.Error can still happen on some platforms.

To make bot happy:
I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@corona10: please review the changes made to this pull request.

@sobolevn
Copy link
Member Author

@corona10 thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0