@@ -250,6 +250,68 @@ unicodedata
250
250
* The Unicode database has been updated to version 14.0.0. (:issue: `45190 `).
251
251
252
252
253
+ Optimizations
254
+ =============
255
+
256
+ * Compiler now optimizes simple C-style formatting with literal format
257
+ containing only format codes ``%s ``, ``%r `` and ``%a `` and makes it as
258
+ fast as corresponding f-string expression.
259
+ (Contributed by Serhiy Storchaka in :issue: `28307 `.)
260
+
261
+ * "Zero-cost" exceptions are implemented. The cost of ``try `` statements is
262
+ almost eliminated when no exception is raised.
263
+ (Contributed by Mark Shannon in :issue: `40222 `.)
264
+
265
+ * Method calls with keywords are now faster due to bytecode
266
+ changes which avoid creating bound method instances. Previously, this
267
+ optimization was applied only to method calls with purely positional
268
+ arguments.
269
+ (Contributed by Ken Jin and Mark Shannon in :issue: `26110 `, based on ideas
270
+ implemented in PyPy.)
271
+
272
+ * Pure ASCII strings are now normalized in constant time by :func: `unicodedata.normalize `.
273
+ (Contributed by Dong-hee Na in :issue: `44987 `.)
274
+
275
+
276
+ CPython bytecode changes
277
+ ========================
278
+
279
+ * Added a new :opcode: `CALL_METHOD_KW ` opcode. Calls a method in a similar
280
+ fashion as :opcode: `CALL_METHOD `, but also supports keyword arguments. Works
281
+ in tandem with :opcode: `LOAD_METHOD `.
282
+
283
+
284
+ Deprecated
285
+ ==========
286
+
287
+ * The :mod: `lib2to3 ` package is now deprecated and may not be able to parse
288
+ Python 3.10 or newer. See the :pep: `617 ` (New PEG parser for CPython).
289
+ (Contributed by Victor Stinner in :issue: `40360 `.)
290
+
291
+ * :class: `webbrowser.MacOSX ` is deprecated and will be removed in Python 3.13.
292
+ It is untested and undocumented and also not used by webbrowser itself.
293
+ (Contributed by Dong-hee Na in :issue: `42255 `.)
294
+
295
+ * The behavior of returning a value from a :class: `~unittest.TestCase ` and
296
+ :class: `~unittest.IsolatedAsyncioTestCase ` test methods (other than the
297
+ default ``None `` value), is now deprecated.
298
+
299
+ * Deprecated the following :mod: `unittest ` functions, scheduled for removal in
300
+ Python 3.13:
301
+
302
+ * :func: `unittest.findTestCases `
303
+ * :func: `unittest.makeSuite `
304
+ * :func: `unittest.getTestCaseNames `
305
+
306
+ Use :class: `~unittest.TestLoader ` method instead:
307
+
308
+ * :meth: `unittest.TestLoader.loadTestsFromModule `
309
+ * :meth: `unittest.TestLoader.loadTestsFromTestCase `
310
+ * :meth: `unittest.TestLoader.getTestCaseNames `
311
+
312
+ (Contributed by Erlend E. Aasland in :issue: `5846 `.)
313
+
314
+
253
315
Removed
254
316
=======
255
317
@@ -323,81 +385,6 @@ Removed
323
385
deprecated since Python 3.2.
324
386
(Contributed by Hugo van Kemenade in :issue: `45173 `.)
325
387
326
-
327
- Optimizations
328
- =============
329
-
330
- * Compiler now optimizes simple C-style formatting with literal format
331
- containing only format codes ``%s ``, ``%r `` and ``%a `` and makes it as
332
- fast as corresponding f-string expression.
333
- (Contributed by Serhiy Storchaka in :issue: `28307 `.)
334
-
335
- * "Zero-cost" exceptions are implemented. The cost of ``try `` statements is
336
- almost eliminated when no exception is raised.
337
- (Contributed by Mark Shannon in :issue: `40222 `.)
338
-
339
- * Method calls with keywords are now faster due to bytecode
340
- changes which avoid creating bound method instances. Previously, this
341
- optimization was applied only to method calls with purely positional
342
- arguments.
343
- (Contributed by Ken Jin and Mark Shannon in :issue: `26110 `, based on ideas
344
- implemented in PyPy.)
345
-
346
- * :file: `.pdbrc ` is now read with ``'utf-8' `` encoding.
347
-
348
- * Pure ASCII strings are now normalized in constant time by :func: `unicodedata.normalize `.
349
- (Contributed by Dong-hee Na in :issue: `44987 `.)
350
-
351
-
352
- CPython bytecode changes
353
- ========================
354
-
355
- * Added a new :opcode: `CALL_METHOD_KW ` opcode. Calls a method in a similar
356
- fashion as :opcode: `CALL_METHOD `, but also supports keyword arguments. Works
357
- in tandem with :opcode: `LOAD_METHOD `.
358
-
359
-
360
- Build Changes
361
- =============
362
-
363
- * CPython can now be built with the ThinLTO option via ``--with-lto=thin ``.
364
- (Contributed by Dong-hee Na and Brett Holman in :issue: `44340 `.)
365
-
366
-
367
- Deprecated
368
- ==========
369
-
370
- * The :mod: `lib2to3 ` package is now deprecated and may not be able to parse
371
- Python 3.10 or newer. See the :pep: `617 ` (New PEG parser for CPython).
372
- (Contributed by Victor Stinner in :issue: `40360 `.)
373
-
374
- * :class: `webbrowser.MacOSX ` is deprecated and will be removed in Python 3.13.
375
- It is untested and undocumented and also not used by webbrowser itself.
376
- (Contributed by Dong-hee Na in :issue: `42255 `.)
377
-
378
- * The behavior of returning a value from a :class: `~unittest.TestCase ` and
379
- :class: `~unittest.IsolatedAsyncioTestCase ` test methods (other than the
380
- default ``None `` value), is now deprecated.
381
-
382
- * Deprecated the following :mod: `unittest ` functions, scheduled for removal in
383
- Python 3.13:
384
-
385
- * :func: `unittest.findTestCases `
386
- * :func: `unittest.makeSuite `
387
- * :func: `unittest.getTestCaseNames `
388
-
389
- Use :class: `~unittest.TestLoader ` method instead:
390
-
391
- * :meth: `unittest.TestLoader.loadTestsFromModule `
392
- * :meth: `unittest.TestLoader.loadTestsFromTestCase `
393
- * :meth: `unittest.TestLoader.getTestCaseNames `
394
-
395
- (Contributed by Erlend E. Aasland in :issue: `5846 `.)
396
-
397
-
398
- Removed
399
- =======
400
-
401
388
* The :func: `@asyncio.coroutine <asyncio.coroutine> ` :term: `decorator ` enabling
402
389
legacy generator-based coroutines to be compatible with async/await code.
403
390
The function has been deprecated since Python 3.8 and the removal was
@@ -435,18 +422,30 @@ Changes in the Python API
435
422
how universal newlines works.
436
423
(Contributed by Victor Stinner in :issue: `37330 `.)
437
424
425
+ * The :mod: `pdb ` module now reads the :file: `.pdbrc ` configuration file with
426
+ the ``'utf-8' `` encoding.
427
+ (Contributed by Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) in :issue: `41137 `.)
428
+
429
+
430
+ Build Changes
431
+ =============
432
+
433
+ * CPython can now be built with the ThinLTO option via ``--with-lto=thin ``.
434
+ (Contributed by Dong-hee Na and Brett Holman in :issue: `44340 `.)
435
+
438
436
439
437
C API Changes
440
438
=============
439
+
440
+ New Features
441
+ ------------
442
+
441
443
* Add a new :c:func: `PyType_GetName ` function to get type's short name.
442
444
(Contributed by Hai Shi in :issue: `42035 `.)
443
445
444
446
* Add a new :c:func: `PyType_GetQualName ` function to get type's qualified name.
445
447
(Contributed by Hai Shi in :issue: `42035 `.)
446
448
447
- New Features
448
- ------------
449
-
450
449
Porting to Python 3.11
451
450
----------------------
452
451
0 commit comments