mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
gh-105545: Remove deprecated MacOSXOSAScript._name (gh-105546)
This commit is contained in:
parent
3e525d2212
commit
947ec7ab02
4 changed files with 7 additions and 15 deletions
|
|
@ -196,7 +196,7 @@ Browser controllers provide these methods which parallel three of the
|
|||
module-level convenience functions:
|
||||
|
||||
|
||||
.. attribute:: name
|
||||
.. attribute:: controller.name
|
||||
|
||||
System-dependent name for the browser.
|
||||
|
||||
|
|
|
|||
|
|
@ -324,6 +324,11 @@ Removed
|
|||
certificates for you.
|
||||
(Contributed by Victor Stinner in :gh:`105382`.)
|
||||
|
||||
* Remove deprecated ``webbrowser.MacOSXOSAScript._name`` attribute.
|
||||
Use :attr:`webbrowser.MacOSXOSAScript.name <webbrowser.controller.name>`
|
||||
attribute instead.
|
||||
(Contributed by Nikita Sobolev in :gh:`105546`.)
|
||||
|
||||
|
||||
Porting to Python 3.13
|
||||
======================
|
||||
|
|
|
|||
|
|
@ -578,20 +578,6 @@ if sys.platform == 'darwin':
|
|||
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
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Remove deprecated in 3.11 ``webbrowser.MacOSXOSAScript._name`` attribute.
|
||||
Loading…
Add table
Add a link
Reference in a new issue