forked from python/python-docs-tr
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path3.12.po
More file actions
3967 lines (3270 loc) · 118 KB
/
3.12.po
File metadata and controls
3967 lines (3270 loc) · 118 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Python Documentation Turkish Translation
# Copyright (C) 2001-2023, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-01 14:57+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <python.docs.tr@gmail.com>\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: whatsnew/3.12.rst:4
msgid "What's New In Python 3.12"
msgstr ""
#: whatsnew/3.12.rst:0
msgid "Editor"
msgstr ""
#: whatsnew/3.12.rst:6
msgid "Adam Turner"
msgstr ""
#: whatsnew/3.12.rst:48
msgid ""
"This article explains the new features in Python 3.12, compared to 3.11. "
"Python 3.12 was released on October 2, 2023. For full details, see the :ref:"
"`changelog <changelog>`."
msgstr ""
#: whatsnew/3.12.rst:54
msgid ":pep:`693` -- Python 3.12 Release Schedule"
msgstr ""
#: whatsnew/3.12.rst:57
msgid "Summary -- Release highlights"
msgstr ""
#: whatsnew/3.12.rst:62
msgid ""
"Python 3.12 is the latest stable release of the Python programming language, "
"with a mix of changes to the language and the standard library. The library "
"changes focus on cleaning up deprecated APIs, usability, and correctness. Of "
"note, the :mod:`!distutils` package has been removed from the standard "
"library. Filesystem support in :mod:`os` and :mod:`pathlib` has seen a "
"number of improvements, and several modules have better performance."
msgstr ""
#: whatsnew/3.12.rst:69
msgid ""
"The language changes focus on usability, as :term:`f-strings <f-string>` "
"have had many limitations removed and 'Did you mean ...' suggestions "
"continue to improve. The new :ref:`type parameter syntax <whatsnew312-"
"pep695>` and :keyword:`type` statement improve ergonomics for using :term:"
"`generic types <generic type>` and :term:`type aliases <type alias>` with "
"static type checkers."
msgstr ""
#: whatsnew/3.12.rst:76
msgid ""
"This article doesn't attempt to provide a complete specification of all new "
"features, but instead gives a convenient overview. For full details, you "
"should refer to the documentation, such as the :ref:`Library Reference "
"<library-index>` and :ref:`Language Reference <reference-index>`. If you "
"want to understand the complete implementation and design rationale for a "
"change, refer to the PEP for a particular new feature; but note that PEPs "
"usually are not kept up-to-date once a feature has been fully implemented."
msgstr ""
#: whatsnew/3.12.rst:90
msgid "New syntax features:"
msgstr ""
#: whatsnew/3.12.rst:92
msgid ""
":ref:`PEP 695 <whatsnew312-pep695>`, type parameter syntax and the :keyword:"
"`type` statement"
msgstr ""
#: whatsnew/3.12.rst:94
msgid "New grammar features:"
msgstr ""
#: whatsnew/3.12.rst:96
msgid ""
":ref:`PEP 701 <whatsnew312-pep701>`, :term:`f-strings <f-string>` in the "
"grammar"
msgstr ""
#: whatsnew/3.12.rst:98
msgid "Interpreter improvements:"
msgstr ""
#: whatsnew/3.12.rst:100
msgid ""
":ref:`PEP 684 <whatsnew312-pep684>`, a unique per-interpreter :term:`GIL "
"<global interpreter lock>`"
msgstr ""
#: whatsnew/3.12.rst:102
msgid ":ref:`PEP 669 <whatsnew312-pep669>`, low impact monitoring"
msgstr ""
#: whatsnew/3.12.rst:103
msgid ""
"`Improved 'Did you mean ...' suggestions <improved error messages_>`_ for :"
"exc:`NameError`, :exc:`ImportError`, and :exc:`SyntaxError` exceptions"
msgstr ""
#: whatsnew/3.12.rst:106
msgid "Python data model improvements:"
msgstr ""
#: whatsnew/3.12.rst:108
msgid ""
":ref:`PEP 688 <whatsnew312-pep688>`, using the :ref:`buffer protocol "
"<bufferobjects>` from Python"
msgstr ""
#: whatsnew/3.12.rst:111
msgid "Significant improvements in the standard library:"
msgstr ""
#: whatsnew/3.12.rst:113
msgid "The :class:`pathlib.Path` class now supports subclassing"
msgstr ""
#: whatsnew/3.12.rst:114
msgid "The :mod:`os` module received several improvements for Windows support"
msgstr ""
#: whatsnew/3.12.rst:115
msgid ""
"A :ref:`command-line interface <sqlite3-cli>` has been added to the :mod:"
"`sqlite3` module"
msgstr ""
#: whatsnew/3.12.rst:117
msgid ""
":func:`isinstance` checks against :func:`runtime-checkable protocols <typing."
"runtime_checkable>` enjoy a speed up of between two and 20 times"
msgstr ""
#: whatsnew/3.12.rst:119
msgid ""
"The :mod:`asyncio` package has had a number of performance improvements, "
"with some benchmarks showing a 75% speed up."
msgstr ""
#: whatsnew/3.12.rst:121
msgid ""
"A :ref:`command-line interface <uuid-cli>` has been added to the :mod:`uuid` "
"module"
msgstr ""
#: whatsnew/3.12.rst:123
msgid ""
"Due to the changes in :ref:`PEP 701 <whatsnew312-pep701>`, producing tokens "
"via the :mod:`tokenize` module is up to 64% faster."
msgstr ""
#: whatsnew/3.12.rst:126
msgid "Security improvements:"
msgstr ""
#: whatsnew/3.12.rst:128
msgid ""
"Replace the builtin :mod:`hashlib` implementations of SHA1, SHA3, SHA2-384, "
"SHA2-512, and MD5 with formally verified code from the `HACL* <https://"
"github.com/hacl-star/hacl-star/>`__ project. These builtin implementations "
"remain as fallbacks that are only used when OpenSSL does not provide them."
msgstr ""
#: whatsnew/3.12.rst:134
msgid "C API improvements:"
msgstr ""
#: whatsnew/3.12.rst:136
msgid ":ref:`PEP 697 <whatsnew312-pep697>`, unstable C API tier"
msgstr ""
#: whatsnew/3.12.rst:137
msgid ":ref:`PEP 683 <whatsnew312-pep683>`, immortal objects"
msgstr ""
#: whatsnew/3.12.rst:139
msgid "CPython implementation improvements:"
msgstr ""
#: whatsnew/3.12.rst:141
msgid ":ref:`PEP 709 <whatsnew312-pep709>`, comprehension inlining"
msgstr ""
#: whatsnew/3.12.rst:142
msgid ":ref:`CPython support <perf_profiling>` for the Linux ``perf`` profiler"
msgstr ""
#: whatsnew/3.12.rst:143
msgid "Implement stack overflow protection on supported platforms"
msgstr ""
#: whatsnew/3.12.rst:145
msgid "New typing features:"
msgstr ""
#: whatsnew/3.12.rst:147
msgid ""
":ref:`PEP 692 <whatsnew312-pep692>`, using :class:`~typing.TypedDict` to "
"annotate :term:`**kwargs <argument>`"
msgstr ""
#: whatsnew/3.12.rst:149
msgid ":ref:`PEP 698 <whatsnew312-pep698>`, :func:`typing.override` decorator"
msgstr ""
#: whatsnew/3.12.rst:151
msgid "Important deprecations, removals or restrictions:"
msgstr ""
#: whatsnew/3.12.rst:153
msgid ""
":pep:`623`: Remove ``wstr`` from Unicode objects in Python's C API, reducing "
"the size of every :class:`str` object by at least 8 bytes."
msgstr ""
#: whatsnew/3.12.rst:156
msgid ""
":pep:`632`: Remove the :mod:`!distutils` package. See `the migration guide "
"<https://peps.python.org/pep-0632/#migration-advice>`_ for advice replacing "
"the APIs it provided. The third-party `Setuptools <https://setuptools.pypa."
"io/en/latest/deprecated/distutils-legacy.html>`__ package continues to "
"provide :mod:`!distutils`, if you still require it in Python 3.12 and beyond."
msgstr ""
#: whatsnew/3.12.rst:163
msgid ""
":gh:`95299`: Do not pre-install ``setuptools`` in virtual environments "
"created with :mod:`venv`. This means that ``distutils``, ``setuptools``, "
"``pkg_resources``, and ``easy_install`` will no longer available by default; "
"to access these run ``pip install setuptools`` in the :ref:`activated <venv-"
"explanation>` virtual environment."
msgstr ""
#: whatsnew/3.12.rst:170
msgid ""
"The :mod:`!asynchat`, :mod:`!asyncore`, and :mod:`!imp` modules have been "
"removed, along with several :class:`unittest.TestCase` `method aliases "
"<unittest-TestCase-removed-aliases_>`_."
msgstr ""
#: whatsnew/3.12.rst:1943
msgid "New Features"
msgstr ""
#: whatsnew/3.12.rst:181
msgid "PEP 695: Type Parameter Syntax"
msgstr ""
#: whatsnew/3.12.rst:183
msgid ""
"Generic classes and functions under :pep:`484` were declared using a verbose "
"syntax that left the scope of type parameters unclear and required explicit "
"declarations of variance."
msgstr ""
#: whatsnew/3.12.rst:187
msgid ""
":pep:`695` introduces a new, more compact and explicit way to create :ref:"
"`generic classes <generic-classes>` and :ref:`functions <generic-"
"functions>`::"
msgstr ""
#: whatsnew/3.12.rst:200
msgid ""
"In addition, the PEP introduces a new way to declare :ref:`type aliases "
"<type-aliases>` using the :keyword:`type` statement, which creates an "
"instance of :class:`~typing.TypeAliasType`::"
msgstr ""
#: whatsnew/3.12.rst:206
msgid "Type aliases can also be :ref:`generic <generic-type-aliases>`::"
msgstr ""
#: whatsnew/3.12.rst:210
msgid ""
"The new syntax allows declaring :class:`~typing.TypeVarTuple` and :class:"
"`~typing.ParamSpec` parameters, as well as :class:`~typing.TypeVar` "
"parameters with bounds or constraints::"
msgstr ""
#: whatsnew/3.12.rst:219
msgid ""
"The value of type aliases and the bound and constraints of type variables "
"created through this syntax are evaluated only on demand (see :ref:`lazy "
"evaluation <lazy-evaluation>`). This means type aliases are able to refer to "
"other types defined later in the file."
msgstr ""
#: whatsnew/3.12.rst:224
msgid ""
"Type parameters declared through a type parameter list are visible within "
"the scope of the declaration and any nested scopes, but not in the outer "
"scope. For example, they can be used in the type annotations for the methods "
"of a generic class or in the class body. However, they cannot be used in the "
"module scope after the class is defined. See :ref:`type-params` for a "
"detailed description of the runtime semantics of type parameters."
msgstr ""
#: whatsnew/3.12.rst:231
msgid ""
"In order to support these scoping semantics, a new kind of scope is "
"introduced, the :ref:`annotation scope <annotation-scopes>`. Annotation "
"scopes behave for the most part like function scopes, but interact "
"differently with enclosing class scopes. In Python 3.13, :term:`annotations "
"<annotation>` will also be evaluated in annotation scopes."
msgstr ""
#: whatsnew/3.12.rst:237
msgid "See :pep:`695` for more details."
msgstr ""
#: whatsnew/3.12.rst:239
msgid ""
"(PEP written by Eric Traut. Implementation by Jelle Zijlstra, Eric Traut, "
"and others in :gh:`103764`.)"
msgstr ""
#: whatsnew/3.12.rst:245
msgid "PEP 701: Syntactic formalization of f-strings"
msgstr ""
#: whatsnew/3.12.rst:247
msgid ""
":pep:`701` lifts some restrictions on the usage of :term:`f-strings <f-"
"string>`. Expression components inside f-strings can now be any valid Python "
"expression, including strings reusing the same quote as the containing f-"
"string, multi-line expressions, comments, backslashes, and unicode escape "
"sequences. Let's cover these in detail:"
msgstr ""
#: whatsnew/3.12.rst:253
msgid ""
"Quote reuse: in Python 3.11, reusing the same quotes as the enclosing f-"
"string raises a :exc:`SyntaxError`, forcing the user to either use other "
"available quotes (like using double quotes or triple quotes if the f-string "
"uses single quotes). In Python 3.12, you can now do things like this:"
msgstr ""
#: whatsnew/3.12.rst:262
msgid ""
"Note that before this change there was no explicit limit in how f-strings "
"can be nested, but the fact that string quotes cannot be reused inside the "
"expression component of f-strings made it impossible to nest f-strings "
"arbitrarily. In fact, this is the most nested f-string that could be written:"
msgstr ""
#: whatsnew/3.12.rst:270
msgid ""
"As now f-strings can contain any valid Python expression inside expression "
"components, it is now possible to nest f-strings arbitrarily:"
msgstr ""
#: whatsnew/3.12.rst:276
msgid ""
"Multi-line expressions and comments: In Python 3.11, f-string expressions "
"must be defined in a single line, even if the expression within the f-string "
"could normally span multiple lines (like literal lists being defined over "
"multiple lines), making them harder to read. In Python 3.12 you can now "
"define f-strings spanning multiple lines, and add inline comments:"
msgstr ""
#: whatsnew/3.12.rst:290
msgid ""
"Backslashes and unicode characters: before Python 3.12 f-string expressions "
"couldn't contain any ``\\`` character. This also affected unicode :ref:"
"`escape sequences <escape-sequences>` (such as ``\\N{snowman}``) as these "
"contain the ``\\N`` part that previously could not be part of expression "
"components of f-strings. Now, you can define expressions like this:"
msgstr ""
#: whatsnew/3.12.rst:303
msgid "See :pep:`701` for more details."
msgstr ""
#: whatsnew/3.12.rst:305
msgid ""
"As a positive side-effect of how this feature has been implemented (by "
"parsing f-strings with :pep:`the PEG parser <617>`), now error messages for "
"f-strings are more precise and include the exact location of the error. For "
"example, in Python 3.11, the following f-string raises a :exc:`SyntaxError`:"
msgstr ""
#: whatsnew/3.12.rst:318
msgid ""
"but the error message doesn't include the exact location of the error within "
"the line and also has the expression artificially surrounded by parentheses. "
"In Python 3.12, as f-strings are parsed with the PEG parser, error messages "
"can be more precise and show the entire line:"
msgstr ""
#: whatsnew/3.12.rst:330
msgid ""
"(Contributed by Pablo Galindo, Batuhan Taskaya, Lysandros Nikolaou, Cristián "
"Maureira-Fredes and Marta Gómez in :gh:`102856`. PEP written by Pablo "
"Galindo, Batuhan Taskaya, Lysandros Nikolaou and Marta Gómez)."
msgstr ""
#: whatsnew/3.12.rst:337
msgid "PEP 684: A Per-Interpreter GIL"
msgstr ""
#: whatsnew/3.12.rst:339
msgid ""
":pep:`684` introduces a per-interpreter :term:`GIL <global interpreter "
"lock>`, so that sub-interpreters may now be created with a unique GIL per "
"interpreter. This allows Python programs to take full advantage of multiple "
"CPU cores. This is currently only available through the C-API, though a "
"Python API is :pep:`anticipated for 3.13 <554>`."
msgstr ""
#: whatsnew/3.12.rst:345
msgid ""
"Use the new :c:func:`Py_NewInterpreterFromConfig` function to create an "
"interpreter with its own GIL::"
msgstr ""
#: whatsnew/3.12.rst:359
msgid ""
"For further examples how to use the C-API for sub-interpreters with a per-"
"interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`."
msgstr ""
#: whatsnew/3.12.rst:362
msgid "(Contributed by Eric Snow in :gh:`104210`, etc.)"
msgstr ""
#: whatsnew/3.12.rst:367
msgid "PEP 669: Low impact monitoring for CPython"
msgstr ""
#: whatsnew/3.12.rst:369
msgid ""
":pep:`669` defines a new :mod:`API <sys.monitoring>` for profilers, "
"debuggers, and other tools to monitor events in CPython. It covers a wide "
"range of events, including calls, returns, lines, exceptions, jumps, and "
"more. This means that you only pay for what you use, providing support for "
"near-zero overhead debuggers and coverage tools. See :mod:`sys.monitoring` "
"for details."
msgstr ""
#: whatsnew/3.12.rst:377
msgid "(Contributed by Mark Shannon in :gh:`103082`.)"
msgstr ""
#: whatsnew/3.12.rst:382
msgid "PEP 688: Making the buffer protocol accessible in Python"
msgstr ""
#: whatsnew/3.12.rst:384
msgid ""
":pep:`688` introduces a way to use the :ref:`buffer protocol "
"<bufferobjects>` from Python code. Classes that implement the :meth:`~object."
"__buffer__` method are now usable as buffer types."
msgstr ""
#: whatsnew/3.12.rst:388
msgid ""
"The new :class:`collections.abc.Buffer` ABC provides a standard way to "
"represent buffer objects, for example in type annotations. The new :class:"
"`inspect.BufferFlags` enum represents the flags that can be used to "
"customize buffer creation. (Contributed by Jelle Zijlstra in :gh:`102500`.)"
msgstr ""
#: whatsnew/3.12.rst:397
msgid "PEP 709: Comprehension inlining"
msgstr ""
#: whatsnew/3.12.rst:399
msgid ""
"Dictionary, list, and set comprehensions are now inlined, rather than "
"creating a new single-use function object for each execution of the "
"comprehension. This speeds up execution of a comprehension by up to two "
"times. See :pep:`709` for further details."
msgstr ""
#: whatsnew/3.12.rst:404
msgid ""
"Comprehension iteration variables remain isolated and don't overwrite a "
"variable of the same name in the outer scope, nor are they visible after the "
"comprehension. Inlining does result in a few visible behavior changes:"
msgstr ""
#: whatsnew/3.12.rst:408
msgid ""
"There is no longer a separate frame for the comprehension in tracebacks, and "
"tracing/profiling no longer shows the comprehension as a function call."
msgstr ""
#: whatsnew/3.12.rst:410
msgid ""
"The :mod:`symtable` module will no longer produce child symbol tables for "
"each comprehension; instead, the comprehension's locals will be included in "
"the parent function's symbol table."
msgstr ""
#: whatsnew/3.12.rst:413
msgid ""
"Calling :func:`locals` inside a comprehension now includes variables from "
"outside the comprehension, and no longer includes the synthetic ``.0`` "
"variable for the comprehension \"argument\"."
msgstr ""
#: whatsnew/3.12.rst:416
msgid ""
"A comprehension iterating directly over ``locals()`` (e.g. ``[k for k in "
"locals()]``) may see \"RuntimeError: dictionary changed size during "
"iteration\" when run under tracing (e.g. code coverage measurement). This is "
"the same behavior already seen in e.g. ``for k in locals():``. To avoid the "
"error, first create a list of keys to iterate over: ``keys = list(locals()); "
"[k for k in keys]``."
msgstr ""
#: whatsnew/3.12.rst:423
msgid "(Contributed by Carl Meyer and Vladimir Matveev in :pep:`709`.)"
msgstr ""
#: whatsnew/3.12.rst:426
msgid "Improved Error Messages"
msgstr ""
#: whatsnew/3.12.rst:428
msgid ""
"Modules from the standard library are now potentially suggested as part of "
"the error messages displayed by the interpreter when a :exc:`NameError` is "
"raised to the top level. (Contributed by Pablo Galindo in :gh:`98254`.)"
msgstr ""
#: whatsnew/3.12.rst:437
msgid ""
"Improve the error suggestion for :exc:`NameError` exceptions for instances. "
"Now if a :exc:`NameError` is raised in a method and the instance has an "
"attribute that's exactly equal to the name in the exception, the suggestion "
"will include ``self.<NAME>`` instead of the closest match in the method "
"scope. (Contributed by Pablo Galindo in :gh:`99139`.)"
msgstr ""
#: whatsnew/3.12.rst:457
msgid ""
"Improve the :exc:`SyntaxError` error message when the user types ``import x "
"from y`` instead of ``from y import x``. (Contributed by Pablo Galindo in :"
"gh:`98931`.)"
msgstr ""
#: whatsnew/3.12.rst:467
msgid ""
":exc:`ImportError` exceptions raised from failed ``from <module> import "
"<name>`` statements now include suggestions for the value of ``<name>`` "
"based on the available names in ``<module>``. (Contributed by Pablo Galindo "
"in :gh:`91058`.)"
msgstr ""
#: whatsnew/3.12.rst:478
msgid "New Features Related to Type Hints"
msgstr ""
#: whatsnew/3.12.rst:480
msgid ""
"This section covers major changes affecting :pep:`type hints <484>` and the :"
"mod:`typing` module."
msgstr ""
#: whatsnew/3.12.rst:486
msgid "PEP 692: Using ``TypedDict`` for more precise ``**kwargs`` typing"
msgstr ""
#: whatsnew/3.12.rst:488
msgid ""
"Typing ``**kwargs`` in a function signature as introduced by :pep:`484` "
"allowed for valid annotations only in cases where all of the ``**kwargs`` "
"were of the same type."
msgstr ""
#: whatsnew/3.12.rst:492
msgid ""
":pep:`692` specifies a more precise way of typing ``**kwargs`` by relying on "
"typed dictionaries::"
msgstr ""
#: whatsnew/3.12.rst:503
msgid "See :pep:`692` for more details."
msgstr ""
#: whatsnew/3.12.rst:505
msgid "(Contributed by Franek Magiera in :gh:`103629`.)"
msgstr ""
#: whatsnew/3.12.rst:510
msgid "PEP 698: Override Decorator for Static Typing"
msgstr ""
#: whatsnew/3.12.rst:512
msgid ""
"A new decorator :func:`typing.override` has been added to the :mod:`typing` "
"module. It indicates to type checkers that the method is intended to "
"override a method in a superclass. This allows type checkers to catch "
"mistakes where a method that is intended to override something in a base "
"class does not in fact do so."
msgstr ""
#: whatsnew/3.12.rst:518
msgid "Example::"
msgstr ""
#: whatsnew/3.12.rst:536
msgid "See :pep:`698` for more details."
msgstr ""
#: whatsnew/3.12.rst:538
msgid "(Contributed by Steven Troxler in :gh:`101561`.)"
msgstr ""
#: whatsnew/3.12.rst:541
msgid "Other Language Changes"
msgstr ""
#: whatsnew/3.12.rst:543
msgid ""
"The parser now raises :exc:`SyntaxError` when parsing source code containing "
"null bytes. (Contributed by Pablo Galindo in :gh:`96670`.)"
msgstr ""
#: whatsnew/3.12.rst:546
msgid ""
"A backslash-character pair that is not a valid escape sequence now generates "
"a :exc:`SyntaxWarning`, instead of :exc:`DeprecationWarning`. For example, "
"``re.compile(\"\\d+\\.\\d+\")`` now emits a :exc:`SyntaxWarning` "
"(``\"\\d\"`` is an invalid escape sequence, use raw strings for regular "
"expression: ``re.compile(r\"\\d+\\.\\d+\")``). In a future Python version, :"
"exc:`SyntaxError` will eventually be raised, instead of :exc:"
"`SyntaxWarning`. (Contributed by Victor Stinner in :gh:`98401`.)"
msgstr ""
#: whatsnew/3.12.rst:555
msgid ""
"Octal escapes with value larger than ``0o377`` (ex: ``\"\\477\"``), "
"deprecated in Python 3.11, now produce a :exc:`SyntaxWarning`, instead of :"
"exc:`DeprecationWarning`. In a future Python version they will be eventually "
"a :exc:`SyntaxError`. (Contributed by Victor Stinner in :gh:`98401`.)"
msgstr ""
#: whatsnew/3.12.rst:561
msgid ""
"Variables used in the target part of comprehensions that are not stored to "
"can now be used in assignment expressions (``:=``). For example, in ``[(b := "
"1) for a, b.prop in some_iter]``, the assignment to ``b`` is now allowed. "
"Note that assigning to variables stored to in the target part of "
"comprehensions (like ``a``) is still disallowed, as per :pep:`572`. "
"(Contributed by Nikita Sobolev in :gh:`100581`.)"
msgstr ""
#: whatsnew/3.12.rst:568
msgid ""
"Exceptions raised in a class or type's ``__set_name__`` method are no longer "
"wrapped by a :exc:`RuntimeError`. Context information is added to the "
"exception as a :pep:`678` note. (Contributed by Irit Katriel in :gh:`77757`.)"
msgstr ""
#: whatsnew/3.12.rst:572
msgid ""
"When a ``try-except*`` construct handles the entire :exc:`ExceptionGroup` "
"and raises one other exception, that exception is no longer wrapped in an :"
"exc:`ExceptionGroup`. Also changed in version 3.11.4. (Contributed by Irit "
"Katriel in :gh:`103590`.)"
msgstr ""
#: whatsnew/3.12.rst:577
msgid ""
"The Garbage Collector now runs only on the eval breaker mechanism of the "
"Python bytecode evaluation loop instead of object allocations. The GC can "
"also run when :c:func:`PyErr_CheckSignals` is called so C extensions that "
"need to run for a long time without executing any Python code also have a "
"chance to execute the GC periodically. (Contributed by Pablo Galindo in :gh:"
"`97922`.)"
msgstr ""
#: whatsnew/3.12.rst:584
msgid ""
"All builtin and extension callables expecting boolean parameters now accept "
"arguments of any type instead of just :class:`bool` and :class:`int`. "
"(Contributed by Serhiy Storchaka in :gh:`60203`.)"
msgstr ""
#: whatsnew/3.12.rst:588
msgid ""
":class:`memoryview` now supports the half-float type (the \"e\" format "
"code). (Contributed by Donghee Na and Antoine Pitrou in :gh:`90751`.)"
msgstr ""
#: whatsnew/3.12.rst:591
msgid ""
":class:`slice` objects are now hashable, allowing them to be used as dict "
"keys and set items. (Contributed by Will Bradshaw, Furkan Onder, and Raymond "
"Hettinger in :gh:`101264`.)"
msgstr ""
#: whatsnew/3.12.rst:594
msgid ""
":func:`sum` now uses Neumaier summation to improve accuracy and "
"commutativity when summing floats or mixed ints and floats. (Contributed by "
"Raymond Hettinger in :gh:`100425`.)"
msgstr ""
#: whatsnew/3.12.rst:598
msgid ""
":func:`ast.parse` now raises :exc:`SyntaxError` instead of :exc:`ValueError` "
"when parsing source code containing null bytes. (Contributed by Pablo "
"Galindo in :gh:`96670`.)"
msgstr ""
#: whatsnew/3.12.rst:602
msgid ""
"The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, "
"have a new a *filter* argument that allows limiting tar features than may be "
"surprising or dangerous, such as creating files outside the destination "
"directory. See :ref:`tarfile extraction filters <tarfile-extraction-filter>` "
"for details. In Python 3.14, the default will switch to ``'data'``. "
"(Contributed by Petr Viktorin in :pep:`706`.)"
msgstr ""
#: whatsnew/3.12.rst:610
msgid ""
":class:`types.MappingProxyType` instances are now hashable if the underlying "
"mapping is hashable. (Contributed by Serhiy Storchaka in :gh:`87995`.)"
msgstr ""
#: whatsnew/3.12.rst:614
msgid ""
"Add :ref:`support for the perf profiler <perf_profiling>` through the new "
"environment variable :envvar:`PYTHONPERFSUPPORT` and command-line option :"
"option:`-X perf <-X>`, as well as the new :func:`sys."
"activate_stack_trampoline`, :func:`sys.deactivate_stack_trampoline`, and :"
"func:`sys.is_stack_trampoline_active` functions. (Design by Pablo Galindo. "
"Contributed by Pablo Galindo and Christian Heimes with contributions from "
"Gregory P. Smith [Google] and Mark Shannon in :gh:`96123`.)"
msgstr ""
#: whatsnew/3.12.rst:626
msgid "New Modules"
msgstr ""
#: whatsnew/3.12.rst:628
msgid "None."
msgstr ""
#: whatsnew/3.12.rst:632
msgid "Improved Modules"
msgstr ""
#: whatsnew/3.12.rst:635
msgid "array"
msgstr ""
#: whatsnew/3.12.rst:637
msgid ""
"The :class:`array.array` class now supports subscripting, making it a :term:"
"`generic type`. (Contributed by Jelle Zijlstra in :gh:`98658`.)"
msgstr ""
#: whatsnew/3.12.rst:641
msgid "asyncio"
msgstr ""
#: whatsnew/3.12.rst:643
msgid ""
"The performance of writing to sockets in :mod:`asyncio` has been "
"significantly improved. ``asyncio`` now avoids unnecessary copying when "
"writing to sockets and uses :meth:`~socket.socket.sendmsg` if the platform "
"supports it. (Contributed by Kumar Aditya in :gh:`91166`.)"
msgstr ""
#: whatsnew/3.12.rst:648
msgid ""
"Add :func:`asyncio.eager_task_factory` and :func:`asyncio."
"create_eager_task_factory` functions to allow opting an event loop in to "
"eager task execution, making some use-cases 2x to 5x faster. (Contributed by "
"Jacob Bower & Itamar Oren in :gh:`102853`, :gh:`104140`, and :gh:`104138`)"
msgstr ""
#: whatsnew/3.12.rst:653
msgid ""
"On Linux, :mod:`asyncio` uses :class:`asyncio.PidfdChildWatcher` by default "
"if :func:`os.pidfd_open` is available and functional instead of :class:"
"`asyncio.ThreadedChildWatcher`. (Contributed by Kumar Aditya in :gh:`98024`.)"
msgstr ""
#: whatsnew/3.12.rst:658
msgid ""
"The event loop now uses the best available child watcher for each platform (:"
"class:`asyncio.PidfdChildWatcher` if supported and :class:`asyncio."
"ThreadedChildWatcher` otherwise), so manually configuring a child watcher is "
"not recommended. (Contributed by Kumar Aditya in :gh:`94597`.)"
msgstr ""
#: whatsnew/3.12.rst:664
msgid ""
"Add *loop_factory* parameter to :func:`asyncio.run` to allow specifying a "
"custom event loop factory. (Contributed by Kumar Aditya in :gh:`99388`.)"
msgstr ""
#: whatsnew/3.12.rst:668
msgid ""
"Add C implementation of :func:`asyncio.current_task` for 4x-6x speedup. "
"(Contributed by Itamar Oren and Pranav Thulasiram Bhat in :gh:`100344`.)"
msgstr ""
#: whatsnew/3.12.rst:671
msgid ""
":func:`asyncio.iscoroutine` now returns ``False`` for generators as :mod:"
"`asyncio` does not support legacy generator-based coroutines. (Contributed "
"by Kumar Aditya in :gh:`102748`.)"
msgstr ""
#: whatsnew/3.12.rst:675
msgid ""
":func:`asyncio.wait` and :func:`asyncio.as_completed` now accepts generators "
"yielding tasks. (Contributed by Kumar Aditya in :gh:`78530`.)"
msgstr ""
#: whatsnew/3.12.rst:680
msgid "calendar"
msgstr ""
#: whatsnew/3.12.rst:682
msgid ""
"Add enums :data:`calendar.Month` and :data:`calendar.Day` defining months of "
"the year and days of the week. (Contributed by Prince Roshan in :gh:"
"`103636`.)"
msgstr ""
#: whatsnew/3.12.rst:687
msgid "csv"
msgstr ""
#: whatsnew/3.12.rst:689
msgid ""
"Add :const:`csv.QUOTE_NOTNULL` and :const:`csv.QUOTE_STRINGS` flags to "
"provide finer grained control of ``None`` and empty strings by :class:`csv."
"writer` objects."
msgstr ""
#: whatsnew/3.12.rst:694
msgid "dis"
msgstr ""
#: whatsnew/3.12.rst:696
msgid ""
"Pseudo instruction opcodes (which are used by the compiler but do not appear "
"in executable bytecode) are now exposed in the :mod:`dis` module. :opcode:"
"`HAVE_ARGUMENT` is still relevant to real opcodes, but it is not useful for "
"pseudo instructions. Use the new :data:`dis.hasarg` collection instead. "
"(Contributed by Irit Katriel in :gh:`94216`.)"
msgstr ""
#: whatsnew/3.12.rst:704
msgid ""
"Add the :data:`dis.hasexc` collection to signify instructions that set an "
"exception handler. (Contributed by Irit Katriel in :gh:`94216`.)"
msgstr ""
#: whatsnew/3.12.rst:708
msgid "fractions"
msgstr ""
#: whatsnew/3.12.rst:710
msgid ""
"Objects of type :class:`fractions.Fraction` now support float-style "
"formatting. (Contributed by Mark Dickinson in :gh:`100161`.)"
msgstr ""
#: whatsnew/3.12.rst:714
msgid "importlib.resources"
msgstr ""
#: whatsnew/3.12.rst:716
msgid ""
":func:`importlib.resources.as_file` now supports resource directories. "
"(Contributed by Jason R. Coombs in :gh:`97930`.)"
msgstr ""
#: whatsnew/3.12.rst:719
msgid ""
"Rename first parameter of :func:`importlib.resources.files` to *anchor*. "
"(Contributed by Jason R. Coombs in :gh:`100598`.)"
msgstr ""
#: whatsnew/3.12.rst:723
msgid "inspect"
msgstr ""
#: whatsnew/3.12.rst:725
msgid ""
"Add :func:`inspect.markcoroutinefunction` to mark sync functions that return "
"a :term:`coroutine` for use with :func:`inspect.iscoroutinefunction`. "
"(Contributed Carlton Gibson in :gh:`99247`.)"
msgstr ""
#: whatsnew/3.12.rst:729
msgid ""
"Add :func:`inspect.getasyncgenstate` and :func:`inspect.getasyncgenlocals` "
"for determining the current state of asynchronous generators. (Contributed "
"by Thomas Krennwallner in :gh:`79940`.)"
msgstr ""
#: whatsnew/3.12.rst:733
msgid ""
"The performance of :func:`inspect.getattr_static` has been considerably "
"improved. Most calls to the function should be at least 2x faster than they "
"were in Python 3.11, and some may be 6x faster or more. (Contributed by Alex "
"Waygood in :gh:`103193`.)"
msgstr ""
#: whatsnew/3.12.rst:739
msgid "itertools"
msgstr ""
#: whatsnew/3.12.rst:741
msgid ""
"Add :class:`itertools.batched()` for collecting into even-sized tuples where "
"the last batch may be shorter than the rest. (Contributed by Raymond "
"Hettinger in :gh:`98363`.)"
msgstr ""
#: whatsnew/3.12.rst:746
msgid "math"
msgstr ""
#: whatsnew/3.12.rst:748
msgid ""
"Add :func:`math.sumprod` for computing a sum of products. (Contributed by "
"Raymond Hettinger in :gh:`100485`.)"
msgstr ""
#: whatsnew/3.12.rst:751
msgid ""
"Extend :func:`math.nextafter` to include a *steps* argument for moving up or "
"down multiple steps at a time. (By Matthias Goergens, Mark Dickinson, and "
"Raymond Hettinger in :gh:`94906`.)"
msgstr ""
#: whatsnew/3.12.rst:756
msgid "os"
msgstr ""
#: whatsnew/3.12.rst:758
msgid ""
"Add :const:`os.PIDFD_NONBLOCK` to open a file descriptor for a process with :"
"func:`os.pidfd_open` in non-blocking mode. (Contributed by Kumar Aditya in :"
"gh:`93312`.)"
msgstr ""
#: whatsnew/3.12.rst:762
msgid ""
":class:`os.DirEntry` now includes an :meth:`os.DirEntry.is_junction` method "
"to check if the entry is a junction. (Contributed by Charles Machalow in :gh:"
"`99547`.)"
msgstr ""
#: whatsnew/3.12.rst:766
msgid ""
"Add :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts` "
"functions on Windows for enumerating drives, volumes and mount points. "
"(Contributed by Steve Dower in :gh:`102519`.)"
msgstr ""
#: whatsnew/3.12.rst:770
msgid ""
":func:`os.stat` and :func:`os.lstat` are now more accurate on Windows. The "
"``st_birthtime`` field will now be filled with the creation time of the "
"file, and ``st_ctime`` is deprecated but still contains the creation time "
"(but in the future will return the last metadata change, for consistency "
"with other platforms). ``st_dev`` may be up to 64 bits and ``st_ino`` up to "
"128 bits depending on your file system, and ``st_rdev`` is always set to "
"zero rather than incorrect values. Both functions may be significantly "
"faster on newer releases of Windows. (Contributed by Steve Dower in :gh:"
"`99726`.)"
msgstr ""
#: whatsnew/3.12.rst:781
msgid "os.path"
msgstr ""
#: whatsnew/3.12.rst:783
msgid ""