Skip to content

Commit 947ec7a

Browse files
authored
gh-105545: Remove deprecated MacOSXOSAScript._name (gh-105546)
1 parent 3e525d2 commit 947ec7a

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

Doc/library/webbrowser.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Browser controllers provide these methods which parallel three of the
196196
module-level convenience functions:
197197

198198

199-
.. attribute:: name
199+
.. attribute:: controller.name
200200

201201
System-dependent name for the browser.
202202

Doc/whatsnew/3.13.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,11 @@ Removed
324324
certificates for you.
325325
(Contributed by Victor Stinner in :gh:`105382`.)
326326

327+
* Remove deprecated ``webbrowser.MacOSXOSAScript._name`` attribute.
328+
Use :attr:`webbrowser.MacOSXOSAScript.name <webbrowser.controller.name>`
329+
attribute instead.
330+
(Contributed by Nikita Sobolev in :gh:`105546`.)
331+
327332

328333
Porting to Python 3.13
329334
======================

Lib/webbrowser.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -578,20 +578,6 @@ class MacOSXOSAScript(BaseBrowser):
578578
def __init__(self, name='default'):
579579
super().__init__(name)
580580

581-
@property
582-
def _name(self):
583-
warnings.warn(f'{self.__class__.__name__}._name is deprecated in 3.11'
584-
f' use {self.__class__.__name__}.name instead.',
585-
DeprecationWarning, stacklevel=2)
586-
return self.name
587-
588-
@_name.setter
589-
def _name(self, val):
590-
warnings.warn(f'{self.__class__.__name__}._name is deprecated in 3.11'
591-
f' use {self.__class__.__name__}.name instead.',
592-
DeprecationWarning, stacklevel=2)
593-
self.name = val
594-
595581
def open(self, url, new=0, autoraise=True):
596582
if self.name == 'default':
597583
script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove deprecated in 3.11 ``webbrowser.MacOSXOSAScript._name`` attribute.

0 commit comments

Comments
 (0)