@@ -580,19 +580,10 @@ asyncio
580
580
:class: `asyncio.ThreadedChildWatcher `.
581
581
(Contributed by Kumar Aditya in :gh: `98024 `.)
582
582
583
- * The child watcher classes :class: `asyncio.MultiLoopChildWatcher `,
584
- :class: `asyncio.FastChildWatcher `, :class: `asyncio.AbstractChildWatcher `
585
- and :class: `asyncio.SafeChildWatcher ` are deprecated and
586
- will be removed in Python 3.14. It is recommended to not manually
587
- configure a child watcher as the event loop now uses the best available
588
- child watcher for each platform (:class: `asyncio.PidfdChildWatcher `
589
- if supported and :class: `asyncio.ThreadedChildWatcher ` otherwise).
590
- (Contributed by Kumar Aditya in :gh: `94597 `.)
591
-
592
- * :func: `asyncio.set_child_watcher `, :func: `asyncio.get_child_watcher `,
593
- :meth: `asyncio.AbstractEventLoopPolicy.set_child_watcher ` and
594
- :meth: `asyncio.AbstractEventLoopPolicy.get_child_watcher ` are deprecated
595
- and will be removed in Python 3.14.
583
+ * The event loop now uses the best available child watcher for each platform
584
+ (:class: `asyncio.PidfdChildWatcher ` if supported and
585
+ :class: `asyncio.ThreadedChildWatcher ` otherwise), so manually
586
+ configuring a child watcher is not recommended.
596
587
(Contributed by Kumar Aditya in :gh: `94597 `.)
597
588
598
589
* Add *loop_factory * parameter to :func: `asyncio.run ` to allow specifying
@@ -1046,15 +1037,52 @@ Demos and Tools
1046
1037
Deprecated
1047
1038
==========
1048
1039
1049
- * :mod: `asyncio `: The :meth: `~asyncio.get_event_loop ` method of the
1050
- default event loop policy now emits a :exc: `DeprecationWarning ` if there
1051
- is no current event loop set and it decides to create one.
1052
- (Contributed by Serhiy Storchaka and Guido van Rossum in :gh: `100160 `.)
1040
+ * :mod: `argparse `: The *type *, *choices *, and *metavar * parameters
1041
+ of :class: `!argparse.BooleanOptionalAction ` are deprecated
1042
+ and will be removed in 3.14.
1043
+ (Contributed by Nikita Sobolev in :gh: `92248 `.)
1044
+
1045
+ * :mod: `ast `: The following :mod: `ast ` features have been deprecated in documentation since
1046
+ Python 3.8, now cause a :exc: `DeprecationWarning ` to be emitted at runtime
1047
+ when they are accessed or used, and will be removed in Python 3.14:
1048
+
1049
+ * :class: `!ast.Num `
1050
+ * :class: `!ast.Str `
1051
+ * :class: `!ast.Bytes `
1052
+ * :class: `!ast.NameConstant `
1053
+ * :class: `!ast.Ellipsis `
1054
+
1055
+ Use :class: `ast.Constant ` instead.
1056
+ (Contributed by Serhiy Storchaka in :gh: `90953 `.)
1057
+
1058
+ * :mod: `asyncio `:
1059
+
1060
+ * The child watcher classes :class: `asyncio.MultiLoopChildWatcher `,
1061
+ :class: `asyncio.FastChildWatcher `, :class: `asyncio.AbstractChildWatcher `
1062
+ and :class: `asyncio.SafeChildWatcher ` are deprecated and
1063
+ will be removed in Python 3.14.
1064
+ (Contributed by Kumar Aditya in :gh: `94597 `.)
1065
+
1066
+ * :func: `asyncio.set_child_watcher `, :func: `asyncio.get_child_watcher `,
1067
+ :meth: `asyncio.AbstractEventLoopPolicy.set_child_watcher ` and
1068
+ :meth: `asyncio.AbstractEventLoopPolicy.get_child_watcher ` are deprecated
1069
+ and will be removed in Python 3.14.
1070
+ (Contributed by Kumar Aditya in :gh: `94597 `.)
1071
+
1072
+ * The :meth: `~asyncio.get_event_loop ` method of the
1073
+ default event loop policy now emits a :exc: `DeprecationWarning ` if there
1074
+ is no current event loop set and it decides to create one.
1075
+ (Contributed by Serhiy Storchaka and Guido van Rossum in :gh: `100160 `.)
1053
1076
1054
1077
* :mod: `calendar `: ``calendar.January `` and ``calendar.February `` constants are deprecated and
1055
1078
replaced by :data: `calendar.JANUARY ` and :data: `calendar.FEBRUARY `.
1056
1079
(Contributed by Prince Roshan in :gh: `103636 `.)
1057
1080
1081
+ * :mod: `collections.abc `: Deprecated :class: `collections.abc.ByteString `.
1082
+ Prefer :class: `Sequence ` or :class: `collections.abc.Buffer `.
1083
+ For use in typing, prefer a union, like ``bytes | bytearray ``, or :class: `collections.abc.Buffer `.
1084
+ (Contributed by Shantanu Jain in :gh: `91896 `.)
1085
+
1058
1086
* :mod: `datetime `: :class: `datetime.datetime `'s :meth: `~datetime.datetime.utcnow ` and
1059
1087
:meth: `~datetime.datetime.utcfromtimestamp ` are deprecated and will be
1060
1088
removed in a future version. Instead, use timezone-aware objects to represent
@@ -1063,12 +1091,55 @@ Deprecated
1063
1091
:const: `datetime.UTC `.
1064
1092
(Contributed by Paul Ganssle in :gh: `103857 `.)
1065
1093
1094
+ * :mod: `email `: Deprecate the *isdst * parameter in :func: `email.utils.localtime `.
1095
+ (Contributed by Alan Williams in :gh: `72346 `.)
1096
+
1097
+ * :mod: `importlib.abc `: Deprecated the following classes, scheduled for removal in
1098
+ Python 3.14:
1099
+
1100
+ * :class: `!importlib.abc.ResourceReader `
1101
+ * :class: `!importlib.abc.Traversable `
1102
+ * :class: `!importlib.abc.TraversableResources `
1103
+
1104
+ Use :mod: `importlib.resources.abc ` classes instead:
1105
+
1106
+ * :class: `importlib.resources.abc.Traversable `
1107
+ * :class: `importlib.resources.abc.TraversableResources `
1108
+
1109
+ (Contributed by Jason R. Coombs and Hugo van Kemenade in :gh: `93963 `.)
1110
+
1111
+ * :mod: `itertools `: Deprecate the support for copy, deepcopy, and pickle operations,
1112
+ which is undocumented, inefficient, historically buggy, and inconsistent.
1113
+ This will be removed in 3.14 for a significant reduction in code
1114
+ volume and maintenance burden.
1115
+ (Contributed by Raymond Hettinger in :gh: `101588 `.)
1116
+
1066
1117
* :mod: `os `: The ``st_ctime `` fields return by :func: `os.stat ` and :func: `os.lstat ` on
1067
1118
Windows are deprecated. In a future release, they will contain the last
1068
1119
metadata change time, consistent with other platforms. For now, they still
1069
1120
contain the creation time, which is also available in the new ``st_birthtime ``
1070
1121
field. (Contributed by Steve Dower in :gh: `99726 `.)
1071
1122
1123
+ * :mod: `multiprocessing `: In Python 3.14, the default :mod: `multiprocessing `
1124
+ start method will change to a safer one on Linux, BSDs,
1125
+ and other non-macOS POSIX platforms where ``'fork' `` is currently
1126
+ the default (:gh: `84559 `). Adding a runtime warning about this was deemed too
1127
+ disruptive as the majority of code is not expected to care. Use the
1128
+ :func: `~multiprocessing.get_context ` or
1129
+ :func: `~multiprocessing.set_start_method ` APIs to explicitly specify when
1130
+ your code *requires * ``'fork' ``. See :ref: `contexts and start methods
1131
+ <multiprocessing-start-methods>`.
1132
+
1133
+ * :mod: `pkgutil `: :func: `pkgutil.find_loader ` and :func: `pkgutil.get_loader `
1134
+ are deprecated and will be removed in Python 3.14;
1135
+ use :func: `importlib.util.find_spec ` instead.
1136
+ (Contributed by Nikita Sobolev in :gh: `97850 `.)
1137
+
1138
+ * :mod: `pty `: The module has two undocumented ``master_open() `` and ``slave_open() ``
1139
+ functions that have been deprecated since Python 2 but only gained a
1140
+ proper :exc: `DeprecationWarning ` in 3.12. Remove them in 3.14.
1141
+ (Contributed by Soumendra Ganguly and Gregory P. Smith in :gh: `85984 `.)
1142
+
1072
1143
* :mod: `os `: On POSIX platforms, :func: `os.fork ` can now raise a
1073
1144
:exc: `DeprecationWarning ` when it can detect being called from a
1074
1145
multithreaded process. There has always been a fundamental incompatibility
@@ -1083,22 +1154,23 @@ Deprecated
1083
1154
:mod: `concurrent.futures ` the fix is to use a different
1084
1155
:mod: `multiprocessing ` start method such as ``"spawn" `` or ``"forkserver" ``.
1085
1156
1086
- * :mod: `shutil `: The *onerror * argument of :func: `shutil.rmtree ` is deprecated as will be removed
1157
+ * :mod: `shutil `: The *onerror * argument of :func: `shutil.rmtree ` is deprecated and will be removed
1087
1158
in Python 3.14. Use *onexc * instead. (Contributed by Irit Katriel in :gh: `102828 `.)
1088
1159
1089
1160
* :mod: `sqlite3 `:
1090
- * :ref: `default adapters and converters
1091
- <sqlite3-default-converters>` are now deprecated.
1092
- Instead, use the :ref: `sqlite3-adapter-converter-recipes `
1093
- and tailor them to your needs.
1094
- (Contributed by Erlend E. Aasland in :gh: `90016 `.)
1095
-
1096
- * In :meth: `~sqlite3.Cursor.execute `, :exc: `DeprecationWarning ` is now emitted
1097
- when :ref: `named placeholders <sqlite3-placeholders >` are used together with
1098
- parameters supplied as a :term: `sequence ` instead of as a :class: `dict `.
1099
- Starting from Python 3.14, using named placeholders with parameters supplied
1100
- as a sequence will raise a :exc: `~sqlite3.ProgrammingError `.
1101
- (Contributed by Erlend E. Aasland in :gh: `101698 `.)
1161
+
1162
+ * :ref: `default adapters and converters
1163
+ <sqlite3-default-converters>` are now deprecated.
1164
+ Instead, use the :ref: `sqlite3-adapter-converter-recipes `
1165
+ and tailor them to your needs.
1166
+ (Contributed by Erlend E. Aasland in :gh: `90016 `.)
1167
+
1168
+ * In :meth: `~sqlite3.Cursor.execute `, :exc: `DeprecationWarning ` is now emitted
1169
+ when :ref: `named placeholders <sqlite3-placeholders >` are used together with
1170
+ parameters supplied as a :term: `sequence ` instead of as a :class: `dict `.
1171
+ Starting from Python 3.14, using named placeholders with parameters supplied
1172
+ as a sequence will raise a :exc: `~sqlite3.ProgrammingError `.
1173
+ (Contributed by Erlend E. Aasland in :gh: `101698 `.)
1102
1174
1103
1175
* :mod: `sys `: The :data: `sys.last_type `, :data: `sys.last_value ` and :data: `sys.last_traceback `
1104
1176
fields are deprecated. Use :data: `sys.last_exc ` instead.
@@ -1108,16 +1180,24 @@ Deprecated
1108
1180
Python 3.14, when ``'data' `` filter will become the default.
1109
1181
See :ref: `tarfile-extraction-filter ` for details.
1110
1182
1111
- * :mod: `typing `: :class: `typing.Hashable ` and :class: `typing.Sized ` aliases for :class: `collections.abc.Hashable `
1112
- and :class: `collections.abc.Sized `. (:gh: `94309 `.)
1183
+ * :mod: `typing `:
1184
+
1185
+ * :class: `typing.Hashable ` and :class: `typing.Sized ` aliases for :class: `collections.abc.Hashable `
1186
+ and :class: `collections.abc.Sized `. (:gh: `94309 `.)
1187
+
1188
+ * :class: `typing.ByteString `, deprecated since Python 3.9, now causes a
1189
+ :exc: `DeprecationWarning ` to be emitted when it is used.
1190
+ (Contributed by Alex Waygood in :gh: `91896 `.)
1113
1191
1114
1192
* :mod: `xml.etree.ElementTree `: The module now emits :exc: `DeprecationWarning `
1115
1193
when testing the truth value of an :class: `xml.etree.ElementTree.Element `.
1116
1194
Before, the Python implementation emitted :exc: `FutureWarning `, and the C
1117
1195
implementation emitted nothing.
1196
+ (Contributed by Jacob Walls in :gh: `83122 `.)
1118
1197
1119
- * The 3-arg signatures (type, value, traceback) of :meth: `~coroutine.throw `,
1120
- :meth: `~generator.throw ` and :meth: `~agen.athrow ` are deprecated and
1198
+ * The 3-arg signatures (type, value, traceback) of :meth: `coroutine throw()
1199
+ <coroutine.throw> `, :meth: `generator throw() <generator.throw> ` and
1200
+ :meth: `async generator throw() <agen.athrow> ` are deprecated and
1121
1201
may be removed in a future version of Python. Use the single-arg versions
1122
1202
of these functions instead. (Contributed by Ofey Chan in :gh: `89874 `.)
1123
1203
@@ -1126,12 +1206,21 @@ Deprecated
1126
1206
:exc: `ImportWarning `).
1127
1207
(Contributed by Brett Cannon in :gh: `65961 `.)
1128
1208
1209
+ * Setting ``__package__ `` or ``__cached__ `` on a module is deprecated,
1210
+ and will cease to be set or taken into consideration by the import system in Python 3.14.
1211
+ (Contributed by Brett Cannon in :gh: `65961 `.)
1212
+
1129
1213
* The bitwise inversion operator (``~ ``) on bool is deprecated. It will throw an
1130
1214
error in Python 3.14. Use ``not `` for logical negation of bools instead.
1131
1215
In the rare case that you really need the bitwise inversion of the underlying
1132
- ``int ``, convert to int explicitly with ``~int(x) ``. (Contributed by Tim Hoffmann
1216
+ ``int ``, convert to int explicitly: ``~int(x) ``. (Contributed by Tim Hoffmann
1133
1217
in :gh: `103487 `.)
1134
1218
1219
+ * Accessing ``co_lnotab `` on code objects was deprecated in Python 3.10 via :pep: `626 `,
1220
+ but it only got a proper :exc: `DeprecationWarning ` in 3.12,
1221
+ therefore it will be removed in 3.14.
1222
+ (Contributed by Nikita Sobolev in :gh: `101866 `.)
1223
+
1135
1224
Pending Removal in Python 3.13
1136
1225
------------------------------
1137
1226
@@ -1180,90 +1269,62 @@ APIs:
1180
1269
Pending Removal in Python 3.14
1181
1270
------------------------------
1182
1271
1272
+ The following APIs have been deprecated
1273
+ and will be removed in Python 3.14.
1274
+
1183
1275
* :mod: `argparse `: The *type *, *choices *, and *metavar * parameters
1184
- of :class: `!argparse.BooleanOptionalAction ` are deprecated
1185
- and will be removed in 3.14.
1186
- (Contributed by Nikita Sobolev in :gh: `92248 `.)
1276
+ of :class: `!argparse.BooleanOptionalAction `
1187
1277
1188
- * :mod: `ast `: The following :mod: `ast ` features have been deprecated in documentation since
1189
- Python 3.8, now cause a :exc: `DeprecationWarning ` to be emitted at runtime
1190
- when they are accessed or used, and will be removed in Python 3.14:
1278
+ * :mod: `ast `:
1191
1279
1192
1280
* :class: `!ast.Num `
1193
1281
* :class: `!ast.Str `
1194
1282
* :class: `!ast.Bytes `
1195
1283
* :class: `!ast.NameConstant `
1196
1284
* :class: `!ast.Ellipsis `
1197
1285
1198
- Use :class: `ast.Constant ` instead.
1199
- (Contributed by Serhiy Storchaka in :gh: `90953 `.)
1286
+ * :mod: `asyncio `:
1200
1287
1201
- * :mod: `asyncio `: the *msg * parameter of both
1202
- :meth: `asyncio.Future.cancel ` and
1203
- :meth: `asyncio.Task.cancel ` (:gh: `90985 `)
1288
+ * :class: `!asyncio.MultiLoopChildWatcher `
1289
+ * :class: `!asyncio.FastChildWatcher `
1290
+ * :class: `!asyncio.AbstractChildWatcher `
1291
+ * :class: `!asyncio.SafeChildWatcher `
1292
+ * :func: `!asyncio.set_child_watcher `
1293
+ * :func: `!asyncio.get_child_watcher `,
1294
+ * :meth: `!asyncio.AbstractEventLoopPolicy.set_child_watcher `
1295
+ * :meth: `!asyncio.AbstractEventLoopPolicy.get_child_watcher `
1204
1296
1205
- * :mod: `collections.abc `: Deprecated :class: `collections.abc.ByteString `.
1206
- Prefer :class: `Sequence ` or :class: `collections.abc.Buffer `.
1207
- For use in typing, prefer a union, like ``bytes | bytearray ``, or :class: `collections.abc.Buffer `.
1208
- (Contributed by Shantanu Jain in :gh: `91896 `.)
1297
+ * :mod: `collections.abc `: :class: `!collections.abc.ByteString `.
1209
1298
1210
- * :mod: `email `: Deprecated the *isdst * parameter in :func: `email.utils.localtime `.
1211
- (Contributed by Alan Williams in :gh: `72346 `.)
1299
+ * :mod: `email `: the *isdst * parameter in :func: `email.utils.localtime `.
1212
1300
1213
- * :mod: `importlib.abc `: Deprecated the following classes, scheduled for removal in
1214
- Python 3.14:
1301
+ * :mod: `importlib.abc `:
1215
1302
1216
1303
* :class: `!importlib.abc.ResourceReader `
1217
1304
* :class: `!importlib.abc.Traversable `
1218
1305
* :class: `!importlib.abc.TraversableResources `
1219
1306
1220
- Use :mod: `importlib.resources.abc ` classes instead:
1307
+ * :mod: `itertools `: Support for copy, deepcopy, and pickle operations.
1221
1308
1222
- * :class: `importlib.resources.abc.Traversable `
1223
- * :class: `importlib.resources.abc.TraversableResources `
1224
-
1225
- (Contributed by Jason R. Coombs and Hugo van Kemenade in :gh: `93963 `.)
1226
-
1227
- * :mod: `itertools `: The module had undocumented, inefficient, historically buggy,
1228
- and inconsistent support for copy, deepcopy, and pickle operations.
1229
- This will be removed in 3.14 for a significant reduction in code
1230
- volume and maintenance burden.
1231
- (Contributed by Raymond Hettinger in :gh: `101588 `.)
1309
+ * :mod: `pkgutil `:
1232
1310
1233
- * :mod: `multiprocessing `: The default :mod: `multiprocessing ` start method will change to a safer one on
1234
- Linux, BSDs, and other non-macOS POSIX platforms where ``'fork' `` is currently
1235
- the default (:gh: `84559 `). Adding a runtime warning about this was deemed too
1236
- disruptive as the majority of code is not expected to care. Use the
1237
- :func: `~multiprocessing.get_context ` or
1238
- :func: `~multiprocessing.set_start_method ` APIs to explicitly specify when
1239
- your code *requires * ``'fork' ``. See :ref: `multiprocessing-start-methods `.
1311
+ * :func: `!pkgutil.find_loader `
1312
+ * :func: `!pkgutil.get_loader `.
1240
1313
1241
- * :mod: `pkgutil `: :func: `pkgutil.find_loader ` and :func: `pkgutil.get_loader `
1242
- now raise :exc: `DeprecationWarning `;
1243
- use :func: `importlib.util.find_spec ` instead.
1244
- (Contributed by Nikita Sobolev in :gh: `97850 `.)
1314
+ * :mod: `pty `:
1245
1315
1246
- * :mod: `pty `: The module has two undocumented ``master_open() `` and ``slave_open() ``
1247
- functions that have been deprecated since Python 2 but only gained a
1248
- proper :exc: `DeprecationWarning ` in 3.12. Remove them in 3.14.
1316
+ * :func: `!pty.master_open `
1317
+ * :func: `!pty.slave_open `
1249
1318
1250
- * :mod: `shutil `: The *onerror * argument of :func: `shutil.rmtree ` is deprecated in 3.12,
1251
- and will be removed in 3.14.
1319
+ * :mod: `shutil `: The *onerror * argument of :func: `shutil.rmtree `
1252
1320
1253
- * :mod: `typing `: :class: `typing.ByteString `, deprecated since Python 3.9, now causes a
1254
- :exc: `DeprecationWarning ` to be emitted when it is used.
1321
+ * :mod: `typing `: :class: `!typing.ByteString `
1255
1322
1256
- * :mod: `xml.etree.ElementTree `: Testing the truth value of an :class: `xml.etree.ElementTree.Element `
1257
- is deprecated and will raise an exception in Python 3.14.
1323
+ * :mod: `xml.etree.ElementTree `: Testing the truth value of an :class: `xml.etree.ElementTree.Element `.
1258
1324
1259
- * ``__package__ `` and ``__cached__ `` will cease to be set or taken
1260
- into consideration by the import system (:gh: `97879 `).
1325
+ * The ``__package__ `` and ``__cached__ `` attributes on module objects.
1261
1326
1262
- * Accessing ``co_lnotab `` was deprecated in :pep: `626 ` since 3.10
1263
- and was planned to be removed in 3.12
1264
- but it only got a proper :exc: `DeprecationWarning ` in 3.12.
1265
- May be removed in 3.14.
1266
- (Contributed by Nikita Sobolev in :gh: `101866 `.)
1327
+ * The ``co_lnotab `` attribute of code objects.
1267
1328
1268
1329
Pending Removal in Future Versions
1269
1330
----------------------------------
0 commit comments