Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ Removed
certificates for you.
(Contributed by Victor Stinner in :gh:`105382`.)

* Remove deprecated ``webbrowser.MacOSXOSAScript._name`` attribute.
Comment thread
hugovk marked this conversation as resolved.
Use ``.name`` attribute instead.
Comment thread
sobolevn marked this conversation as resolved.
Outdated
(Contributed by Nikita Sobolev in :gh:`105546`.)


Porting to Python 3.13
======================
Expand Down
14 changes: 0 additions & 14 deletions Lib/webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,20 +578,6 @@ class MacOSXOSAScript(BaseBrowser):
def __init__(self, name='default'):
super().__init__(name)

@property
def _name(self):
warnings.warn(f'{self.__class__.__name__}._name is deprecated in 3.11'
f' use {self.__class__.__name__}.name instead.',
DeprecationWarning, stacklevel=2)
return self.name

@_name.setter
def _name(self, val):
warnings.warn(f'{self.__class__.__name__}._name is deprecated in 3.11'
f' use {self.__class__.__name__}.name instead.',
DeprecationWarning, stacklevel=2)
self.name = val

def open(self, url, new=0, autoraise=True):
if self.name == 'default':
script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove deprecated in 3.11 ``webbrowser.MacOSXOSAScript._name`` attribute.