33 What's New In Python 3.13
44****************************
55
6- :Release: |release |
7- :Date: |today |
6+ :Editor: TBD
87
98.. Rules for maintenance:
109
@@ -150,30 +149,7 @@ Optimizations
150149Deprecated
151150==========
152151
153- * :mod: `wave `: Deprecate the ``getmark() ``, ``setmark() `` and ``getmarkers() ``
154- methods of the :class: `wave.Wave_read ` and :class: `wave.Wave_write ` classes.
155- They will be removed in Python 3.15.
156- (Contributed by Victor Stinner in :gh: `105096 `.)
157- * :mod: `typing `: Creating a :class: `typing.NamedTuple ` class using keyword arguments to denote
158- the fields (``NT = NamedTuple("NT", x=int, y=int) ``) is deprecated, and will
159- be disallowed in Python 3.15. Use the class-based syntax or the functional
160- syntax instead. (Contributed by Alex Waygood in :gh: `105566 `.)
161- * :mod: `typing `: When using the functional syntax to create a :class: `typing.NamedTuple `
162- class or a :class: `typing.TypedDict ` class, failing to pass a value to the
163- 'fields' parameter (``NT = NamedTuple("NT") `` or ``TD = TypedDict("TD") ``) is
164- deprecated. Passing ``None `` to the 'fields' parameter
165- (``NT = NamedTuple("NT", None) `` or ``TD = TypedDict("TD", None) ``) is also
166- deprecated. Both will be disallowed in Python 3.15. To create a NamedTuple
167- class with 0 fields, use ``class NT(NamedTuple): pass `` or
168- ``NT = NamedTuple("NT", []) ``. To create a TypedDict class with 0 fields, use
169- ``class TD(TypedDict): pass `` or ``TD = TypedDict("TD", {}) ``.
170- (Contributed by Alex Waygood in :gh: `105566 ` and :gh: `105570 `.)
171- * :func: `typing.no_type_check_decorator ` is deprecated, and scheduled for
172- removal in Python 3.15. After eight years in the :mod: `typing ` module, it
173- has yet to be supported by any major type checkers.
174- (Contributed by Alex Waygood in :gh: `106309 `.)
175-
176- * :mod: `array `'s ``'u' `` format code, deprecated in docs since Python 3.3,
152+ * :mod: `array `: :mod: `array `'s ``'u' `` format code, deprecated in docs since Python 3.3,
177153 emits :exc: `DeprecationWarning ` since 3.13
178154 and will be removed in Python 3.16.
179155 Use the ``'w' `` format code instead.
@@ -184,13 +160,39 @@ Deprecated
184160 Replace ``ctypes.ARRAY(item_type, size) `` with ``item_type * size ``.
185161 (Contributed by Victor Stinner in :gh: `105733 `.)
186162
187- * The :mod: `getopt ` and :mod: `optparse ` modules are now
163+ * :mod: `getopt ` and :mod: `optparse ` modules: They are now
188164 :term: `soft deprecated `: the :mod: `argparse ` should be used for new projects.
189165 Previously, the :mod: `optparse ` module was already deprecated, its removal
190166 was not scheduled, and no warnings was emitted: so there is no change in
191167 practice.
192168 (Contributed by Victor Stinner in :gh: `106535 `.)
193169
170+ * :mod: `typing `: Creating a :class: `typing.NamedTuple ` class using keyword arguments to denote
171+ the fields (``NT = NamedTuple("NT", x=int, y=int) ``) is deprecated, and will
172+ be disallowed in Python 3.15. Use the class-based syntax or the functional
173+ syntax instead. (Contributed by Alex Waygood in :gh: `105566 `.)
174+
175+ * When using the functional syntax to create a :class: `typing.NamedTuple `
176+ class or a :class: `typing.TypedDict ` class, failing to pass a value to the
177+ 'fields' parameter (``NT = NamedTuple("NT") `` or ``TD = TypedDict("TD") ``) is
178+ deprecated. Passing ``None `` to the 'fields' parameter
179+ (``NT = NamedTuple("NT", None) `` or ``TD = TypedDict("TD", None) ``) is also
180+ deprecated. Both will be disallowed in Python 3.15. To create a NamedTuple
181+ class with 0 fields, use ``class NT(NamedTuple): pass `` or
182+ ``NT = NamedTuple("NT", []) ``. To create a TypedDict class with 0 fields, use
183+ ``class TD(TypedDict): pass `` or ``TD = TypedDict("TD", {}) ``.
184+ (Contributed by Alex Waygood in :gh: `105566 ` and :gh: `105570 `.)
185+
186+ * :func: `typing.no_type_check_decorator ` is deprecated, and scheduled for
187+ removal in Python 3.15. After eight years in the :mod: `typing ` module, it
188+ has yet to be supported by any major type checkers.
189+ (Contributed by Alex Waygood in :gh: `106309 `.)
190+
191+ * :mod: `wave `: Deprecate the ``getmark() ``, ``setmark() `` and ``getmarkers() ``
192+ methods of the :class: `wave.Wave_read ` and :class: `wave.Wave_write ` classes.
193+ They will be removed in Python 3.15.
194+ (Contributed by Victor Stinner in :gh: `105096 `.)
195+
194196Pending Removal in Python 3.14
195197------------------------------
196198
@@ -835,6 +837,13 @@ Deprecated
835837Removed
836838-------
837839
840+ * Remove many APIs (functions, macros, variables) with names prefixed by
841+ ``_Py `` or ``_PY `` (considered as private API). If your project is affected
842+ by one of these removals and you consider that the removed API should remain
843+ available, please open a new issue to request a public C API and
844+ add ``cc @vstinner `` to the issue to notify Victor Stinner.
845+ (Contributed by Victor Stinner in :gh: `106320 `.)
846+
838847* Remove functions deprecated in Python 3.9.
839848
840849 * ``PyEval_CallObject() ``, ``PyEval_CallObjectWithKeywords() ``: use
0 commit comments