-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path3.12.po
More file actions
4079 lines (3237 loc) · 128 KB
/
3.12.po
File metadata and controls
4079 lines (3237 loc) · 128 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2026, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Rafael Fontenelle <[email protected]>, 2025
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-11 16:04+0000\n"
"PO-Revision-Date: 2025-07-18 19:59+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && "
"(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && "
"n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
msgid "What's New In Python 3.12"
msgstr ""
msgid "Editor"
msgstr "redakcja"
msgid "Adam Turner"
msgstr ""
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 ""
msgid ":pep:`693` -- Python 3.12 Release Schedule"
msgstr ""
msgid "Summary -- Release highlights"
msgstr "Podsumowanie – najważniejsze nowości"
msgid ""
"Python 3.12 is a 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 ""
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 ""
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 ""
msgid "New syntax features:"
msgstr "Nowe cechy składni:"
msgid ""
":ref:`PEP 695 <whatsnew312-pep695>`, type parameter syntax and the :keyword:"
"`type` statement"
msgstr ""
msgid "New grammar features:"
msgstr ""
msgid ""
":ref:`PEP 701 <whatsnew312-pep701>`, :term:`f-strings <f-string>` in the "
"grammar"
msgstr ""
msgid "Interpreter improvements:"
msgstr "Udoskonalenia interpretera:"
msgid ""
":ref:`PEP 684 <whatsnew312-pep684>`, a unique per-interpreter :term:`GIL "
"<global interpreter lock>`"
msgstr ""
msgid ":ref:`PEP 669 <whatsnew312-pep669>`, low impact monitoring"
msgstr ""
msgid ""
"`Improved 'Did you mean ...' suggestions <improved error messages_>`_ for :"
"exc:`NameError`, :exc:`ImportError`, and :exc:`SyntaxError` exceptions"
msgstr ""
msgid "Python data model improvements:"
msgstr ""
msgid ""
":ref:`PEP 688 <whatsnew312-pep688>`, using the :ref:`buffer protocol "
"<bufferobjects>` from Python"
msgstr ""
msgid "Significant improvements in the standard library:"
msgstr ""
msgid "The :class:`pathlib.Path` class now supports subclassing"
msgstr ""
msgid "The :mod:`os` module received several improvements for Windows support"
msgstr ""
msgid ""
"A :ref:`command-line interface <sqlite3-cli>` has been added to the :mod:"
"`sqlite3` module"
msgstr ""
msgid ""
":func:`isinstance` checks against :func:`runtime-checkable protocols <typing."
"runtime_checkable>` enjoy a speed up of between two and 20 times"
msgstr ""
msgid ""
"The :mod:`asyncio` package has had a number of performance improvements, "
"with some benchmarks showing a 75% speed up."
msgstr ""
msgid ""
"A :ref:`command-line interface <uuid-cli>` has been added to the :mod:`uuid` "
"module"
msgstr ""
msgid ""
"Due to the changes in :ref:`PEP 701 <whatsnew312-pep701>`, producing tokens "
"via the :mod:`tokenize` module is up to 64% faster."
msgstr ""
msgid "Security improvements:"
msgstr ""
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 ""
msgid "C API improvements:"
msgstr ""
msgid ":ref:`PEP 697 <whatsnew312-pep697>`, unstable C API tier"
msgstr ""
msgid ":ref:`PEP 683 <whatsnew312-pep683>`, immortal objects"
msgstr ""
msgid "CPython implementation improvements:"
msgstr ""
msgid ":ref:`PEP 709 <whatsnew312-pep709>`, comprehension inlining"
msgstr ""
msgid ":ref:`CPython support <perf_profiling>` for the Linux ``perf`` profiler"
msgstr ""
msgid "Implement stack overflow protection on supported platforms"
msgstr ""
msgid "New typing features:"
msgstr "Nowe cechy typowania:"
msgid ""
":ref:`PEP 692 <whatsnew312-pep692>`, using :class:`~typing.TypedDict` to "
"annotate :term:`**kwargs <argument>`"
msgstr ""
msgid ":ref:`PEP 698 <whatsnew312-pep698>`, :func:`typing.override` decorator"
msgstr ""
msgid "Important deprecations, removals or restrictions:"
msgstr "Ważne dezaprobaty, usunięcia lub ograniczenia:"
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 ""
msgid ""
":pep:`632`: Remove the :mod:`!distutils` package. See :pep:`the migration "
"guide <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 ""
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 ""
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 ""
msgid "New Features"
msgstr "Nowe funkcjonalności"
msgid "PEP 695: Type Parameter Syntax"
msgstr ""
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 ""
msgid ""
":pep:`695` introduces a new, more compact and explicit way to create :ref:"
"`generic classes <generic-classes>` and :ref:`functions <generic-"
"functions>`::"
msgstr ""
msgid ""
"def max[T](args: Iterable[T]) -> T:\n"
" ...\n"
"\n"
"class list[T]:\n"
" def __getitem__(self, index: int, /) -> T:\n"
" ...\n"
"\n"
" def append(self, element: T) -> None:\n"
" ..."
msgstr ""
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 ""
msgid "type Point = tuple[float, float]"
msgstr ""
msgid "Type aliases can also be :ref:`generic <generic-type-aliases>`::"
msgstr ""
msgid "type Point[T] = tuple[T, T]"
msgstr ""
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 ""
msgid ""
"type IntFunc[**P] = Callable[P, int] # ParamSpec\n"
"type LabeledTuple[*Ts] = tuple[str, *Ts] # TypeVarTuple\n"
"type HashableSequence[T: Hashable] = Sequence[T] # TypeVar with bound\n"
"type IntOrStrSequence[T: (int, str)] = Sequence[T] # TypeVar with "
"constraints"
msgstr ""
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 ""
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 ""
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 ""
msgid "See :pep:`695` for more details."
msgstr ""
msgid ""
"(PEP written by Eric Traut. Implementation by Jelle Zijlstra, Eric Traut, "
"and others in :gh:`103764`.)"
msgstr ""
msgid "PEP 701: Syntactic formalization of f-strings"
msgstr ""
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 ""
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 ""
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 ""
msgid ""
"As now f-strings can contain any valid Python expression inside expression "
"components, it is now possible to nest f-strings arbitrarily:"
msgstr ""
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 ""
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 ""
msgid "See :pep:`701` for more details."
msgstr ""
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 ""
msgid ""
">>> my_string = f\"{x z y}\" + f\"{1 + 1}\"\n"
" File \"<stdin>\", line 1\n"
" (x z y)\n"
" ^^^\n"
"SyntaxError: f-string: invalid syntax. Perhaps you forgot a comma?"
msgstr ""
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 ""
msgid ""
">>> my_string = f\"{x z y}\" + f\"{1 + 1}\"\n"
" File \"<stdin>\", line 1\n"
" my_string = f\"{x z y}\" + f\"{1 + 1}\"\n"
" ^^^\n"
"SyntaxError: invalid syntax. Perhaps you forgot a comma?"
msgstr ""
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 ""
msgid "PEP 684: A Per-Interpreter GIL"
msgstr ""
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 ""
msgid ""
"Use the new :c:func:`Py_NewInterpreterFromConfig` function to create an "
"interpreter with its own GIL:"
msgstr ""
msgid ""
"PyInterpreterConfig config = {\n"
" .check_multi_interp_extensions = 1,\n"
" .gil = PyInterpreterConfig_OWN_GIL,\n"
"};\n"
"PyThreadState *tstate = NULL;\n"
"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n"
"if (PyStatus_Exception(status)) {\n"
" return -1;\n"
"}\n"
"/* The new interpreter is now active in the current thread. */"
msgstr ""
msgid ""
"For further examples how to use the C-API for sub-interpreters with a per-"
"interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`."
msgstr ""
msgid "(Contributed by Eric Snow in :gh:`104210`, etc.)"
msgstr ""
msgid "PEP 669: Low impact monitoring for CPython"
msgstr ""
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 ""
msgid "(Contributed by Mark Shannon in :gh:`103082`.)"
msgstr ""
msgid "PEP 688: Making the buffer protocol accessible in Python"
msgstr ""
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 ""
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 ""
msgid "PEP 709: Comprehension inlining"
msgstr ""
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 ""
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 ""
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 ""
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 ""
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 ""
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 ""
msgid "(Contributed by Carl Meyer and Vladimir Matveev in :pep:`709`.)"
msgstr ""
msgid "Improved Error Messages"
msgstr ""
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 ""
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 ""
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 ""
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 ""
msgid "New Features Related to Type Hints"
msgstr ""
msgid ""
"This section covers major changes affecting :pep:`type hints <484>` and the :"
"mod:`typing` module."
msgstr ""
msgid "PEP 692: Using ``TypedDict`` for more precise ``**kwargs`` typing"
msgstr ""
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 ""
msgid ""
":pep:`692` specifies a more precise way of typing ``**kwargs`` by relying on "
"typed dictionaries::"
msgstr ""
msgid ""
"from typing import TypedDict, Unpack\n"
"\n"
"class Movie(TypedDict):\n"
" name: str\n"
" year: int\n"
"\n"
"def foo(**kwargs: Unpack[Movie]): ..."
msgstr ""
msgid "See :pep:`692` for more details."
msgstr ""
msgid "(Contributed by Franek Magiera in :gh:`103629`.)"
msgstr ""
msgid "PEP 698: Override Decorator for Static Typing"
msgstr ""
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 ""
msgid "Example::"
msgstr "Przykład::"
msgid ""
"from typing import override\n"
"\n"
"class Base:\n"
" def get_color(self) -> str:\n"
" return \"blue\"\n"
"\n"
"class GoodChild(Base):\n"
" @override # ok: overrides Base.get_color\n"
" def get_color(self) -> str:\n"
" return \"yellow\"\n"
"\n"
"class BadChild(Base):\n"
" @override # type checker error: does not override Base.get_color\n"
" def get_colour(self) -> str:\n"
" return \"red\""
msgstr ""
msgid "See :pep:`698` for more details."
msgstr ""
msgid "(Contributed by Steven Troxler in :gh:`101561`.)"
msgstr ""
msgid "Other Language Changes"
msgstr ""
msgid ""
"The parser now raises :exc:`SyntaxError` when parsing source code containing "
"null bytes. (Contributed by Pablo Galindo in :gh:`96670`.)"
msgstr ""
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 ""
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 ""
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 ""
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 ""
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 ""
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 ""
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 ""
msgid ""
":class:`memoryview` now supports the half-float type (the \"e\" format "
"code). (Contributed by Donghee Na and Antoine Pitrou in :gh:`90751`.)"
msgstr ""
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 ""
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 ""
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 ""
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 ""
msgid ""
":class:`types.MappingProxyType` instances are now hashable if the underlying "
"mapping is hashable. (Contributed by Serhiy Storchaka in :gh:`87995`.)"
msgstr ""
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 ""
msgid "New Modules"
msgstr ""
msgid "None."
msgstr ""
msgid "Improved Modules"
msgstr "Ulepszone moduły"
msgid "array"
msgstr ""
msgid ""
"The :class:`array.array` class now supports subscripting, making it a :term:"
"`generic type`. (Contributed by Jelle Zijlstra in :gh:`98658`.)"
msgstr ""
msgid "asyncio"
msgstr ""
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 ""
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 ""
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 ""
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 ""
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 ""
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 ""
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 ""
msgid ""
":func:`asyncio.wait` and :func:`asyncio.as_completed` now accepts generators "
"yielding tasks. (Contributed by Kumar Aditya in :gh:`78530`.)"
msgstr ""
msgid "calendar"
msgstr ""
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 ""
msgid "csv"
msgstr ""
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 ""
msgid "dis"
msgstr ""
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 ""
msgid ""
"Add the :data:`dis.hasexc` collection to signify instructions that set an "
"exception handler. (Contributed by Irit Katriel in :gh:`94216`.)"
msgstr ""
msgid "fractions"
msgstr ""
msgid ""
"Objects of type :class:`fractions.Fraction` now support float-style "
"formatting. (Contributed by Mark Dickinson in :gh:`100161`.)"
msgstr ""
msgid "importlib.resources"
msgstr ""
msgid ""
":func:`importlib.resources.as_file` now supports resource directories. "
"(Contributed by Jason R. Coombs in :gh:`97930`.)"
msgstr ""
msgid ""
"Rename first parameter of :func:`importlib.resources.files` to *anchor*. "
"(Contributed by Jason R. Coombs in :gh:`100598`.)"
msgstr ""
msgid "inspect"
msgstr ""
msgid ""
"Add :func:`inspect.markcoroutinefunction` to mark sync functions that return "
"a :term:`coroutine` for use with :func:`inspect.iscoroutinefunction`. "
"(Contributed by Carlton Gibson in :gh:`99247`.)"
msgstr ""
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 ""
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. (Contributed by Alex Waygood in :gh:`103193`.)"
msgstr ""
msgid "itertools"
msgstr ""
msgid ""
"Add :func:`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 ""
msgid "math"
msgstr ""
msgid ""
"Add :func:`math.sumprod` for computing a sum of products. (Contributed by "
"Raymond Hettinger in :gh:`100485`.)"
msgstr ""
msgid ""
"Extend :func:`math.nextafter` to include a *steps* argument for moving up or "
"down multiple steps at a time. (Contributed by Matthias Goergens, Mark "
"Dickinson, and Raymond Hettinger in :gh:`94906`.)"
msgstr ""
msgid "os"
msgstr ""
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 ""
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 ""
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 ""
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 ""
msgid ""
"As of 3.12.4, :func:`os.mkdir` and :func:`os.makedirs` on Windows now "
"support passing a *mode* value of ``0o700`` to apply access control to the "
"new directory. This implicitly affects :func:`tempfile.mkdtemp` and is a "
"mitigation for :cve:`2024-4030`. Other values for *mode* continue to be "
"ignored. (Contributed by Steve Dower in :gh:`118486`.)"
msgstr ""
msgid "os.path"
msgstr ""
msgid ""
"Add :func:`os.path.isjunction` to check if a given path is a junction. "
"(Contributed by Charles Machalow in :gh:`99547`.)"
msgstr ""
msgid ""
"Add :func:`os.path.splitroot` to split a path into a triad ``(drive, root, "
"tail)``. (Contributed by Barney Gale in :gh:`101000`.)"
msgstr ""
msgid "pathlib"
msgstr ""
msgid ""
"Add support for subclassing :class:`pathlib.PurePath` and :class:`pathlib."
"Path`, plus their Posix- and Windows-specific variants. Subclasses may "
"override the :meth:`pathlib.PurePath.with_segments` method to pass "
"information between path instances."
msgstr ""
msgid ""
"Add :meth:`pathlib.Path.walk` for walking the directory trees and generating "
"all file or directory names within them, similar to :func:`os.walk`. "
"(Contributed by Stanislav Zmiev in :gh:`90385`.)"
msgstr ""
msgid ""
"Add *walk_up* optional parameter to :meth:`pathlib.PurePath.relative_to` to "
"allow the insertion of ``..`` entries in the result; this behavior is more "
"consistent with :func:`os.path.relpath`. (Contributed by Domenico Ragusa in :"
"gh:`84538`.)"
msgstr ""
msgid ""
"Add :meth:`pathlib.Path.is_junction` as a proxy to :func:`os.path."
"isjunction`. (Contributed by Charles Machalow in :gh:`99547`.)"
msgstr ""
msgid ""
"Add *case_sensitive* optional parameter to :meth:`pathlib.Path.glob`, :meth:"
"`pathlib.Path.rglob` and :meth:`pathlib.PurePath.match` for matching the "
"path's case sensitivity, allowing for more precise control over the matching "
"process."
msgstr ""
msgid "platform"
msgstr ""
msgid ""
"Add support for detecting Windows 11 and Windows Server releases past 2012. "
"Previously, lookups on Windows Server platforms newer than Windows Server "
"2012 and on Windows 11 would return ``Windows-10``. (Contributed by Steve "
"Dower in :gh:`89545`.)"
msgstr ""
msgid "pdb"
msgstr ""
msgid ""
"Add convenience variables to hold values temporarily for debug session and "
"provide quick access to values like the current frame or the return value. "
"(Contributed by Tian Gao in :gh:`103693`.)"
msgstr ""