]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-84850: Improve whatsnew entry for `[Fancy]URLopener` removal (#127032)
authorBarney Gale <barney.gale@gmail.com>
Wed, 20 Nov 2024 11:14:07 +0000 (11:14 +0000)
committerGitHub <noreply@github.com>
Wed, 20 Nov 2024 11:14:07 +0000 (13:14 +0200)
Doc/whatsnew/3.14.rst

index 53b22094e8abf139d840c534d06442c4eb49f9a7..cddcaafc461b20320754f79d6f7de0b3899b21dc 100644 (file)
@@ -772,6 +772,13 @@ urllib
 * Remove deprecated :class:`!URLopener` and :class:`!FancyURLopener` classes
   from :mod:`urllib.request`. They had previously raised a
   :exc:`DeprecationWarning` since Python 3.3.
+
+  ``myopener.open()`` can be replaced with :func:`~urllib.request.urlopen`,
+  and ``myopener.retrieve()`` can be replaced with
+  :func:`~urllib.request.urlretrieve`. Customizations to the opener
+  classes can be replaced by passing customized handlers to
+  :func:`~urllib.request.build_opener`.
+
   (Contributed by Barney Gale in :gh:`84850`.)
 
 Others