]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-105545: Remove deprecated `MacOSXOSAScript._name` (gh-105546)
authorNikita Sobolev <mail@sobolevn.me>
Fri, 9 Jun 2023 08:52:58 +0000 (11:52 +0300)
committerGitHub <noreply@github.com>
Fri, 9 Jun 2023 08:52:58 +0000 (08:52 +0000)
Doc/library/webbrowser.rst
Doc/whatsnew/3.13.rst
Lib/webbrowser.py
Misc/NEWS.d/next/Library/2023-06-09-08-38-30.gh-issue-105545.2q3ysu.rst [new file with mode: 0644]

index 2f0b5feb8cbc75ac78f5e82ab29516b7079f7973..b6762f78830a5fd19d9b37205e0b8c21e3834bf5 100644 (file)
@@ -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.
 
index 4849ed72020c7af6efd125fd4f8ca2bf891bd474..e3090f1fb7f51a804f489aedf117417aed119416 100644 (file)
@@ -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
 ======================
index c1bd667a56e579074f38d71faacc8cedbe3c7c86..01a82fb8857cfa6e0605c13b8f38834222092233 100755 (executable)
@@ -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 (file)
index 0000000..f276921
--- /dev/null
@@ -0,0 +1 @@
+Remove deprecated in 3.11 ``webbrowser.MacOSXOSAScript._name`` attribute.