summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-06-09 08:52:58 (GMT)
committerGitHub <noreply@github.com>2023-06-09 08:52:58 (GMT)
commit947ec7ab02e7673956eb7f235c330a49f11e157a (patch)
tree77da5b6fa454c031606cd684b0cee7bcd93ad5ee
parent3e525d22128cf040b3fd164f52cc6ae20ca58455 (diff)
downloadcpython-947ec7ab02e7673956eb7f235c330a49f11e157a.zip
cpython-947ec7ab02e7673956eb7f235c330a49f11e157a.tar.gz
cpython-947ec7ab02e7673956eb7f235c330a49f11e157a.tar.bz2
gh-105545: Remove deprecated `MacOSXOSAScript._name` (gh-105546)
-rw-r--r--Doc/library/webbrowser.rst2
-rw-r--r--Doc/whatsnew/3.13.rst5
-rwxr-xr-xLib/webbrowser.py14
-rw-r--r--Misc/NEWS.d/next/Library/2023-06-09-08-38-30.gh-issue-105545.2q3ysu.rst1
4 files changed, 7 insertions, 15 deletions
diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst
index 2f0b5fe..b6762f7 100644
--- a/Doc/library/webbrowser.rst
+++ b/Doc/library/webbrowser.rst
@@ -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.
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 4849ed7..e3090f1 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -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
======================
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index c1bd667..01a82fb 100755
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -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
diff --git a/Misc/NEWS.d/next/Library/2023-06-09-08-38-30.gh-issue-105545.2q3ysu.rst b/Misc/NEWS.d/next/Library/2023-06-09-08-38-30.gh-issue-105545.2q3ysu.rst
new file mode 100644
index 0000000..f276921
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-06-09-08-38-30.gh-issue-105545.2q3ysu.rst
@@ -0,0 +1 @@
+Remove deprecated in 3.11 ``webbrowser.MacOSXOSAScript._name`` attribute.