|
1 | 1 | Pending Removal in Python 3.15
|
2 | 2 | ------------------------------
|
3 | 3 |
|
4 |
| -* :class:`http.server.CGIHTTPRequestHandler` will be removed along with its |
5 |
| - related ``--cgi`` flag to ``python -m http.server``. It was obsolete and |
6 |
| - rarely used. No direct replacement exists. *Anything* is better than CGI |
7 |
| - to interface a web server with a request handler. |
8 |
| - |
9 |
| -* :class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python 3.11 |
10 |
| - and originally planned for removal in Python 3.13 (:gh:`90817`), |
11 |
| - but removal has been postponed to Python 3.15. |
12 |
| - Use :func:`locale.setlocale`, :func:`locale.getencoding` and |
13 |
| - :func:`locale.getlocale` instead. |
14 |
| - (Contributed by Hugo van Kemenade in :gh:`111187`.) |
| 4 | +* :mod:`ctypes`: |
| 5 | + |
| 6 | + * The undocumented :func:`!ctypes.SetPointerType` function |
| 7 | + has been deprecated since Python 3.13. |
| 8 | + |
| 9 | +* :mod:`http.server`: |
| 10 | + |
| 11 | + * The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` |
| 12 | + has been deprecated since Python 3.13. |
| 13 | + No direct replacement exists. |
| 14 | + *Anything* is better than CGI to interface |
| 15 | + a web server with a request handler. |
| 16 | + |
| 17 | + * The :option:`!--cgi` flag to the :program:`python -m http.server` |
| 18 | + command-line interface has been deprecated since Python 3.13. |
| 19 | + |
| 20 | +* :class:`locale`: |
| 21 | + |
| 22 | + * The :func:`~locale.getdefaultlocale` function |
| 23 | + has been deprecated since Python 3.11. |
| 24 | + Its removal was originally planned for Python 3.13 (:gh:`90817`), |
| 25 | + but has been postponed to Python 3.15. |
| 26 | + Use :func:`~locale.getlocale`, :func:`~locale.setlocale`, |
| 27 | + and :func:`~locale.getencoding` instead. |
| 28 | + (Contributed by Hugo van Kemenade in :gh:`111187`.) |
15 | 29 |
|
16 | 30 | * :mod:`pathlib`:
|
17 |
| - :meth:`pathlib.PurePath.is_reserved` is deprecated and scheduled for |
18 |
| - removal in Python 3.15. Use :func:`os.path.isreserved` to detect reserved |
19 |
| - paths on Windows. |
| 31 | + |
| 32 | + * :meth:`.PurePath.is_reserved` |
| 33 | + has been deprecated since Python 3.13. |
| 34 | + Use :func:`os.path.isreserved` to detect reserved paths on Windows. |
20 | 35 |
|
21 | 36 | * :mod:`platform`:
|
22 |
| - :func:`~platform.java_ver` is deprecated and will be removed in 3.15. |
23 |
| - It was largely untested, had a confusing API, |
24 |
| - and was only useful for Jython support. |
25 |
| - (Contributed by Nikita Sobolev in :gh:`116349`.) |
| 37 | + |
| 38 | + * :func:`~platform.java_ver` has been deprecated since Python 3.13. |
| 39 | + This function is only useful for Jython support, has a confusing API, |
| 40 | + and is largely untested. |
26 | 41 |
|
27 | 42 | * :mod:`threading`:
|
28 |
| - Passing any arguments to :func:`threading.RLock` is now deprecated. |
29 |
| - C version allows any numbers of args and kwargs, |
30 |
| - but they are just ignored. Python version does not allow any arguments. |
31 |
| - All arguments will be removed from :func:`threading.RLock` in Python 3.15. |
32 |
| - (Contributed by Nikita Sobolev in :gh:`102029`.) |
33 |
| - |
34 |
| -* :class:`typing.NamedTuple`: |
35 |
| - |
36 |
| - * The undocumented keyword argument syntax for creating :class:`!NamedTuple` classes |
37 |
| - (``NT = NamedTuple("NT", x=int)``) is deprecated, and will be disallowed in |
38 |
| - 3.15. Use the class-based syntax or the functional syntax instead. |
39 |
| - |
40 |
| - * When using the functional syntax to create a :class:`!NamedTuple` class, failing to |
41 |
| - pass a value to the *fields* parameter (``NT = NamedTuple("NT")``) is |
42 |
| - deprecated. Passing ``None`` to the *fields* parameter |
43 |
| - (``NT = NamedTuple("NT", None)``) is also deprecated. Both will be |
44 |
| - disallowed in Python 3.15. To create a :class:`!NamedTuple` class with 0 fields, use |
45 |
| - ``class NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``. |
46 |
| - |
47 |
| -* :class:`typing.TypedDict`: When using the functional syntax to create a |
48 |
| - :class:`!TypedDict` class, failing to pass a value to the *fields* parameter (``TD = |
49 |
| - TypedDict("TD")``) is deprecated. Passing ``None`` to the *fields* parameter |
50 |
| - (``TD = TypedDict("TD", None)``) is also deprecated. Both will be disallowed |
51 |
| - in Python 3.15. To create a :class:`!TypedDict` class with 0 fields, use ``class |
52 |
| - TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``. |
53 |
| - |
54 |
| -* :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` |
55 |
| - methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes. |
56 |
| - They will be removed in Python 3.15. |
57 |
| - (Contributed by Victor Stinner in :gh:`105096`.) |
| 43 | + |
| 44 | + * :func:`~threading.RLock` will take no arguments in Python 3.15. |
| 45 | + Passing any arguments has been deprecated since Python 3.14, |
| 46 | + as the Python version does not permit any arguments, |
| 47 | + but the C version allows any number of positional or keyword arguments, |
| 48 | + ignoring every argument. |
| 49 | + |
| 50 | +* :mod:`typing`: |
| 51 | + |
| 52 | + * The undocumented keyword argument syntax for creating |
| 53 | + :class:`~typing.NamedTuple` classes |
| 54 | + (e.g. ``Point = NamedTuple("Point", x=int, y=int)``) |
| 55 | + has been deprecated since Python 3.13. |
| 56 | + Use the class-based syntax or the functional syntax instead. |
| 57 | + |
| 58 | + * The :func:`typing.no_type_check_decorator` decorator function |
| 59 | + has been deprecated since Python 3.13. |
| 60 | + After eight years in the :mod:`typing` module, |
| 61 | + it has yet to be supported by any major type checker. |
| 62 | + |
| 63 | +* :mod:`wave`: |
| 64 | + |
| 65 | + * The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, |
| 66 | + and :meth:`~wave.Wave_read.getmarkers` methods of |
| 67 | + the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes |
| 68 | + have been deprecated since Python 3.13. |
0 commit comments