1
0
Fork 0
python-docs-fr/whatsnew/3.11.po

3203 lines
97 KiB
Plaintext
Raw Normal View History

2022-03-23 17:40:12 +00:00
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
2022-05-22 21:15:02 +00:00
"Report-Msgid-Bugs-To:\n"
"POT-Creation-Date: 2022-05-22 23:13+0200\n"
"PO-Revision-Date: 2022-05-23 00:49+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n"
2022-03-23 17:40:12 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Last-Translator: Yannick Gingras <ygingras@ygingras.net>\n"
"X-Generator: Poedit 3.0\n"
2022-03-23 17:40:12 +00:00
#: whatsnew/3.11.rst:3
msgid "What's New In Python 3.11"
msgstr "Les nouveautés de Python 3.11"
2022-03-23 17:40:12 +00:00
#: whatsnew/3.11.rst:0
msgid "Release"
msgstr ""
#: whatsnew/3.11.rst:5
msgid "|release|"
msgstr ""
#: whatsnew/3.11.rst:0
msgid "Date"
msgstr "Date"
2022-03-23 17:40:12 +00:00
#: whatsnew/3.11.rst:6
msgid "|today|"
msgstr ""
#: whatsnew/3.11.rst:48
msgid ""
"This article explains the new features in Python 3.11, compared to 3.10."
msgstr ""
"Cet article explique les nouvelles fonctionnalités de Python 3.11 par "
"rapport à la version 3.10."
2022-03-23 17:40:12 +00:00
#: whatsnew/3.11.rst:50
msgid "For full details, see the :ref:`changelog <changelog>`."
msgstr ""
"Pour plus de détails, voir le :ref:`journal des modifications <changelog>`."
2022-03-23 17:40:12 +00:00
#: whatsnew/3.11.rst:54
msgid ""
"Prerelease users should be aware that this document is currently in draft "
"form. It will be updated substantially as Python 3.11 moves towards release, "
"so it's worth checking back even after reading earlier versions."
msgstr ""
#: whatsnew/3.11.rst:60
msgid "Summary -- Release highlights"
msgstr "Résumé Points forts de la publication"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:65
msgid ""
"Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured "
"a 1.25x speedup on the standard benchmark suite. See `Faster CPython`_ for "
"details."
msgstr ""
#: whatsnew/3.11.rst:70
2022-03-23 17:40:12 +00:00
msgid "New syntax features:"
msgstr "Nouvelles fonctionnalités de syntaxe :"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:72
2022-03-23 17:40:12 +00:00
msgid ""
":pep:`654`: Exception Groups and ``except*``. (Contributed by Irit Katriel "
"in :issue:`45292`.)"
msgstr ""
":pep:`654` : Groupes d'exceptions et instruction ``except*`` (contribution "
"d'*Irit Katriel* dans :issue:`45292`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:75
2022-03-23 17:40:12 +00:00
msgid "New typing features:"
msgstr "Nouvelles fonctionnalités de typage :"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:77
msgid ":pep:`646`: Variadic generics."
2022-03-23 17:40:12 +00:00
msgstr ""
":pep:`673` : Type ``Self`` (contribution de *James Hilton-Balfe* et de "
"*Pradeep Kumar* dans :issue:`30924`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:78
msgid ""
":pep:`655`: Marking individual TypedDict items as required or potentially-"
"missing."
msgstr ""
#: whatsnew/3.11.rst:79
msgid ":pep:`673`: ``Self`` type."
msgstr ""
#: whatsnew/3.11.rst:80
msgid ":pep:`675`: Arbitrary literal string type."
msgstr ""
#: whatsnew/3.11.rst:82
msgid "Security improvements:"
msgstr ""
#: whatsnew/3.11.rst:84
msgid ""
"New :option:`-P` command line option and :envvar:`PYTHONSAFEPATH` "
"environment variable to not prepend a potentially unsafe path to :data:`sys."
"path` such as the current directory, the script's directory or an empty "
"string."
msgstr ""
#: whatsnew/3.11.rst:1549
2022-03-23 17:40:12 +00:00
msgid "New Features"
msgstr "Nouvelles fonctionnalités"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:95
2022-03-23 17:40:12 +00:00
msgid "Enhanced error locations in tracebacks"
msgstr "Amélioration de l'emplacement des erreurs dans les traces d'appels"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:97
2022-03-23 17:40:12 +00:00
msgid ""
"When printing tracebacks, the interpreter will now point to the exact "
"expression that caused the error instead of just the line. For example:"
msgstr ""
"Au moment d'afficher une trace d'appels, l'interpréteur indique maintenant "
"quelle est l'expression exacte qui a causé l'erreur plutôt que seulement la "
"ligne. Par exemple :"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:111
2022-03-23 17:40:12 +00:00
msgid ""
"Previous versions of the interpreter would point to just the line making it "
"ambiguous which object was ``None``. These enhanced errors can also be "
"helpful when dealing with deeply nested dictionary objects and multiple "
"function calls,"
msgstr ""
"Les versions précédentes de l'interpréteur indiquaient uniquement la ligne, "
"ce qui rendait ambigu quel objet était ``None``. Les messages d'erreurs "
"améliorés sont aussi utiles quand on travaille avec des objets dictionnaires "
"fortement imbriqués et des appels de fonction multiples,"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:132
2022-03-23 17:40:12 +00:00
msgid "as well as complex arithmetic expressions:"
msgstr "de même qu'avec les expressions arithmétiques complexes :"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:166
2022-03-23 17:40:12 +00:00
msgid ""
"See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan "
"Taskaya and Ammar Askar in :issue:`43950`.)"
msgstr ""
"Voir la :pep:`657` pour plus de détails (contribution de *Pablo Galindo*, "
"*Batuhan Taskaya* et *Ammar Askar* dans :issue:`43950`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:146
2022-03-23 17:40:12 +00:00
msgid ""
"This feature requires storing column positions in code objects which may "
"result in a small increase of disk usage of compiled Python files or "
"interpreter memory usage. To avoid storing the extra information and/or "
"deactivate printing the extra traceback information, the :option:`-X` "
"``no_debug_ranges`` command line flag or the :envvar:`PYTHONNODEBUGRANGES` "
"environment variable can be used."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:154
2022-03-23 17:40:12 +00:00
msgid "Column information for code objects"
msgstr "Information de colonnes pour les objets code"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:156
2022-03-23 17:40:12 +00:00
msgid ""
"The information used by the enhanced traceback feature is made available as "
"a general API that can be used to correlate bytecode instructions with "
"source code. This information can be retrieved using:"
msgstr ""
"L'information utilisée par les traces d'appels améliorées est aussi "
"disponible dans une API générale qui peut être utilisée pour corréler des "
"instructions de code intermédiaire avec le code source. Cette information "
"peut être récupérée en utilisant :"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:160
2022-03-23 17:40:12 +00:00
msgid "The :meth:`codeobject.co_positions` method in Python."
msgstr "la méthode :meth:`codeobject.co_positions` en Python ;"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:161
2022-03-23 17:40:12 +00:00
msgid "The :c:func:`PyCode_Addr2Location` function in the C-API."
msgstr "la fonction :c:func:`PyCode_Addr2Location` dans l'API C."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:163
2022-03-23 17:40:12 +00:00
msgid ""
"The :option:`-X` ``no_debug_ranges`` option and the environment variable :"
"envvar:`PYTHONNODEBUGRANGES` can be used to disable this feature."
msgstr ""
"L'option :option:`-X` ``no_debug_ranges`` et la variable d'environnement :"
"envvar:`PYTHONNODEBUGRANGES` permettent de désactiver cette fonctionnalité."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:170
msgid "Exceptions can be enriched with notes (PEP 678)"
msgstr "Les exceptions peuvent être enrichies avec des notes (PEP 678)"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:172
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"The :meth:`add_note` method was added to :exc:`BaseException`. It can be "
"used to enrich exceptions with context information which is not available at "
"the time when the exception is raised. The notes added appear in the default "
"traceback. See :pep:`678` for more details. (Contributed by Irit Katriel in :"
"issue:`45607`.)"
2022-03-23 17:40:12 +00:00
msgstr ""
"Le champ ``__note__`` a été ajouté à :exc:`BaseException`. Il est ``None`` "
"par défaut, mais il peut être affecté à une chaîne qui est alors ajoutée à "
"la trace d'appel de l'exception (contribution d'*Irit Katriel* dans :issue:"
"`45607`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:182
msgid "New Features Related to Type Hints"
msgstr ""
#: whatsnew/3.11.rst:184
msgid ""
"This section covers major changes affecting :pep:`484` type hints and the :"
"mod:`typing` module."
msgstr ""
#: whatsnew/3.11.rst:188
msgid "PEP 646: Variadic generics"
msgstr ""
#: whatsnew/3.11.rst:190
msgid ""
":pep:`484` introduced :data:`~typing.TypeVar`, enabling creation of generics "
"parameterised with a single type. :pep:`646` introduces :data:`~typing."
"TypeVarTuple`, enabling parameterisation with an *arbitrary* number of "
"types. In other words, a :data:`~typing.TypeVarTuple` is a *variadic* type "
"variable, enabling *variadic* generics. This enables a wide variety of use "
"cases. In particular, it allows the type of array-like structures in "
"numerical computing libraries such as NumPy and TensorFlow to be "
"parameterised with the array *shape*. Static type checkers will now be able "
"to catch shape-related bugs in code that uses these libraries."
msgstr ""
#: whatsnew/3.11.rst:201
msgid "See :pep:`646` for more details."
msgstr ""
#: whatsnew/3.11.rst:203
msgid ""
"(Contributed by Matthew Rahtz in :issue:`43224`, with contributions by "
"Serhiy Storchaka and Jelle Zijlstra. PEP written by Mark Mendoza, Matthew "
"Rahtz, Pradeep Kumar Srinivasan, and Vincent Siles.)"
msgstr ""
#: whatsnew/3.11.rst:208
msgid ""
"PEP 655: Marking individual ``TypedDict`` items as required or not-required"
msgstr ""
#: whatsnew/3.11.rst:210
msgid ""
":data:`~typing.Required` and :data:`~typing.NotRequired` provide a "
"straightforward way to mark whether individual items in a :data:`~typing."
"TypedDict` must be present. Previously this was only possible using "
"inheritance."
msgstr ""
#: whatsnew/3.11.rst:215
msgid ""
"Fields are still required by default, unless the ``total=False`` parameter "
"is set. For example, the following specifies a dictionary with one required "
"and one not-required key::"
msgstr ""
#: whatsnew/3.11.rst:228
msgid "The following definition is equivalent::"
msgstr ""
#: whatsnew/3.11.rst:234
msgid "See :pep:`655` for more details."
msgstr ""
#: whatsnew/3.11.rst:236
msgid ""
"(Contributed by David Foster and Jelle Zijlstra in :issue:`47087`. PEP "
"written by David Foster.)"
msgstr ""
#: whatsnew/3.11.rst:240
msgid "PEP 673: ``Self`` type"
msgstr ""
#: whatsnew/3.11.rst:242
msgid ""
"The new :data:`~typing.Self` annotation provides a simple and intuitive way "
"to annotate methods that return an instance of their class. This behaves the "
"same as the :data:`~typing.TypeVar`-based approach specified in :pep:`484` "
"but is more concise and easier to follow."
msgstr ""
#: whatsnew/3.11.rst:247
msgid ""
"Common use cases include alternative constructors provided as classmethods "
"and :meth:`~object.__enter__` methods that return ``self``::"
msgstr ""
#: whatsnew/3.11.rst:264
msgid ""
":data:`~typing.Self` can also be used to annotate method parameters or "
"attributes of the same type as their enclosing class."
msgstr ""
#: whatsnew/3.11.rst:267
msgid "See :pep:`673` for more details."
msgstr ""
#: whatsnew/3.11.rst:269
msgid ""
"(Contributed by James Hilton-Balfe in :issue:`46534`. PEP written by Pradeep "
"Kumar Srinivasan and James Hilton-Balfe.)"
msgstr ""
#: whatsnew/3.11.rst:273
msgid "PEP 675: Arbitrary literal string type"
msgstr ""
#: whatsnew/3.11.rst:275
msgid ""
"The new :data:`~typing.LiteralString` annotation may be used to indicate "
"that a function parameter can be of any literal string type. This allows a "
"function to accept arbitrary literal string types, as well as strings "
"created from other literal strings. Type checkers can then enforce that "
"sensitive functions, such as those that execute SQL statements or shell "
"commands, are called only with static arguments, providing protection "
"against injection attacks."
msgstr ""
#: whatsnew/3.11.rst:283
msgid "For example, a SQL query function could be annotated as follows::"
msgstr ""
#: whatsnew/3.11.rst:301
msgid "See :pep:`675` for more details."
msgstr ""
#: whatsnew/3.11.rst:303
msgid ""
"(Contributed by Jelle Zijlstra in :issue:`47088`. PEP written by Pradeep "
"Kumar Srinivasan and Graham Bleaney.)"
msgstr ""
#: whatsnew/3.11.rst:307
msgid "PEP 681: Data Class Transforms"
msgstr ""
#: whatsnew/3.11.rst:309
msgid ""
":data:`~typing.dataclass_transform` may be used to decorate a class, "
"metaclass, or a function that is itself a decorator. The presence of "
"``@dataclass_transform()`` tells a static type checker that the decorated "
"object performs runtime \"magic\" that transforms a class, giving it :func:"
"`dataclasses.dataclass`-like behaviors."
msgstr ""
#: whatsnew/3.11.rst:315
msgid "For example::"
msgstr ""
#: whatsnew/3.11.rst:334
msgid "See :pep:`681` for more details."
msgstr ""
#: whatsnew/3.11.rst:336
msgid ""
"(Contributed by Jelle Zijlstra in :gh:`91860`. PEP written by Erik De Bonte "
"and Eric Traut.)"
msgstr ""
#: whatsnew/3.11.rst:340
2022-03-23 17:40:12 +00:00
msgid "Other Language Changes"
msgstr "Autres changements au langage"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:342
2022-03-23 17:40:12 +00:00
msgid ""
"Starred expressions can be used in :ref:`for statements<for>`. (See :issue:"
"`46725` for more details.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:345
2022-03-23 17:40:12 +00:00
msgid ""
"Asynchronous comprehensions are now allowed inside comprehensions in "
"asynchronous functions. Outer comprehensions implicitly become asynchronous. "
"(Contributed by Serhiy Storchaka in :issue:`33346`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:349
2022-03-23 17:40:12 +00:00
msgid ""
"A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in :"
"meth:`contextlib.ExitStack.enter_context` and :meth:`contextlib."
"AsyncExitStack.enter_async_context` for objects which do not support the :"
"term:`context manager` or :term:`asynchronous context manager` protocols "
"correspondingly. (Contributed by Serhiy Storchaka in :issue:`44471`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:356
2022-03-23 17:40:12 +00:00
msgid ""
"A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in :"
"keyword:`with` and :keyword:`async with` statements for objects which do not "
"support the :term:`context manager` or :term:`asynchronous context manager` "
"protocols correspondingly. (Contributed by Serhiy Storchaka in :issue:"
"`12022`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:362
msgid ""
"Added :meth:`object.__getstate__` which provides the default implementation "
"of the ``__getstate__()`` method. :mod:`Copying <copy>` and :mod:`pickling "
"<pickle>` instances of subclasses of builtin types :class:`bytearray`, :"
"class:`set`, :class:`frozenset`, :class:`collections.OrderedDict`, :class:"
"`collections.deque`, :class:`weakref.WeakSet`, and :class:`datetime.tzinfo` "
"now copies and pickles instance attributes implemented as :term:`slots "
"<__slots__>`. (Contributed by Serhiy Storchaka in :issue:`26579`.)"
msgstr ""
#: whatsnew/3.11.rst:371
msgid ""
"Add :option:`-P` command line option and :envvar:`PYTHONSAFEPATH` "
"environment variable to not prepend a potentially unsafe path to :data:`sys."
"path` such as the current directory, the script's directory or an empty "
"string. (Contributed by Victor Stinner in :gh:`57684`.)"
msgstr ""
#: whatsnew/3.11.rst:378
2022-03-23 17:40:12 +00:00
msgid "Other CPython Implementation Changes"
msgstr "Autres changements à l'implémentation de CPython"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:380
2022-03-23 17:40:12 +00:00
msgid ""
"Special methods :meth:`complex.__complex__` and :meth:`bytes.__bytes__` are "
"implemented to support :class:`typing.SupportsComplex` and :class:`typing."
"SupportsBytes` protocols. (Contributed by Mark Dickinson and Dong-hee Na in :"
"issue:`24234`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:384
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"``siphash13`` is added as a new internal hashing algorithms. It has similar "
"security properties as ``siphash24`` but it is slightly faster for long "
"inputs. ``str``, ``bytes``, and some other types now use it as default "
"algorithm for :func:`hash`. :pep:`552` hash-based pyc files now use "
2022-03-23 17:40:12 +00:00
"``siphash13``, too. (Contributed by Inada Naoki in :issue:`29410`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:390
2022-03-23 17:40:12 +00:00
msgid ""
"When an active exception is re-raised by a :keyword:`raise` statement with "
"no parameters, the traceback attached to this exception is now always ``sys."
"exc_info()[1].__traceback__``. This means that changes made to the traceback "
"in the current :keyword:`except` clause are reflected in the re-raised "
"exception. (Contributed by Irit Katriel in :issue:`45711`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:396
2022-03-23 17:40:12 +00:00
msgid ""
"The interpreter state's representation of handled exceptions (a.k.a "
"exc_info, or _PyErr_StackItem) now has only the ``exc_value`` field, "
"``exc_type`` and ``exc_traceback`` have been removed as their values can be "
"derived from ``exc_value``. (Contributed by Irit Katriel in :issue:`45711`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:401
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"A new command line option for the Windows installer ``AppendPath`` has been "
2022-03-23 17:40:12 +00:00
"added. It behaves similiar to ``PrependPath`` but appends the install and "
2022-05-22 21:15:02 +00:00
"scripts directories instead of prepending them. (Contributed by Bastian "
2022-03-23 17:40:12 +00:00
"Neuburger in :issue:`44934`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1869
msgid ""
"The :c:member:`PyConfig.module_search_paths_set` field must now be set to 1 "
"for initialization to use :c:member:`PyConfig.module_search_paths` to "
"initialize :data:`sys.path`. Otherwise, initialization will recalculate the "
"path and replace any values added to ``module_search_paths``."
msgstr ""
#: whatsnew/3.11.rst:413
2022-03-23 17:40:12 +00:00
msgid "New Modules"
msgstr "Nouveaux modules"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:415
2022-03-23 17:40:12 +00:00
msgid ""
"A new module, :mod:`tomllib`, was added for parsing TOML. (Contributed by "
"Taneli Hukkinen in :issue:`40059`.)"
msgstr ""
"Un nouveau module :mod:`tomllib` a été ajouté pour faire l'analyse du format "
"*TOML* (contribution de *Taneli Hukkinen* dans :issue:`40059`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:418
msgid ""
":mod:`wsgiref.types`, containing WSGI-specific types for static type "
"checking, was added. (Contributed by Sebastian Rittau in :issue:`42012`.)"
msgstr ""
#: whatsnew/3.11.rst:424
2022-03-23 17:40:12 +00:00
msgid "Improved Modules"
msgstr "Modules améliorés"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:427
2022-03-23 17:40:12 +00:00
msgid "asyncio"
msgstr "``asyncio``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:429
2022-03-23 17:40:12 +00:00
msgid ""
"Add raw datagram socket functions to the event loop: :meth:`~asyncio."
"AbstractEventLoop.sock_sendto`, :meth:`~asyncio.AbstractEventLoop."
"sock_recvfrom` and :meth:`~asyncio.AbstractEventLoop.sock_recvfrom_into`. "
"(Contributed by Alex Grönholm in :issue:`46805`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:435
msgid ""
"Add :meth:`~asyncio.streams.StreamWriter.start_tls` method for upgrading "
"existing stream-based connections to TLS. (Contributed by Ian Good in :issue:"
"`34975`.)"
msgstr ""
#: whatsnew/3.11.rst:439
msgid ""
"Add :class:`~asyncio.Barrier` class to the synchronization primitives of the "
"asyncio library. (Contributed by Yves Duprat and Andrew Svetlov in :gh:"
"`87518`.)"
msgstr ""
#: whatsnew/3.11.rst:444
msgid "datetime"
msgstr ""
#: whatsnew/3.11.rst:446
msgid ""
"Add :attr:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone."
"utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)"
msgstr ""
#: whatsnew/3.11.rst:448
msgid ""
":meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` "
"and :meth:`datetime.datetime.fromisoformat` can now be used to parse most "
"ISO 8601 formats (barring only those that support fractional hours and "
"minutes). (Contributed by Paul Ganssle in :gh:`80010`.)"
msgstr ""
#: whatsnew/3.11.rst:454
2022-03-23 17:40:12 +00:00
msgid "fractions"
msgstr "``fractions``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:456
2022-03-23 17:40:12 +00:00
msgid ""
"Support :PEP:`515`-style initialization of :class:`~fractions.Fraction` from "
"string. (Contributed by Sergey B Kirpichev in :issue:`44258`.)"
msgstr ""
"Prise en charge de l'initialisation de :class:`~fractions.Fraction` à partir "
"d'une chaîne suivant le style de la :PEP:`515` (contribution de *Sergey B "
"Kirpichev* dans :issue:`44258`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:459
2022-03-23 17:40:12 +00:00
msgid ""
":class:`~fractions.Fraction` now implements an ``__int__`` method, so that "
"an ``isinstance(some_fraction, typing.SupportsInt)`` check passes. "
"(Contributed by Mark Dickinson in :issue:`44547`.)"
msgstr ""
":class:`~fractions.Fraction` implémente maintenant la méthode ``__int__``, "
"ce qui permet au test ``isinstance(ma_fraction, typing.SupportsInt)`` de "
"passer avec succès (contribution de *Mark Dickinson* dans :issue:`44547`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:464
msgid "functools"
msgstr ""
#: whatsnew/3.11.rst:466
msgid ""
":func:`functools.singledispatch` now supports :data:`types.UnionType` and :"
"data:`typing.Union` as annotations to the dispatch argument.::"
msgstr ""
#: whatsnew/3.11.rst:491
msgid "(Contributed by Yurii Karabas in :issue:`46014`.)"
msgstr ""
#: whatsnew/3.11.rst:494
msgid "hashlib"
msgstr ""
#: whatsnew/3.11.rst:496
msgid ""
":func:`hashlib.blake2b` and :func:`hashlib.blake2s` now prefer `libb2`_ over "
"Python's vendored copy. (Contributed by Christian Heimes in :issue:`47095`.)"
msgstr ""
#: whatsnew/3.11.rst:500
msgid ""
"The internal ``_sha3`` module with SHA3 and SHAKE algorithms now uses "
"*tiny_sha3* instead of the *Keccak Code Package* to reduce code and binary "
"size. The :mod:`hashlib` module prefers optimized SHA3 and SHAKE "
"implementations from OpenSSL. The change affects only installations without "
"OpenSSL support. (Contributed by Christian Heimes in :issue:`47098`.)"
msgstr ""
#: whatsnew/3.11.rst:508
2022-03-23 17:40:12 +00:00
msgid "IDLE and idlelib"
msgstr "``IDLE`` et ``idlelib``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:510
2022-03-23 17:40:12 +00:00
msgid ""
"Apply syntax highlighting to `.pyi` files. (Contributed by Alex Waygood and "
"Terry Jan Reedy in :issue:`45447`.)"
msgstr ""
"Fait la coloration syntaxique des fichiers `.pyi` (contribution d'*Alex "
"Waygood* et de *Terry Jan Reedy* dans :issue:`45447`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:514
2022-03-23 17:40:12 +00:00
msgid "inspect"
msgstr "``inspect``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:515
2022-03-23 17:40:12 +00:00
msgid ""
"Add :func:`inspect.getmembers_static`: return all members without triggering "
"dynamic lookup via the descriptor protocol. (Contributed by Weipeng Hong in :"
"issue:`30533`.)"
msgstr ""
"Ajout de :func:`inspect.getmembers_static` : renvoie tous les membres sans "
"invoquer la recherche dynamique du protocole des descripteurs (contribution "
"de *Weipeng Hong* dans :issue:`30533`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:519
2022-03-23 17:40:12 +00:00
msgid ""
"Add :func:`inspect.ismethodwrapper` for checking if the type of an object is "
"a :class:`~types.MethodWrapperType`. (Contributed by Hakan Çelik in :issue:"
"`29418`.)"
msgstr ""
"Ajout de :func:`inspect.ismethodwrapper` pour vérifier si le type d'un objet "
"est un :class:`~types.MethodWrapperType` (contribution de *Hakan Çelik* "
"dans :issue:`29418`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:522
msgid ""
"Change the frame-related functions in the :mod:`inspect` module to return a "
"regular object (that is backwards compatible with the old tuple-like "
"interface) that include the extended :pep:`657` position information (end "
"line number, column and end column). The affected functions are: :func:"
"`inspect.getframeinfo`, :func:`inspect.getouterframes`, :func:`inspect."
"getinnerframes`, :func:`inspect.stack` and :func:`inspect.trace`. "
"(Contributed by Pablo Galindo in :gh:`88116`)"
msgstr ""
#: whatsnew/3.11.rst:531
msgid "locale"
msgstr ""
#: whatsnew/3.11.rst:533
msgid ""
"Add :func:`locale.getencoding` to get the current locale encoding. It is "
"similar to ``locale.getpreferredencoding(False)`` but ignores the :ref:"
"`Python UTF-8 Mode <utf8-mode>`."
msgstr ""
#: whatsnew/3.11.rst:538
2022-03-23 17:40:12 +00:00
msgid "math"
msgstr "``math``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:540
2022-03-23 17:40:12 +00:00
msgid ""
"Add :func:`math.exp2`: return 2 raised to the power of x. (Contributed by "
"Gideon Mitchell in :issue:`45917`.)"
msgstr ""
"Ajout de :func:`math.exp2` : renvoie 2 élevé à la puissance ``x`` "
"(contribution de *Gideon Mitchell* dans :issue:`45917`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:543
2022-03-23 17:40:12 +00:00
msgid ""
"Add :func:`math.cbrt`: return the cube root of x. (Contributed by Ajith "
"Ramachandran in :issue:`44357`.)"
msgstr ""
"Ajout de :func:`math.cbrt` : renvoie la racine cubique de ``x`` "
"(contribution d'*Ajith Ramachandran* dans :issue:`44357`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:546
2022-03-23 17:40:12 +00:00
msgid ""
"The behaviour of two :func:`math.pow` corner cases was changed, for "
"consistency with the IEEE 754 specification. The operations ``math.pow(0.0, -"
"math.inf)`` and ``math.pow(-0.0, -math.inf)`` now return ``inf``. Previously "
"they raised :exc:`ValueError`. (Contributed by Mark Dickinson in :issue:"
"`44339`.)"
msgstr ""
"Le comportement de :func:`math.pow` dans deux cas particuliers a été changé "
"pour être cohérent avec la spécification *IEEE 754*. Les opérations ``math."
"pow(0.0, -math.inf)`` et ``math.pow(-0.0, -math.inf)`` renvoient maintenant "
"``inf``. Elles levaient précédemment :exc:`ValueError` (contribution de "
"*Mark Dickinson* dans :issue:`44339`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:552
2022-03-23 17:40:12 +00:00
msgid ""
"The :data:`math.nan` value is now always available. (Contributed by Victor "
"Stinner in :issue:`46917`.)"
msgstr ""
"La valeur :data:`math.nan` est maintenant toujours disponible (contribution "
"de *Victor Stinner* dans :issue:`46917`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:557
2022-03-23 17:40:12 +00:00
msgid "operator"
msgstr "``operator``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:559
2022-03-23 17:40:12 +00:00
msgid ""
"A new function ``operator.call`` has been added, such that ``operator."
"call(obj, *args, **kwargs) == obj(*args, **kwargs)``. (Contributed by Antony "
"Lee in :issue:`44019`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:565
2022-03-23 17:40:12 +00:00
msgid "os"
msgstr "``os``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:567
2022-03-23 17:40:12 +00:00
msgid ""
"On Windows, :func:`os.urandom` now uses ``BCryptGenRandom()``, instead of "
"``CryptGenRandom()`` which is deprecated. (Contributed by Dong-hee Na in :"
"issue:`44611`.)"
msgstr ""
"Sur Windows, :func:`os.urandom` utilise maintenant ``BCryptGenRandom()``, "
"plutôt que ``CryptGenRandom()`` qui est obsolète (contribution de *Dong-hee "
"Na* dans :issue:`44611`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:573
msgid "pathlib"
msgstr ""
#: whatsnew/3.11.rst:575
msgid ""
":meth:`~pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` return only "
"directories if *pattern* ends with a pathname components separator: :data:"
"`~os.sep` or :data:`~os.altsep`. (Contributed by Eisuke Kawasima in :issue:"
"`22276` and :issue:`33392`.)"
msgstr ""
#: whatsnew/3.11.rst:581
2022-03-23 17:40:12 +00:00
msgid "re"
msgstr "``re``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:583
2022-03-23 17:40:12 +00:00
msgid ""
"Atomic grouping (``(?>...)``) and possessive quantifiers (``*+``, ``++``, ``?"
"+``, ``{m,n}+``) are now supported in regular expressions. (Contributed by "
"Jeffrey C. Jacobs and Serhiy Storchaka in :issue:`433030`.)"
msgstr ""
"Le groupement atomique (``(?>...)``) et les quantificateurs possessifs (``*"
"+``, ``++``, ``?+``, ``{m,n}+``) sont maintenant pris en charge dans les "
"expressions régulières (contribution de *Jeffrey C. Jacobs* et de *Serhiy "
"Storchaka* dans :issue:`433030`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:588
2022-03-23 17:40:12 +00:00
msgid "shutil"
msgstr "``shutils``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:590
2022-03-23 17:40:12 +00:00
msgid ""
"Add optional parameter *dir_fd* in :func:`shutil.rmtree`. (Contributed by "
"Serhiy Storchaka in :issue:`46245`.)"
msgstr ""
"Ajout du paramètre optionnel *dir_fd* dans :func:`shutil.rmtree` "
"(contribution de *Serhiy Storchaka* dans :issue:`46245`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:595
2022-03-23 17:40:12 +00:00
msgid "socket"
msgstr "``socket``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:597
2022-03-23 17:40:12 +00:00
msgid ""
"Add CAN Socket support for NetBSD. (Contributed by Thomas Klausner in :issue:"
"`30512`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:600
msgid ""
":meth:`~socket.create_connection` has an option to raise, in case of failure "
"to connect, an :exc:`ExceptionGroup` containing all errors instead of only "
"raising the last error. (Contributed by Irit Katriel in :issue:`29980`)."
msgstr ""
#: whatsnew/3.11.rst:606
2022-03-23 17:40:12 +00:00
msgid "sqlite3"
msgstr "``sqlite3``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:608
2022-03-23 17:40:12 +00:00
msgid ""
"You can now disable the authorizer by passing :const:`None` to :meth:"
"`~sqlite3.Connection.set_authorizer`. (Contributed by Erlend E. Aasland in :"
"issue:`44491`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:612
2022-03-23 17:40:12 +00:00
msgid ""
"Collation name :meth:`~sqlite3.Connection.create_collation` can now contain "
"any Unicode character. Collation names with invalid characters now raise :"
"exc:`UnicodeEncodeError` instead of :exc:`sqlite3.ProgrammingError`. "
"(Contributed by Erlend E. Aasland in :issue:`44688`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:617
2022-03-23 17:40:12 +00:00
msgid ""
":mod:`sqlite3` exceptions now include the SQLite extended error code as :"
"attr:`~sqlite3.Error.sqlite_errorcode` and the SQLite error name as :attr:"
"`~sqlite3.Error.sqlite_errorname`. (Contributed by Aviv Palivoda, Daniel "
"Shahaf, and Erlend E. Aasland in :issue:`16379` and :issue:`24139`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:623
2022-03-23 17:40:12 +00:00
msgid ""
"Add :meth:`~sqlite3.Connection.setlimit` and :meth:`~sqlite3.Connection."
"getlimit` to :class:`sqlite3.Connection` for setting and getting SQLite "
"limits by connection basis. (Contributed by Erlend E. Aasland in :issue:"
"`45243`.)"
msgstr ""
"Ajout des méthodes :meth:`~sqlite3.Connection.setlimit` et :meth:`~sqlite3."
"Connection.getlimit` à la classe :class:`sqlite3.Connection` pour affecter "
"et demander les limites de *SQLite* pour une connexion (contribution "
"d'*Erlend E. Aasland* dans :issue:`45243`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:628
2022-03-23 17:40:12 +00:00
msgid ""
":mod:`sqlite3` now sets :attr:`sqlite3.threadsafety` based on the default "
"threading mode the underlying SQLite library has been compiled with. "
"(Contributed by Erlend E. Aasland in :issue:`45613`.)"
msgstr ""
":mod:`sqlite3` affecte maintenant :attr:`sqlite3.threadsafety` selon le mode "
"d'exécution à fils multiples (*threading* en anglais) par défaut qui a été "
"compilé dans la bibliothèque *SQLite* sous-jacente (contribution d'*Erlend "
"E. Aasland* dans :issue:`45613`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:632
2022-03-23 17:40:12 +00:00
msgid ""
":mod:`sqlite3` C callbacks now use unraisable exceptions if callback "
"tracebacks are enabled. Users can now register an :func:`unraisable hook "
"handler <sys.unraisablehook>` to improve their debug experience. "
"(Contributed by Erlend E. Aasland in :issue:`45828`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:638
2022-03-23 17:40:12 +00:00
msgid ""
"Fetch across rollback no longer raises :exc:`~sqlite3.InterfaceError`. "
"Instead we leave it to the SQLite library to handle these cases. "
"(Contributed by Erlend E. Aasland in :issue:`44092`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:642
msgid ""
"Add :meth:`~sqlite3.Connection.serialize` and :meth:`~sqlite3.Connection."
"deserialize` to :class:`sqlite3.Connection` for serializing and "
"deserializing databases. (Contributed by Erlend E. Aasland in :issue:"
"`41930`.)"
msgstr ""
#: whatsnew/3.11.rst:647
msgid ""
"Add :meth:`~sqlite3.Connection.create_window_function` to :class:`sqlite3."
"Connection` for creating aggregate window functions. (Contributed by Erlend "
"E. Aasland in :issue:`34916`.)"
msgstr ""
#: whatsnew/3.11.rst:651
msgid ""
"Add :meth:`~sqlite3.Connection.blobopen` to :class:`sqlite3.Connection`. :"
"class:`sqlite3.Blob` allows incremental I/O operations on blobs. "
"(Contributed by Aviv Palivoda and Erlend E. Aasland in :issue:`24905`)"
msgstr ""
#: whatsnew/3.11.rst:657
2022-03-23 17:40:12 +00:00
msgid "sys"
msgstr "``sys``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:659
2022-03-23 17:40:12 +00:00
msgid ""
":func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields from "
"the ``value`` (the exception instance), so when an exception is modified "
"while it is being handled, the changes are reflected in the results of "
"subsequent calls to :func:`exc_info`. (Contributed by Irit Katriel in :issue:"
"`45711`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:665
2022-03-23 17:40:12 +00:00
msgid ""
"Add :func:`sys.exception` which returns the active exception instance "
"(equivalent to ``sys.exc_info()[1]``). (Contributed by Irit Katriel in :"
"issue:`46328`.)"
msgstr ""
"Ajout de :func:`sys.exception` qui renvoie l'instance de l'exception active "
"(équivalent à ``sys.exc_info()[1]``) (contribution d'*Irit Katriel* dans :"
"issue:`46328`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:669
msgid ""
"Add the :data:`sys.flags.safe_path <sys.flags>` flag. (Contributed by Victor "
"Stinner in :gh:`57684`.)"
msgstr ""
#: whatsnew/3.11.rst:674
2022-03-23 17:40:12 +00:00
msgid "sysconfig"
msgstr "``sysconfig``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:676
2022-03-23 17:40:12 +00:00
msgid ""
"Two new :ref:`installation schemes <installation_paths>` (*posix_venv*, "
"*nt_venv* and *venv*) were added and are used when Python creates new "
"virtual environments or when it is running from a virtual environment. The "
"first two schemes (*posix_venv* and *nt_venv*) are OS-specific for non-"
"Windows and Windows, the *venv* is essentially an alias to one of them "
"according to the OS Python runs on. This is useful for downstream "
"distributors who modify :func:`sysconfig.get_preferred_scheme`. Third party "
"code that creates new virtual environments should use the new *venv* "
"installation scheme to determine the paths, as does :mod:`venv`. "
"(Contributed by Miro Hrončok in :issue:`45413`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:691
2022-03-23 17:40:12 +00:00
msgid "threading"
msgstr "``threading``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:693
2022-03-23 17:40:12 +00:00
msgid ""
"On Unix, if the ``sem_clockwait()`` function is available in the C library "
"(glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method now uses "
"the monotonic clock (:data:`time.CLOCK_MONOTONIC`) for the timeout, rather "
"than using the system clock (:data:`time.CLOCK_REALTIME`), to not be "
"affected by system clock changes. (Contributed by Victor Stinner in :issue:"
"`41710`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:702
2022-03-23 17:40:12 +00:00
msgid "time"
msgstr "``time``"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:704
2022-03-23 17:40:12 +00:00
msgid ""
"On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` or "
"``nanosleep()`` function, if available, which has a resolution of 1 "
"nanosecond (10\\ :sup:`-9` seconds), rather than using ``select()`` which "
"has a resolution of 1 microsecond (10\\ :sup:`-6` seconds). (Contributed by "
"Benjamin Szőke and Victor Stinner in :issue:`21302`.)"
msgstr ""
"Sur Unix, :func:`time.sleep` utilise maintenant une des fonctions "
"``clock_nanosleep()`` ou ``nanosleep()``, quand elles sont disponibles, qui "
"ont une résolution de 1 nanoseconde (10\\ :sup:`-9` secondes), plutôt que "
"d'utiliser ``select()`` qui a une résolution de 1 microseconde (10\\ :sup:"
"`-6` secondes) (contribution de *Benjamin Szőke* et de *Victor Stinner* "
"dans :issue:`21302`)."
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:710
2022-03-23 17:40:12 +00:00
msgid ""
"On Windows 8.1 and newer, :func:`time.sleep` now uses a waitable timer based "
"on `high-resolution timers <https://docs.microsoft.com/en-us/windows-"
"hardware/drivers/kernel/high-resolution-timers>`_ which has a resolution of "
"100 nanoseconds (10\\ :sup:`-7` seconds). Previously, it had a resolution of "
"1 millisecond (10\\ :sup:`-3` seconds). (Contributed by Benjamin Szőke, Dong-"
"hee Na, Eryk Sun and Victor Stinner in :issue:`21302` and :issue:`45429`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:718
msgid "typing"
msgstr ""
#: whatsnew/3.11.rst:720
msgid "For major changes, see :ref:`new-feat-related-type-hints-311`."
msgstr ""
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:722
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"Add :func:`typing.assert_never` and :class:`typing.Never`. :func:`typing."
"assert_never` is useful for asking a type checker to confirm that a line of "
"code is not reachable. At runtime, it raises an :exc:`AssertionError`. "
"(Contributed by Jelle Zijlstra in :gh:`90633`.)"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:728
msgid ""
"Add :func:`typing.reveal_type`. This is useful for asking a type checker "
"what type it has inferred for a given expression. At runtime it prints the "
"type of the received value. (Contributed by Jelle Zijlstra in :gh:`90572`.)"
msgstr ""
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:733
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"Add :func:`typing.assert_type`. This is useful for asking a type checker to "
"confirm that the type it has inferred for a given expression matches the "
"given type. At runtime it simply returns the received value. (Contributed by "
"Jelle Zijlstra in :gh:`90638`.)"
msgstr ""
#: whatsnew/3.11.rst:738
msgid ""
":data:`typing.TypedDict` types can now be generic. (Contributed by Samodya "
"Abey in :gh:`89026`.)"
msgstr ""
#: whatsnew/3.11.rst:741
msgid ""
":class:`~typing.NamedTuple` types can now be generic. (Contributed by Serhiy "
"Storchaka in :issue:`43923`.)"
msgstr ""
#: whatsnew/3.11.rst:744
msgid ""
"Allow subclassing of :class:`typing.Any`. This is useful for avoiding type "
"checker errors related to highly dynamic class, such as mocks. (Contributed "
"by Shantanu Jain in :gh:`91154`.)"
msgstr ""
#: whatsnew/3.11.rst:748
msgid ""
"The :func:`typing.final` decorator now sets the ``__final__`` attributed on "
"the decorated object. (Contributed by Jelle Zijlstra in :gh:`90500`.)"
msgstr ""
#: whatsnew/3.11.rst:752
msgid ""
"The :func:`typing.get_overloads` function can be used for introspecting the "
"overloads of a function. :func:`typing.clear_overloads` can be used to clear "
"all registered overloads of a function. (Contributed by Jelle Zijlstra in :"
"gh:`89263`.)"
msgstr ""
#: whatsnew/3.11.rst:757
msgid ""
"The :meth:`__init__` method of :class:`~typing.Protocol` subclasses is now "
"preserved. (Contributed by Adrian Garcia Badarasco in :gh:`88970`.)"
msgstr ""
#: whatsnew/3.11.rst:760
msgid ""
"The representation of empty tuple types (``Tuple[()]``) is simplified. This "
"affects introspection, e.g. ``get_args(Tuple[()])`` now evaluates to ``()`` "
"instead of ``((),)``. (Contributed by Serhiy Storchaka in :gh:`91137`.)"
msgstr ""
#: whatsnew/3.11.rst:765
msgid ""
"Loosen runtime requirements for type annotations by removing the callable "
"check in the private ``typing._type_check`` function. (Contributed by "
"Gregory Beauregard in :gh:`90802`.)"
msgstr ""
#: whatsnew/3.11.rst:769
msgid ""
":func:`typing.get_type_hints` now supports evaluating strings as forward "
"references in :ref:`PEP 585 generic aliases <types-genericalias>`. "
"(Contributed by Niklas Rosenstein in :gh:`85542`.)"
msgstr ""
#: whatsnew/3.11.rst:773
msgid ""
":func:`typing.get_type_hints` no longer adds :data:`~typing.Optional` to "
"parameters with ``None`` as a default. (Contributed by Nikita Sobolev in :gh:"
"`90353`.)"
msgstr ""
#: whatsnew/3.11.rst:777
msgid ""
":func:`typing.get_type_hints` now supports evaluating bare stringified :data:"
"`~typing.ClassVar` annotations. (Contributed by Gregory Beauregard in :gh:"
"`90711`.)"
msgstr ""
#: whatsnew/3.11.rst:781
msgid ""
":func:`typing.no_type_check` no longer modifies external classes and "
"functions. It also now correctly marks classmethods as not to be type "
"checked. (Contributed by Nikita Sobolev in :gh:`90729`.)"
msgstr ""
#: whatsnew/3.11.rst:787
msgid "tkinter"
msgstr ""
#: whatsnew/3.11.rst:789
msgid ""
"Added method ``info_patchlevel()`` which returns the exact version of the "
"Tcl library as a named tuple similar to :data:`sys.version_info`. "
"(Contributed by Serhiy Storchaka in :gh:`91827`.)"
msgstr ""
#: whatsnew/3.11.rst:795
msgid "unicodedata"
msgstr "``unicodedata``"
#: whatsnew/3.11.rst:797
msgid ""
"The Unicode database has been updated to version 14.0.0. (:issue:`45190`)."
msgstr ""
"La base de donnée Unicode a été mise à jour à la version 14.0.0 (:issue:"
"`45190`)."
#: whatsnew/3.11.rst:801
msgid "unittest"
msgstr ""
#: whatsnew/3.11.rst:803
msgid ""
"Added methods :meth:`~unittest.TestCase.enterContext` and :meth:`~unittest."
"TestCase.enterClassContext` of class :class:`~unittest.TestCase`, method :"
"meth:`~unittest.IsolatedAsyncioTestCase.enterAsyncContext` of class :class:"
"`~unittest.IsolatedAsyncioTestCase` and function :func:`unittest."
"enterModuleContext`. (Contributed by Serhiy Storchaka in :issue:`45046`.)"
msgstr ""
#: whatsnew/3.11.rst:813
msgid "venv"
msgstr "``venv``"
#: whatsnew/3.11.rst:815
msgid ""
"When new Python virtual environments are created, the *venv* :ref:`sysconfig "
"installation scheme <installation_paths>` is used to determine the paths "
"inside the environment. When Python runs in a virtual environment, the same "
"installation scheme is the default. That means that downstream distributors "
"can change the default sysconfig install scheme without changing behavior of "
"virtual environments. Third party code that also creates new virtual "
"environments should do the same. (Contributed by Miro Hrončok in :issue:"
"`45413`.)"
msgstr ""
#: whatsnew/3.11.rst:826
msgid "warnings"
msgstr ""
#: whatsnew/3.11.rst:828
msgid ""
":func:`warnings.catch_warnings` now accepts arguments for :func:`warnings."
"simplefilter`, providing a more concise way to locally ignore warnings or "
"convert them to errors. (Contributed by Zac Hatfield-Dodds in :issue:"
"`47074`.)"
msgstr ""
#: whatsnew/3.11.rst:833
msgid "zipfile"
msgstr "``zipfile``"
#: whatsnew/3.11.rst:835
msgid ""
"Added support for specifying member name encoding for reading metadata in "
"the zipfile's directory and file headers. (Contributed by Stephen J. "
"Turnbull and Serhiy Storchaka in :issue:`28080`.)"
msgstr ""
#: whatsnew/3.11.rst:840
msgid "fcntl"
msgstr "``fcntl``"
#: whatsnew/3.11.rst:842
msgid ""
"On FreeBSD, the :attr:`F_DUP2FD` and :attr:`F_DUP2FD_CLOEXEC` flags "
"respectively are supported, the former equals to ``dup2`` usage while the "
"latter set the ``FD_CLOEXEC`` flag in addition."
msgstr ""
#: whatsnew/3.11.rst:848
msgid "Optimizations"
msgstr "Optimisations"
#: whatsnew/3.11.rst:850
msgid ""
"Compiler now optimizes simple C-style formatting with literal format "
"containing only format codes ``%s``, ``%r`` and ``%a`` and makes it as fast "
"as corresponding f-string expression. (Contributed by Serhiy Storchaka in :"
"issue:`28307`.)"
msgstr ""
#: whatsnew/3.11.rst:855
msgid ""
"\"Zero-cost\" exceptions are implemented. The cost of ``try`` statements is "
"almost eliminated when no exception is raised. (Contributed by Mark Shannon "
"in :issue:`40222`.)"
msgstr ""
"Les exceptions « gratuites » sont maintenant implémentées. Le coût des "
"instructions ``try`` est pratiquement éliminé quand aucune exception n'est "
"levée (contribution de *Mark Shannon* dans :issue:`40222`)."
#: whatsnew/3.11.rst:859
msgid ""
"Pure ASCII strings are now normalized in constant time by :func:`unicodedata."
"normalize`. (Contributed by Dong-hee Na in :issue:`44987`.)"
msgstr ""
#: whatsnew/3.11.rst:862
msgid ""
":mod:`math` functions :func:`~math.comb` and :func:`~math.perm` are now up "
"to 10 times or more faster for large arguments (the speed up is larger for "
"larger *k*). (Contributed by Serhiy Storchaka in :issue:`37295`.)"
msgstr ""
#: whatsnew/3.11.rst:867
msgid ""
"Dict don't store hash value when all inserted keys are Unicode objects. This "
"reduces dict size. For example, ``sys.getsizeof(dict.fromkeys(\"abcdefg"
"\"))`` becomes 272 bytes from 352 bytes on 64bit platform. (Contributed by "
"Inada Naoki in :issue:`46845`.)"
msgstr ""
#: whatsnew/3.11.rst:872
msgid ""
":mod:`re`'s regular expression matching engine has been partially "
"refactored, and now uses computed gotos (or \"threaded code\") on supported "
"platforms. As a result, Python 3.11 executes the `pyperformance regular "
"expression benchmarks <https://pyperformance.readthedocs.io/benchmarks."
"html#regex-dna>`_ up to 10% faster than Python 3.10."
msgstr ""
#: whatsnew/3.11.rst:880
msgid "Faster CPython"
msgstr ""
#: whatsnew/3.11.rst:882
msgid ""
"CPython 3.11 is on average `25% faster <https://github.com/faster-cpython/"
"ideas/blob/main/main-vs-310.rst>`_ than CPython 3.10 when measured with the "
"`pyperformance <https://github.com/python/pyperformance>`_ benchmark suite, "
"and compiled with GCC on Ubuntu Linux. Depending on your workload, the "
"speedup could be up to 10-60% faster."
msgstr ""
#: whatsnew/3.11.rst:888
msgid ""
"This project focuses on two major areas in Python: faster startup and faster "
"runtime. Other optimizations not under this project are listed in "
"`Optimizations`_."
msgstr ""
#: whatsnew/3.11.rst:892
msgid "Faster Startup"
msgstr ""
#: whatsnew/3.11.rst:895
msgid "Frozen imports / Static code objects"
msgstr ""
#: whatsnew/3.11.rst:897
msgid ""
"Python caches bytecode in the :ref:`__pycache__<tut-pycache>` directory to "
"speed up module loading."
msgstr ""
#: whatsnew/3.11.rst:900
msgid "Previously in 3.10, Python module execution looked like this:"
msgstr ""
#: whatsnew/3.11.rst:906
msgid ""
"In Python 3.11, the core modules essential for Python startup are "
"\"frozen\". This means that their code objects (and bytecode) are statically "
"allocated by the interpreter. This reduces the steps in module execution "
"process to this:"
msgstr ""
#: whatsnew/3.11.rst:914
msgid ""
"Interpreter startup is now 10-15% faster in Python 3.11. This has a big "
"impact for short-running programs using Python."
msgstr ""
#: whatsnew/3.11.rst:917
msgid ""
"(Contributed by Eric Snow, Guido van Rossum and Kumar Aditya in numerous "
"issues.)"
msgstr ""
#: whatsnew/3.11.rst:921
msgid "Faster Runtime"
msgstr ""
#: whatsnew/3.11.rst:924
msgid "Cheaper, lazy Python frames"
msgstr ""
#: whatsnew/3.11.rst:925
msgid ""
"Python frames are created whenever Python calls a Python function. This "
"frame holds execution information. The following are new frame optimizations:"
msgstr ""
#: whatsnew/3.11.rst:928
msgid "Streamlined the frame creation process."
msgstr ""
#: whatsnew/3.11.rst:929
msgid ""
"Avoided memory allocation by generously re-using frame space on the C stack."
msgstr ""
#: whatsnew/3.11.rst:930
msgid ""
"Streamlined the internal frame struct to contain only essential information. "
"Frames previously held extra debugging and memory management information."
msgstr ""
#: whatsnew/3.11.rst:933
msgid ""
"Old-style frame objects are now created only when requested by debuggers or "
"by Python introspection functions such as ``sys._getframe`` or ``inspect."
"currentframe``. For most user code, no frame objects are created at all. As "
"a result, nearly all Python functions calls have sped up significantly. We "
"measured a 3-7% speedup in pyperformance."
msgstr ""
#: whatsnew/3.11.rst:939
msgid "(Contributed by Mark Shannon in :issue:`44590`.)"
msgstr ""
#: whatsnew/3.11.rst:944
msgid "Inlined Python function calls"
msgstr ""
#: whatsnew/3.11.rst:945
msgid ""
"During a Python function call, Python will call an evaluating C function to "
"interpret that function's code. This effectively limits pure Python "
"recursion to what's safe for the C stack."
msgstr ""
#: whatsnew/3.11.rst:949
msgid ""
"In 3.11, when CPython detects Python code calling another Python function, "
"it sets up a new frame, and \"jumps\" to the new code inside the new frame. "
"This avoids calling the C interpreting function altogether."
msgstr ""
#: whatsnew/3.11.rst:953
msgid ""
"Most Python function calls now consume no C stack space. This speeds up most "
"of such calls. In simple recursive functions like fibonacci or factorial, a "
"1.7x speedup was observed. This also means recursive functions can recurse "
"significantly deeper (if the user increases the recursion limit). We "
"measured a 1-3% improvement in pyperformance."
msgstr ""
#: whatsnew/3.11.rst:959
msgid "(Contributed by Pablo Galindo and Mark Shannon in :issue:`45256`.)"
msgstr ""
#: whatsnew/3.11.rst:962
msgid "PEP 659: Specializing Adaptive Interpreter"
msgstr ""
#: whatsnew/3.11.rst:963
msgid ""
":pep:`659` is one of the key parts of the faster CPython project. The "
"general idea is that while Python is a dynamic language, most code has "
"regions where objects and types rarely change. This concept is known as "
"*type stability*."
msgstr ""
#: whatsnew/3.11.rst:967
msgid ""
"At runtime, Python will try to look for common patterns and type stability "
"in the executing code. Python will then replace the current operation with a "
"more specialized one. This specialized operation uses fast paths available "
"only to those use cases/types, which generally outperform their generic "
"counterparts. This also brings in another concept called *inline caching*, "
"where Python caches the results of expensive operations directly in the "
"bytecode."
msgstr ""
#: whatsnew/3.11.rst:974
msgid ""
"The specializer will also combine certain common instruction pairs into one "
"superinstruction. This reduces the overhead during execution."
msgstr ""
#: whatsnew/3.11.rst:977
msgid ""
"Python will only specialize when it sees code that is \"hot\" (executed "
"multiple times). This prevents Python from wasting time for run-once code. "
"Python can also de-specialize when code is too dynamic or when the use "
"changes. Specialization is attempted periodically, and specialization "
"attempts are not too expensive. This allows specialization to adapt to new "
"circumstances."
msgstr ""
#: whatsnew/3.11.rst:984
msgid ""
"(PEP written by Mark Shannon, with ideas inspired by Stefan Brunthaler. See :"
"pep:`659` for more information. Implementation by Mark Shannon and Brandt "
"Bucher, with additional help from Irit Katriel and Dennis Sweeney.)"
msgstr ""
#: whatsnew/3.11.rst:992
msgid "Operation"
msgstr ""
#: whatsnew/3.11.rst:992
msgid "Form"
msgstr ""
#: whatsnew/3.11.rst:992
msgid "Specialization"
msgstr ""
#: whatsnew/3.11.rst:992
msgid "Operation speedup (up to)"
msgstr ""
#: whatsnew/3.11.rst:992
msgid "Contributor(s)"
msgstr ""
#: whatsnew/3.11.rst:995
msgid "Binary operations"
msgstr ""
#: whatsnew/3.11.rst:995
msgid "``x+x; x*x; x-x;``"
msgstr ""
#: whatsnew/3.11.rst:995
msgid ""
"Binary add, multiply and subtract for common types such as ``int``, "
"``float``, and ``str`` take custom fast paths for their underlying types."
msgstr ""
#: whatsnew/3.11.rst:995
msgid "10%"
msgstr ""
#: whatsnew/3.11.rst:995
msgid "Mark Shannon, Dong-hee Na, Brandt Bucher, Dennis Sweeney"
msgstr ""
#: whatsnew/3.11.rst:1000
msgid "Subscript"
msgstr ""
#: whatsnew/3.11.rst:1000
msgid "``a[i]``"
msgstr ""
#: whatsnew/3.11.rst:1000
msgid ""
"Subscripting container types such as ``list``, ``tuple`` and ``dict`` "
"directly index the underlying data structures."
msgstr ""
#: whatsnew/3.11.rst:1004
msgid ""
"Subscripting custom ``__getitem__`` is also inlined similar to :ref:`inline-"
"calls`."
msgstr ""
#: whatsnew/3.11.rst:1007
msgid "10-25%"
msgstr ""
#: whatsnew/3.11.rst:1000
msgid "Irit Katriel, Mark Shannon"
msgstr ""
#: whatsnew/3.11.rst:1007
msgid "Store subscript"
msgstr ""
#: whatsnew/3.11.rst:1007
msgid "``a[i] = z``"
msgstr ""
#: whatsnew/3.11.rst:1007
msgid "Similar to subscripting specialization above."
msgstr ""
#: whatsnew/3.11.rst:1007
msgid "Dennis Sweeney"
msgstr ""
#: whatsnew/3.11.rst:1010
msgid "Calls"
msgstr ""
#: whatsnew/3.11.rst:1010
msgid "``f(arg)`` ``C(arg)``"
msgstr ""
#: whatsnew/3.11.rst:1010
msgid ""
"Calls to common builtin (C) functions and types such as ``len`` and ``str`` "
"directly call their underlying C version. This avoids going through the "
"internal calling convention."
msgstr ""
#: whatsnew/3.11.rst:1010
msgid "20%"
msgstr ""
#: whatsnew/3.11.rst:1010
msgid "Mark Shannon, Ken Jin"
msgstr ""
#: whatsnew/3.11.rst:1016
msgid "Load global variable"
msgstr ""
#: whatsnew/3.11.rst:1016
msgid "``print`` ``len``"
msgstr ""
#: whatsnew/3.11.rst:1016
msgid ""
"The object's index in the globals/builtins namespace is cached. Loading "
"globals and builtins require zero namespace lookups."
msgstr ""
#: whatsnew/3.11.rst:1016
msgid "[1]_"
msgstr ""
#: whatsnew/3.11.rst:1020 whatsnew/3.11.rst:1029
msgid "Mark Shannon"
msgstr ""
#: whatsnew/3.11.rst:1020
msgid "Load attribute"
msgstr ""
#: whatsnew/3.11.rst:1020
msgid "``o.attr``"
msgstr ""
#: whatsnew/3.11.rst:1020
msgid ""
"Similar to loading global variables. The attribute's index inside the class/"
"object's namespace is cached. In most cases, attribute loading will require "
"zero namespace lookups."
msgstr ""
#: whatsnew/3.11.rst:1020
msgid "[2]_"
msgstr ""
#: whatsnew/3.11.rst:1025
msgid "Load methods for call"
msgstr ""
#: whatsnew/3.11.rst:1025
msgid "``o.meth()``"
msgstr ""
#: whatsnew/3.11.rst:1025
msgid ""
"The actual address of the method is cached. Method loading now has no "
"namespace lookups -- even for classes with long inheritance chains."
msgstr ""
#: whatsnew/3.11.rst:1025
msgid "10-20%"
msgstr ""
#: whatsnew/3.11.rst:1025
msgid "Ken Jin, Mark Shannon"
msgstr ""
#: whatsnew/3.11.rst:1029
msgid "Store attribute"
msgstr ""
#: whatsnew/3.11.rst:1029
msgid "``o.attr = z``"
msgstr ""
#: whatsnew/3.11.rst:1029
msgid "Similar to load attribute optimization."
msgstr ""
#: whatsnew/3.11.rst:1029
msgid "2% in pyperformance"
msgstr ""
#: whatsnew/3.11.rst:1032
msgid "Unpack Sequence"
msgstr ""
#: whatsnew/3.11.rst:1032
msgid "``*seq``"
msgstr ""
#: whatsnew/3.11.rst:1032
msgid ""
"Specialized for common containers such as ``list`` and ``tuple``. Avoids "
"internal calling convention."
msgstr ""
#: whatsnew/3.11.rst:1032
msgid "8%"
msgstr ""
#: whatsnew/3.11.rst:1032
msgid "Brandt Bucher"
msgstr ""
#: whatsnew/3.11.rst:1036
msgid ""
"A similar optimization already existed since Python 3.8. 3.11 specializes "
"for more forms and reduces some overhead."
msgstr ""
#: whatsnew/3.11.rst:1039
msgid ""
"A similar optimization already existed since Python 3.10. 3.11 specializes "
"for more forms. Furthermore, all attribute loads should be sped up by :issue:"
"`45947`."
msgstr ""
#: whatsnew/3.11.rst:1045
msgid "Misc"
msgstr ""
#: whatsnew/3.11.rst:1047
msgid ""
"Objects now require less memory due to lazily created object namespaces. "
"Their namespace dictionaries now also share keys more freely. (Contributed "
"Mark Shannon in :issue:`45340` and :issue:`40116`.)"
msgstr ""
#: whatsnew/3.11.rst:1051
msgid ""
"A more concise representation of exceptions in the interpreter reduced the "
"time required for catching an exception by about 10%. (Contributed by Irit "
"Katriel in :issue:`45711`.)"
msgstr ""
#: whatsnew/3.11.rst:1056
msgid "FAQ"
msgstr ""
#: whatsnew/3.11.rst:1058
msgid "Q: How should I write my code to utilize these speedups?"
msgstr ""
#: whatsnew/3.11.rst:1062
msgid ""
"A: You don't have to change your code. Write Pythonic code that follows "
"common best practices. The Faster CPython project optimizes for common code "
"patterns we observe."
msgstr ""
#: whatsnew/3.11.rst:1065
msgid "Q: Will CPython 3.11 use more memory?"
msgstr ""
#: whatsnew/3.11.rst:1069
msgid ""
"A: Maybe not. We don't expect memory use to exceed 20% more than 3.10. This "
"is offset by memory optimizations for frame objects and object dictionaries "
"as mentioned above."
msgstr ""
#: whatsnew/3.11.rst:1072
msgid "Q: I don't see any speedups in my workload. Why?"
msgstr ""
#: whatsnew/3.11.rst:1077
msgid ""
"A: Certain code won't have noticeable benefits. If your code spends most of "
"its time on I/O operations, or already does most of its computation in a C "
"extension library like numpy, there won't be significant speedup. This "
"project currently benefits pure-Python workloads the most."
msgstr ""
#: whatsnew/3.11.rst:1081
msgid ""
"Furthermore, the pyperformance figures are a geometric mean. Even within the "
"pyperformance benchmarks, certain benchmarks have slowed down slightly, "
"while others have sped up by nearly 2x!"
msgstr ""
#: whatsnew/3.11.rst:1084
msgid "Q: Is there a JIT compiler?"
msgstr ""
#: whatsnew/3.11.rst:1086
msgid "A: No. We're still exploring other optimizations."
msgstr ""
#: whatsnew/3.11.rst:1090
msgid "About"
msgstr ""
#: whatsnew/3.11.rst:1092
msgid ""
"Faster CPython explores optimizations for :term:`CPython`. The main team is "
"funded by Microsoft to work on this full-time. Pablo Galindo Salgado is also "
"funded by Bloomberg LP to work on the project part-time. Finally, many "
"contributors are volunteers from the community."
msgstr ""
#: whatsnew/3.11.rst:1099
msgid "CPython bytecode changes"
msgstr ""
#: whatsnew/3.11.rst:1101
msgid ""
"Replaced all numeric ``BINARY_*`` and ``INPLACE_*`` instructions with a "
"single :opcode:`BINARY_OP` implementation."
msgstr ""
#: whatsnew/3.11.rst:1104
msgid ""
"Replaced the three call instructions: :opcode:`CALL_FUNCTION`, :opcode:"
"`CALL_FUNCTION_KW` and :opcode:`CALL_METHOD` with :opcode:`PUSH_NULL`, :"
"opcode:`PRECALL`, :opcode:`CALL`, and :opcode:`KW_NAMES`. This decouples the "
"argument shifting for methods from the handling of keyword arguments and "
"allows better specialization of calls."
msgstr ""
#: whatsnew/3.11.rst:1111
msgid "Removed ``COPY_DICT_WITHOUT_KEYS`` and ``GEN_START``."
msgstr ""
#: whatsnew/3.11.rst:1113
msgid ""
":opcode:`MATCH_CLASS` and :opcode:`MATCH_KEYS` no longer push an additional "
"boolean value indicating whether the match succeeded or failed. Instead, "
"they indicate failure with :const:`None` (where a tuple of extracted values "
"would otherwise be)."
msgstr ""
#: whatsnew/3.11.rst:1118
msgid ""
"Replace several stack manipulation instructions (``DUP_TOP``, "
"``DUP_TOP_TWO``, ``ROT_TWO``, ``ROT_THREE``, ``ROT_FOUR``, and ``ROT_N``) "
"with new :opcode:`COPY` and :opcode:`SWAP` instructions."
msgstr ""
#: whatsnew/3.11.rst:1122
msgid ""
"Replaced :opcode:`JUMP_IF_NOT_EXC_MATCH` by :opcode:`CHECK_EXC_MATCH` which "
"performs the check but does not jump."
msgstr ""
#: whatsnew/3.11.rst:1125
msgid ""
"Replaced :opcode:`JUMP_IF_NOT_EG_MATCH` by :opcode:`CHECK_EG_MATCH` which "
"performs the check but does not jump."
msgstr ""
#: whatsnew/3.11.rst:1128
msgid ""
"Replaced :opcode:`JUMP_ABSOLUTE` by the relative :opcode:`JUMP_BACKWARD`."
msgstr ""
#: whatsnew/3.11.rst:1130
msgid ""
"Added :opcode:`JUMP_BACKWARD_NO_INTERRUPT`, which is used in certain loops "
"where it is undesirable to handle interrupts."
msgstr ""
#: whatsnew/3.11.rst:1133
msgid ""
"Replaced :opcode:`POP_JUMP_IF_TRUE` and :opcode:`POP_JUMP_IF_FALSE` by the "
"relative :opcode:`POP_JUMP_FORWARD_IF_TRUE`, :opcode:"
"`POP_JUMP_BACKWARD_IF_TRUE`, :opcode:`POP_JUMP_FORWARD_IF_FALSE` and :opcode:"
"`POP_JUMP_BACKWARD_IF_FALSE`."
msgstr ""
#: whatsnew/3.11.rst:1137
msgid ""
"Added :opcode:`POP_JUMP_FORWARD_IF_NOT_NONE`, :opcode:"
"`POP_JUMP_BACKWARD_IF_NOT_NONE`, :opcode:`POP_JUMP_FORWARD_IF_NONE` and :"
"opcode:`POP_JUMP_BACKWARD_IF_NONE` opcodes to speed up conditional jumps."
msgstr ""
#: whatsnew/3.11.rst:1141
msgid ""
":opcode:`JUMP_IF_TRUE_OR_POP` and :opcode:`JUMP_IF_FALSE_OR_POP` are now "
"relative rather than absolute."
msgstr ""
#: whatsnew/3.11.rst:1881
msgid "Deprecated"
msgstr "Obsolescence"
#: whatsnew/3.11.rst:1148
msgid ""
"Chaining :class:`classmethod` descriptors (introduced in :issue:`19072`) is "
"now deprecated. It can no longer be used to wrap other descriptors such as :"
"class:`property`. The core design of this feature was flawed and caused a "
"number of downstream problems. To \"pass-through\" a :class:`classmethod`, "
"consider using the ``__wrapped__`` attribute that was added in Python 3.10. "
"(Contributed by Raymond Hettinger in :gh:`89519`.)"
msgstr ""
#: whatsnew/3.11.rst:1156
msgid ""
"Octal escapes in string and bytes literals with value larger than ``0o377`` "
"now produce :exc:`DeprecationWarning`. In a future Python version they will "
"be a :exc:`SyntaxWarning` and eventually a :exc:`SyntaxError`. (Contributed "
"by Serhiy Storchaka in :gh:`81548`.)"
msgstr ""
#: whatsnew/3.11.rst:1162
msgid ""
"The :mod:`lib2to3` package and ``2to3`` tool are now deprecated and may not "
"be able to parse Python 3.10 or newer. See the :pep:`617` (New PEG parser "
"for CPython). (Contributed by Victor Stinner in :issue:`40360`.)"
msgstr ""
#: whatsnew/3.11.rst:1166
msgid ""
"Undocumented modules ``sre_compile``, ``sre_constants`` and ``sre_parse`` "
"are now deprecated. (Contributed by Serhiy Storchaka in :issue:`47152`.)"
msgstr ""
#: whatsnew/3.11.rst:1170
msgid ""
":class:`webbrowser.MacOSX` is deprecated and will be removed in Python 3.13. "
"It is untested and undocumented and also not used by webbrowser itself. "
"(Contributed by Dong-hee Na in :issue:`42255`.)"
msgstr ""
#: whatsnew/3.11.rst:1174
msgid ""
"The behavior of returning a value from a :class:`~unittest.TestCase` and :"
"class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the "
"default ``None`` value), is now deprecated."
msgstr ""
#: whatsnew/3.11.rst:1178
msgid ""
"Deprecated the following :mod:`unittest` functions, scheduled for removal in "
"Python 3.13:"
msgstr ""
#: whatsnew/3.11.rst:1181
msgid ":func:`unittest.findTestCases`"
msgstr ""
#: whatsnew/3.11.rst:1182
msgid ":func:`unittest.makeSuite`"
msgstr ""
#: whatsnew/3.11.rst:1183
msgid ":func:`unittest.getTestCaseNames`"
msgstr ""
#: whatsnew/3.11.rst:1185
msgid "Use :class:`~unittest.TestLoader` method instead:"
msgstr ""
#: whatsnew/3.11.rst:1187
msgid ":meth:`unittest.TestLoader.loadTestsFromModule`"
msgstr ""
#: whatsnew/3.11.rst:1188
msgid ":meth:`unittest.TestLoader.loadTestsFromTestCase`"
msgstr ""
#: whatsnew/3.11.rst:1189
msgid ":meth:`unittest.TestLoader.getTestCaseNames`"
msgstr ""
#: whatsnew/3.11.rst:1191
msgid "(Contributed by Erlend E. Aasland in :issue:`5846`.)"
msgstr ""
#: whatsnew/3.11.rst:1193
msgid ""
"The :meth:`turtle.RawTurtle.settiltangle` is deprecated since Python 3.1, it "
"now emits a deprecation warning and will be removed in Python 3.13. Use :"
"meth:`turtle.RawTurtle.tiltangle` instead (it was earlier incorrectly marked "
"as deprecated, its docstring is now corrected). (Contributed by Hugo van "
"Kemenade in :issue:`45837`.)"
msgstr ""
#: whatsnew/3.11.rst:1199
msgid ""
"The delegation of :func:`int` to :meth:`__trunc__` is now deprecated. "
"Calling ``int(a)`` when ``type(a)`` implements :meth:`__trunc__` but not :"
"meth:`__int__` or :meth:`__index__` now raises a :exc:`DeprecationWarning`. "
"(Contributed by Zackery Spytz in :issue:`44977`.)"
msgstr ""
#: whatsnew/3.11.rst:1204
msgid ""
"The following have been deprecated in :mod:`configparser` since Python 3.2. "
"Their deprecation warnings have now been updated to note they will removed "
"in Python 3.12:"
msgstr ""
#: whatsnew/3.11.rst:1208
msgid "the :class:`configparser.SafeConfigParser` class"
msgstr ""
#: whatsnew/3.11.rst:1209
msgid "the :attr:`configparser.ParsingError.filename` property"
msgstr ""
#: whatsnew/3.11.rst:1210
msgid "the :meth:`configparser.RawConfigParser.readfp` method"
msgstr ""
#: whatsnew/3.11.rst:1212
msgid "(Contributed by Hugo van Kemenade in :issue:`45173`.)"
msgstr ""
#: whatsnew/3.11.rst:1214
msgid ""
":class:`configparser.LegacyInterpolation` has been deprecated in the "
"docstring since Python 3.2. It now emits a :exc:`DeprecationWarning` and "
"will be removed in Python 3.13. Use :class:`configparser.BasicInterpolation` "
"or :class:`configparser.ExtendedInterpolation` instead. (Contributed by Hugo "
"van Kemenade in :issue:`46607`.)"
msgstr ""
#: whatsnew/3.11.rst:1220
msgid ""
"The :func:`locale.getdefaultlocale` function is deprecated and will be "
"removed in Python 3.13. Use :func:`locale.setlocale`, :func:`locale."
"getpreferredencoding(False) <locale.getpreferredencoding>` and :func:`locale."
"getlocale` functions instead. (Contributed by Victor Stinner in :issue:"
"`46659`.)"
msgstr ""
#: whatsnew/3.11.rst:1226
msgid ""
"The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been "
"deprecated since at least Python 3.6. Their documentation and deprecation "
"warnings have now been updated to note they will removed in Python 3.12 (:"
"pep:`594`). (Contributed by Hugo van Kemenade in :issue:`47022`.)"
msgstr ""
#: whatsnew/3.11.rst:1232
msgid ""
":pep:`594` led to the deprecations of the following modules which are slated "
"for removal in Python 3.13:"
msgstr ""
#: whatsnew/3.11.rst:1235
msgid ":mod:`aifc`"
msgstr ""
#: whatsnew/3.11.rst:1236
msgid ":mod:`audioop`"
msgstr ""
#: whatsnew/3.11.rst:1237
msgid ":mod:`cgi`"
msgstr ""
#: whatsnew/3.11.rst:1238
msgid ":mod:`cgitb`"
msgstr ""
#: whatsnew/3.11.rst:1239
msgid ":mod:`chunk`"
msgstr ""
#: whatsnew/3.11.rst:1240
msgid ":mod:`crypt`"
msgstr ""
#: whatsnew/3.11.rst:1241
msgid ":mod:`imghdr`"
msgstr ""
#: whatsnew/3.11.rst:1242
msgid ":mod:`mailcap`"
msgstr ""
#: whatsnew/3.11.rst:1243
msgid ":mod:`msilib`"
msgstr ""
#: whatsnew/3.11.rst:1244
msgid ":mod:`nis`"
msgstr ""
#: whatsnew/3.11.rst:1245
msgid ":mod:`nntplib`"
msgstr ""
#: whatsnew/3.11.rst:1246
msgid ":mod:`ossaudiodev`"
msgstr ""
#: whatsnew/3.11.rst:1247
msgid ":mod:`pipes`"
msgstr ""
#: whatsnew/3.11.rst:1248
msgid ":mod:`sndhdr`"
msgstr ""
#: whatsnew/3.11.rst:1249
msgid ":mod:`spwd`"
msgstr ""
#: whatsnew/3.11.rst:1250
msgid ":mod:`sunau`"
msgstr ""
#: whatsnew/3.11.rst:1251
msgid ":mod:`telnetlib`"
msgstr ""
#: whatsnew/3.11.rst:1252
msgid ":mod:`uu`"
msgstr ""
#: whatsnew/3.11.rst:1253
msgid ":mod:`xdrlib`"
msgstr ""
#: whatsnew/3.11.rst:1255
msgid ""
"(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in :gh:"
"`68966`.)"
msgstr ""
#: whatsnew/3.11.rst:1258
msgid ""
"More strict rules will be applied now applied for numerical group references "
"and group names in regular expressions in future Python versions. Only "
"sequence of ASCII digits will be now accepted as a numerical reference. The "
"group name in bytes patterns and replacement strings could only contain "
"ASCII letters and digits and underscore. For now, a deprecation warning is "
"raised for such syntax. (Contributed by Serhiy Storchaka in :gh:`91760`.)"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1266
msgid ""
":class:`typing.Text`, which exists solely to provide compatibility support "
"between Python 2 and Python 3 code, is now deprecated. Its removal is "
"currently unplanned, but users are encouraged to use :class:`str` instead "
"wherever possible. (Contributed by Alex Waygood in :gh:`92332`.)"
msgstr ""
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1272
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"The keyword argument syntax for constructing :data:`~typing.TypedDict` types "
"is now deprecated. Support will be removed in Python 3.13. (Contributed by "
"Jingchen Ye in :gh:`90224`.)"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1278
msgid "Pending Removal in Python 3.12"
msgstr ""
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1280
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"The following APIs have been deprecated in earlier Python releases, and will "
"be removed in Python 3.12."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1283
msgid "Python API:"
msgstr ""
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1285
msgid ":class:`pkgutil.ImpImporter`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1286
msgid ":class:`pkgutil.ImpLoader`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1287
msgid ":envvar:`PYTHONTHREADDEBUG`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1288
msgid ":func:`importlib.find_loader`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1289
msgid ":func:`importlib.util.module_for_loader`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1290
msgid ":func:`importlib.util.set_loader_wrapper`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1291
msgid ":func:`importlib.util.set_package_wrapper`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1292
msgid ":meth:`importlib.abc.Loader.module_repr`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1293
msgid ":meth:`importlib.abc.Loadermodule_repr`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1295
msgid ":meth:`importlib.abc.MetaPathFinder.find_module`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1296
msgid ":meth:`importlib.abc.PathEntryFinder.find_loader`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1297
msgid ":meth:`importlib.abc.PathEntryFinder.find_module`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1298
msgid ":meth:`importlib.machinery.BuiltinImporter.find_module`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1299
msgid ":meth:`importlib.machinery.BuiltinLoader.module_repr`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1300
msgid ":meth:`importlib.machinery.FileFinder.find_loader`"
msgstr ""
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1301
msgid ":meth:`importlib.machinery.FileFinder.find_module`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1302
msgid ":meth:`importlib.machinery.FrozenImporter.find_module`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1303
msgid ":meth:`importlib.machinery.FrozenLoader.module_repr`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1304
msgid ":meth:`importlib.machinery.PathFinder.find_module`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1305
msgid ":meth:`importlib.machinery.WindowsRegistryFinder.find_module`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1306
msgid ":meth:`pathlib.Path.link_to`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1307
msgid "The entire :ref:`distutils namespace <distutils-deprecated>`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1308
msgid ":func:`cgi.log`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1309
msgid ":func:`sqlite3.OptimizedUnicode`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1310
msgid ":func:`sqlite3.enable_shared_cache`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1312
msgid "C API:"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1314
msgid ":c:func:`PyUnicode_AS_DATA`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1315
msgid ":c:func:`PyUnicode_AS_UNICODE`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1316
msgid ":c:func:`PyUnicode_AsUnicodeAndSize`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1317
msgid ":c:func:`PyUnicode_AsUnicode`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1318
msgid ":c:func:`PyUnicode_FromUnicode`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1319
msgid ":c:func:`PyUnicode_GET_DATA_SIZE`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1320
msgid ":c:func:`PyUnicode_GET_SIZE`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1321
msgid ":c:func:`PyUnicode_GetSize`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1322
msgid ":c:func:`PyUnicode_IS_COMPACT`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1323
msgid ":c:func:`PyUnicode_IS_READY`"
msgstr ""
#: whatsnew/3.11.rst:1324
msgid ":c:func:`PyUnicode_READY`"
msgstr ""
#: whatsnew/3.11.rst:1325
msgid ":c:func:`Py_UNICODE_WSTR_LENGTH`"
msgstr ""
#: whatsnew/3.11.rst:1326
msgid ":c:func:`_PyUnicode_AsUnicode`"
msgstr ""
#: whatsnew/3.11.rst:1327
msgid ":c:macro:`PyUnicode_WCHAR_KIND`"
msgstr ""
#: whatsnew/3.11.rst:1328
msgid ":c:type:`PyUnicodeObject`"
msgstr ""
#: whatsnew/3.11.rst:1329
msgid ":c:func:`PyUnicode_InternImmortal()`"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1906
2022-03-23 17:40:12 +00:00
msgid "Removed"
msgstr "Retraits"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1335
2022-03-23 17:40:12 +00:00
msgid ""
":class:`smtpd.MailmanProxy` is now removed as it is unusable without an "
"external module, ``mailman``. (Contributed by Dong-hee Na in :issue:`35800`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1338
2022-03-23 17:40:12 +00:00
msgid ""
"The ``binhex`` module, deprecated in Python 3.9, is now removed. The "
"following :mod:`binascii` functions, deprecated in Python 3.9, are now also "
"removed:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1342
2022-03-23 17:40:12 +00:00
msgid "``a2b_hqx()``, ``b2a_hqx()``;"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1343
2022-03-23 17:40:12 +00:00
msgid "``rlecode_hqx()``, ``rledecode_hqx()``."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1345
2022-03-23 17:40:12 +00:00
msgid "The :func:`binascii.crc_hqx` function remains available."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1347
2022-03-23 17:40:12 +00:00
msgid "(Contributed by Victor Stinner in :issue:`45085`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1349
2022-03-23 17:40:12 +00:00
msgid ""
"The distutils ``bdist_msi`` command, deprecated in Python 3.9, is now "
"removed. Use ``bdist_wheel`` (wheel packages) instead. (Contributed by Hugo "
"van Kemenade in :issue:`45124`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1353
2022-03-23 17:40:12 +00:00
msgid ""
"Due to significant security concerns, the *reuse_address* parameter of :meth:"
"`asyncio.loop.create_datagram_endpoint`, disabled in Python 3.9, is now "
"entirely removed. This is because of the behavior of the socket option "
"``SO_REUSEADDR`` in UDP. (Contributed by Hugo van Kemenade in :issue:"
"`45129`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1359
2022-03-23 17:40:12 +00:00
msgid ""
"Removed :meth:`__getitem__` methods of :class:`xml.dom.pulldom."
"DOMEventStream`, :class:`wsgiref.util.FileWrapper` and :class:`fileinput."
"FileInput`, deprecated since Python 3.9. (Contributed by Hugo van Kemenade "
"in :issue:`45132`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1364
2022-03-23 17:40:12 +00:00
msgid ""
"The following deprecated functions and methods are removed in the :mod:"
"`gettext` module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`, :"
"func:`~gettext.lngettext` and :func:`~gettext.ldngettext`."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1368
2022-03-23 17:40:12 +00:00
msgid ""
"Function :func:`~gettext.bind_textdomain_codeset`, methods :meth:`~gettext."
"NullTranslations.output_charset` and :meth:`~gettext.NullTranslations."
"set_output_charset`, and the *codeset* parameter of functions :func:"
"`~gettext.translation` and :func:`~gettext.install` are also removed, since "
"they are only used for the ``l*gettext()`` functions. (Contributed by Dong-"
"hee Na and Serhiy Storchaka in :issue:`44235`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1376
2022-03-23 17:40:12 +00:00
msgid ""
"The :func:`@asyncio.coroutine <asyncio.coroutine>` :term:`decorator` "
"enabling legacy generator-based coroutines to be compatible with async/await "
"code. The function has been deprecated since Python 3.8 and the removal was "
"initially scheduled for Python 3.10. Use :keyword:`async def` instead. "
"(Contributed by Illia Volochii in :issue:`43216`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1382
2022-03-23 17:40:12 +00:00
msgid ""
":class:`asyncio.coroutines.CoroWrapper` used for wrapping legacy generator-"
"based coroutine objects in the debug mode. (Contributed by Illia Volochii "
"in :issue:`43216`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1386
2022-03-23 17:40:12 +00:00
msgid ""
"Removed the deprecated ``split()`` method of :class:`_tkinter.TkappType`. "
"(Contributed by Erlend E. Aasland in :issue:`38371`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1389
2022-03-23 17:40:12 +00:00
msgid "Removed from the :mod:`inspect` module:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1391
2022-03-23 17:40:12 +00:00
msgid ""
"the ``getargspec`` function, deprecated since Python 3.0; use :func:`inspect."
"signature` or :func:`inspect.getfullargspec` instead."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1394
2022-03-23 17:40:12 +00:00
msgid ""
"the ``formatargspec`` function, deprecated since Python 3.5; use the :func:"
"`inspect.signature` function and :class:`Signature` object directly."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1398
2022-03-23 17:40:12 +00:00
msgid ""
"the undocumented ``Signature.from_builtin`` and ``Signature.from_function`` "
"functions, deprecated since Python 3.5; use the :meth:`Signature."
"from_callable() <inspect.Signature.from_callable>` method instead."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1403
2022-03-23 17:40:12 +00:00
msgid "(Contributed by Hugo van Kemenade in :issue:`45320`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1405
2022-03-23 17:40:12 +00:00
msgid ""
"Remove namespace package support from unittest discovery. It was introduced "
"in Python 3.4 but has been broken since Python 3.7. (Contributed by Inada "
"Naoki in :issue:`23882`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1409
2022-03-23 17:40:12 +00:00
msgid ""
"Remove ``__class_getitem__`` method from :class:`pathlib.PurePath`, because "
"it was not used and added by mistake in previous versions. (Contributed by "
"Nikita Sobolev in :issue:`46483`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1413
2022-03-23 17:40:12 +00:00
msgid ""
"Remove the undocumented private ``float.__set_format__()`` method, "
"previously known as ``float.__setformat__()`` in Python 3.7. Its docstring "
"said: \"You probably don't want to use this function. It exists mainly to be "
"used in Python's test suite.\" (Contributed by Victor Stinner in :issue:"
"`46852`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1612
2022-03-23 17:40:12 +00:00
msgid "Porting to Python 3.11"
msgstr "Portage vers Python 3.11"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1422
2022-03-23 17:40:12 +00:00
msgid ""
"This section lists previously described changes and other bugfixes that may "
"require changes to your code."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1427
2022-03-23 17:40:12 +00:00
msgid "Changes in the Python API"
msgstr "Changements dans l'API Python"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1429
2022-03-23 17:40:12 +00:00
msgid ""
"Prohibited passing non-:class:`concurrent.futures.ThreadPoolExecutor` "
"executors to :meth:`loop.set_default_executor` following a deprecation in "
"Python 3.8. (Contributed by Illia Volochii in :issue:`43234`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1434
2022-03-23 17:40:12 +00:00
msgid ""
":func:`open`, :func:`io.open`, :func:`codecs.open` and :class:`fileinput."
"FileInput` no longer accept ``'U'`` (\"universal newline\") in the file "
"mode. This flag was deprecated since Python 3.3. In Python 3, the "
"\"universal newline\" is used by default when a file is open in text mode. "
"The :ref:`newline parameter <open-newline-parameter>` of :func:`open` "
"controls how universal newlines works. (Contributed by Victor Stinner in :"
"issue:`37330`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1442
2022-03-23 17:40:12 +00:00
msgid ""
"The :mod:`pdb` module now reads the :file:`.pdbrc` configuration file with "
"the ``'utf-8'`` encoding. (Contributed by Srinivas Reddy Thatiparthy (శ్రీనివాస్ "
"రెడ్డి తాటిపర్తి) in :issue:`41137`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1446
2022-03-23 17:40:12 +00:00
msgid ""
"When sorting using tuples as keys, the order of the result may differ from "
"earlier releases if the tuple elements don't define a total ordering (see :"
"ref:`expressions-value-comparisons` for information on total ordering). "
"It's generally true that the result of sorting simply isn't well-defined in "
"the absence of a total ordering on list elements."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1453
2022-03-23 17:40:12 +00:00
msgid ""
":mod:`calendar`: The :class:`calendar.LocaleTextCalendar` and :class:"
"`calendar.LocaleHTMLCalendar` classes now use :func:`locale.getlocale`, "
"instead of using :func:`locale.getdefaultlocale`, if no locale is specified. "
"(Contributed by Victor Stinner in :issue:`46659`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1459
2022-03-23 17:40:12 +00:00
msgid ""
"Global inline flags (e.g. ``(?i)``) can now only be used at the start of the "
"regular expressions. Using them not at the start of expression was "
"deprecated since Python 3.6. (Contributed by Serhiy Storchaka in :issue:"
"`47066`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1464
msgid ""
":mod:`re` module: Fix a few long-standing bugs where, in rare cases, "
"capturing group could get wrong result. So the result may be different than "
"before. (Contributed by Ma Lin in :issue:`35859`.)"
msgstr ""
#: whatsnew/3.11.rst:1469
msgid ""
"The *population* parameter of :func:`random.sample` must be a sequence. "
"Automatic conversion of sets to lists is no longer supported. If the sample "
"size is larger than the population size, a :exc:`ValueError` is raised. "
"(Contributed by Raymond Hettinger in :issue:`40465`.)"
msgstr ""
#: whatsnew/3.11.rst:1476
2022-03-23 17:40:12 +00:00
msgid "Build Changes"
msgstr "Changements à la compilation"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1478
2022-03-23 17:40:12 +00:00
msgid ""
"Building Python now requires a C11 compiler without optional C11 features. "
"(Contributed by Victor Stinner in :issue:`46656`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1481
2022-03-23 17:40:12 +00:00
msgid ""
"Building Python now requires support of IEEE 754 floating point numbers. "
"(Contributed by Victor Stinner in :issue:`46917`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1484
2022-03-23 17:40:12 +00:00
msgid ""
"CPython can now be built with the ThinLTO option via ``--with-lto=thin``. "
"(Contributed by Dong-hee Na and Brett Holman in :issue:`44340`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1487
2022-03-23 17:40:12 +00:00
msgid ""
"libpython is no longer linked against libcrypt. (Contributed by Mike Gilbert "
"in :issue:`45433`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1490
2022-03-23 17:40:12 +00:00
msgid ""
"Building Python now requires a C99 ``<math.h>`` header file providing the "
"following functions: ``copysign()``, ``hypot()``, ``isfinite()``, "
"``isinf()``, ``isnan()``, ``round()``. (Contributed by Victor Stinner in :"
"issue:`45440`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1495
2022-03-23 17:40:12 +00:00
msgid ""
"Building Python now requires a C99 ``<math.h>`` header file providing a "
"``NAN`` constant, or the ``__builtin_nan()`` built-in function. (Contributed "
"by Victor Stinner in :issue:`46640`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1499
2022-03-23 17:40:12 +00:00
msgid ""
"Building Python now requires support for floating point Not-a-Number (NaN): "
"remove the ``Py_NO_NAN`` macro. (Contributed by Victor Stinner in :issue:"
"`46656`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1503
2022-03-23 17:40:12 +00:00
msgid ""
"Freelists for object structs can now be disabled. A new :program:`configure` "
"option :option:`!--without-freelists` can be used to disable all freelists "
"except empty tuple singleton. (Contributed by Christian Heimes in :issue:"
"`45522`)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1508
2022-03-23 17:40:12 +00:00
msgid ""
"``Modules/Setup`` and ``Modules/makesetup`` have been improved and tied up. "
"Extension modules can now be built through ``makesetup``. All except some "
"test modules can be linked statically into main binary or library. "
"(Contributed by Brett Cannon and Christian Heimes in :issue:`45548`, :issue:"
"`45570`, :issue:`45571`, and :issue:`43974`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1514
2022-03-23 17:40:12 +00:00
msgid ""
"Build dependencies, compiler flags, and linker flags for most stdlib "
"extension modules are now detected by :program:`configure`. libffi, libnsl, "
2022-05-22 21:15:02 +00:00
"libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk libs, and uuid flags are "
"detected by ``pkg-config`` (when available). (Contributed by Christian "
"Heimes and Erlend Egeberg Aasland in :issue:`45847`, :issue:`45747`, and :"
"issue:`45763`.)"
msgstr ""
#: whatsnew/3.11.rst:1522
msgid ""
"Use the environment variables ``TCLTK_CFLAGS`` and ``TCLTK_LIBS`` to "
"manually specify the location of Tcl/Tk headers and libraries. The :program:"
"`configure` options ``--with-tcltk-includes`` and ``--with-tcltk-libs`` have "
"been removed."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1527
2022-03-23 17:40:12 +00:00
msgid ""
"CPython now has experimental support for cross compiling to WebAssembly "
"platform ``wasm32-emscripten``. The effort is inspired by previous work like "
"Pyodide. (Contributed by Christian Heimes and Ethan Smith in :issue:`40280`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1532
2022-03-23 17:40:12 +00:00
msgid ""
"CPython will now use 30-bit digits by default for the Python :class:`int` "
"implementation. Previously, the default was to use 30-bit digits on "
"platforms with ``SIZEOF_VOID_P >= 8``, and 15-bit digits otherwise. It's "
"still possible to explicitly request use of 15-bit digits via either the ``--"
"enable-big-digits`` option to the configure script or (for Windows) the "
"``PYLONG_BITS_IN_DIGIT`` variable in ``PC/pyconfig.h``, but this option may "
"be removed at some point in the future. (Contributed by Mark Dickinson in :"
"issue:`45569`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1541
2022-03-23 17:40:12 +00:00
msgid ""
"The :mod:`tkinter` package now requires Tcl/Tk version 8.5.12 or newer. "
"(Contributed by Serhiy Storchaka in :issue:`46996`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1546
2022-03-23 17:40:12 +00:00
msgid "C API Changes"
msgstr "Changements à l'API C"
2022-03-23 17:40:12 +00:00
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1551
2022-03-23 17:40:12 +00:00
msgid ""
"Add a new :c:func:`PyType_GetName` function to get type's short name. "
"(Contributed by Hai Shi in :issue:`42035`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1554
2022-03-23 17:40:12 +00:00
msgid ""
"Add a new :c:func:`PyType_GetQualName` function to get type's qualified "
"name. (Contributed by Hai Shi in :issue:`42035`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1557
2022-03-23 17:40:12 +00:00
msgid ""
"Add new :c:func:`PyThreadState_EnterTracing` and :c:func:"
"`PyThreadState_LeaveTracing` functions to the limited C API to suspend and "
"resume tracing and profiling. (Contributed by Victor Stinner in :issue:"
"`43760`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1562
2022-03-23 17:40:12 +00:00
msgid ""
"Added the :c:data:`Py_Version` constant which bears the same value as :c:"
"macro:`PY_VERSION_HEX`. (Contributed by Gabriele N. Tornetta in :issue:"
"`43931`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1566
2022-03-23 17:40:12 +00:00
msgid ""
":c:type:`Py_buffer` and APIs are now part of the limited API and the stable "
"ABI:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1569
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyObject_CheckBuffer`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1570
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyObject_GetBuffer`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1571
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_GetPointer`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1572
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_SizeFromFormat`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1573
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_ToContiguous`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1574
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_FromContiguous`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1575
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_CopyData`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1576
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_IsContiguous`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1577
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_FillContiguousStrides`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1578
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_FillInfo`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1579
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyBuffer_Release`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1580
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyMemoryView_FromBuffer`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1581
2022-03-23 17:40:12 +00:00
msgid ""
":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs."
"bf_releasebuffer` type slots"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1584
2022-03-23 17:40:12 +00:00
msgid "(Contributed by Christian Heimes in :issue:`45459`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1586
2022-03-23 17:40:12 +00:00
msgid ""
"Added the :c:data:`PyType_GetModuleByDef` function, used to get the module "
"in which a method was defined, in cases where this information is not "
"available directly (via :c:type:`PyCMethod`). (Contributed by Petr Viktorin "
"in :issue:`46613`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1591
2022-03-23 17:40:12 +00:00
msgid ""
"Add new functions to pack and unpack C double (serialize and deserialize): :"
"c:func:`PyFloat_Pack2`, :c:func:`PyFloat_Pack4`, :c:func:`PyFloat_Pack8`, :c:"
"func:`PyFloat_Unpack2`, :c:func:`PyFloat_Unpack4` and :c:func:"
"`PyFloat_Unpack8`. (Contributed by Victor Stinner in :issue:`46906`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1597
msgid ""
"Add new functions to get frame object attributes: :c:func:"
"`PyFrame_GetBuiltins`, :c:func:`PyFrame_GetGenerator`, :c:func:"
"`PyFrame_GetGlobals`, :c:func:`PyFrame_GetLasti`."
msgstr ""
#: whatsnew/3.11.rst:1601
msgid ""
"Added two new functions to get and set the active exception instance: :c:"
"func:`PyErr_GetHandledException` and :c:func:`PyErr_SetHandledException`. "
"These are alternatives to :c:func:`PyErr_SetExcInfo()` and :c:func:"
"`PyErr_GetExcInfo()` which work with the legacy 3-tuple representation of "
"exceptions. (Contributed by Irit Katriel in :issue:`46343`.)"
msgstr ""
#: whatsnew/3.11.rst:1608
msgid ""
"Added the :c:member:`PyConfig.safe_path` member. (Contributed by Victor "
"Stinner in :gh:`57684`.)"
msgstr ""
#: whatsnew/3.11.rst:1614
msgid ""
":c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback`` "
"arguments, the interpreter now derives those values from the exception "
"instance (the ``value`` argument). The function still steals references of "
"all three arguments. (Contributed by Irit Katriel in :issue:`45711`.)"
msgstr ""
#: whatsnew/3.11.rst:1620
msgid ""
":c:func:`PyErr_GetExcInfo()` now derives the ``type`` and ``traceback`` "
"fields of the result from the exception instance (the ``value`` field). "
"(Contributed by Irit Katriel in :issue:`45711`.)"
msgstr ""
#: whatsnew/3.11.rst:1624
msgid ""
":c:type:`_frozen` has a new ``is_package`` field to indicate whether or not "
"the frozen module is a package. Previously, a negative value in the "
"``size`` field was the indicator. Now only non-negative values be used for "
"``size``. (Contributed by Kumar Aditya in :issue:`46608`.)"
msgstr ""
#: whatsnew/3.11.rst:1630
msgid ""
":c:func:`_PyFrameEvalFunction` now takes ``_PyInterpreterFrame*`` as its "
"second parameter, instead of ``PyFrameObject*``. See :pep:`523` for more "
"details of how to use this function pointer type."
msgstr ""
#: whatsnew/3.11.rst:1634
msgid ""
":c:func:`PyCode_New` and :c:func:`PyCode_NewWithPosOnlyArgs` now take an "
"additional ``exception_table`` argument. Using these functions should be "
"avoided, if at all possible. To get a custom code object: create a code "
"object using the compiler, then get a modified version with the ``replace`` "
"method."
msgstr ""
#: whatsnew/3.11.rst:1640
msgid ""
":c:type:`PyCodeObject` no longer has a ``co_code`` field. Instead, use "
"``PyObject_GetAttrString(code_object, \"co_code\")`` or :c:func:"
"`PyCode_GetCode` to get the underlying bytes object. (Contributed by Brandt "
"Bucher in :issue:`46841` and Ken Jin in :gh:`92154`.)"
msgstr ""
#: whatsnew/3.11.rst:1645
2022-03-23 17:40:12 +00:00
msgid ""
"The old trashcan macros (``Py_TRASHCAN_SAFE_BEGIN``/"
"``Py_TRASHCAN_SAFE_END``) are now deprecated. They should be replaced by the "
"new macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1649
2022-03-23 17:40:12 +00:00
msgid "A tp_dealloc function that has the old macros, such as::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1660
2022-03-23 17:40:12 +00:00
msgid "should migrate to the new macros as follows::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1671
2022-03-23 17:40:12 +00:00
msgid ""
"Note that ``Py_TRASHCAN_BEGIN`` has a second argument which should be the "
"deallocation function it is in."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1674
2022-03-23 17:40:12 +00:00
msgid ""
"To support older Python versions in the same codebase, you can define the "
"following macros and use them throughout the code (credit: these were copied "
"from the ``mypy`` codebase)::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1686
2022-03-23 17:40:12 +00:00
msgid ""
"The :c:func:`PyType_Ready` function now raises an error if a type is defined "
"with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function (:"
"c:member:`PyTypeObject.tp_traverse`). (Contributed by Victor Stinner in :"
"issue:`44263`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1691
2022-03-23 17:40:12 +00:00
msgid ""
"Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit "
"the :pep:`590` vectorcall protocol. Previously, this was only possible for :"
"ref:`static types <static-types>`. (Contributed by Erlend E. Aasland in :"
"issue:`43908`)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1696
2022-03-23 17:40:12 +00:00
msgid ""
"Since :c:func:`Py_TYPE()` is changed to a inline static function, "
"``Py_TYPE(obj) = new_type`` must be replaced with ``Py_SET_TYPE(obj, "
"new_type)``: see the :c:func:`Py_SET_TYPE()` function (available since "
"Python 3.9). For backward compatibility, this macro can be used::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1722
2022-03-23 17:40:12 +00:00
msgid "(Contributed by Victor Stinner in :issue:`39573`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1710
2022-03-23 17:40:12 +00:00
msgid ""
"Since :c:func:`Py_SIZE()` is changed to a inline static function, "
"``Py_SIZE(obj) = new_size`` must be replaced with ``Py_SET_SIZE(obj, "
"new_size)``: see the :c:func:`Py_SET_SIZE()` function (available since "
"Python 3.9). For backward compatibility, this macro can be used::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1724
2022-03-23 17:40:12 +00:00
msgid ""
"``<Python.h>`` no longer includes the header files ``<stdlib.h>``, ``<stdio."
"h>``, ``<errno.h>`` and ``<string.h>`` when the ``Py_LIMITED_API`` macro is "
"set to ``0x030b0000`` (Python 3.11) or higher. C extensions should "
"explicitly include the header files after ``#include <Python.h>``. "
"(Contributed by Victor Stinner in :issue:`45434`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1730
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"The non-limited API files ``cellobject.h``, ``classobject.h``, ``code.h``, "
"``context.h``, ``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have "
"been moved to the ``Include/cpython`` directory. Moreover, the ``eval.h`` "
"header file was removed. These files must not be included directly, as they "
"are already included in ``Python.h``: :ref:`Include Files <api-includes>`. "
"If they have been included directly, consider including ``Python.h`` "
"instead. (Contributed by Victor Stinner in :issue:`35134`.)"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1738
2022-03-23 17:40:12 +00:00
msgid ""
"The :c:func:`PyUnicode_CHECK_INTERNED` macro has been excluded from the "
"limited C API. It was never usable there, because it used internal "
"structures which are not available in the limited C API. (Contributed by "
"Victor Stinner in :issue:`46007`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1745
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"The :c:type:`PyFrameObject` structure members have been removed from the "
"public C API."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1748
2022-03-23 17:40:12 +00:00
msgid ""
"While the documentation notes that the :c:type:`PyFrameObject` fields are "
"subject to change at any time, they have been stable for a long time and "
"were used in several popular extensions."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1752
2022-03-23 17:40:12 +00:00
msgid ""
"In Python 3.11, the frame struct was reorganized to allow performance "
"optimizations. Some fields were removed entirely, as they were details of "
"the old implementation."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1756
2022-03-23 17:40:12 +00:00
msgid ":c:type:`PyFrameObject` fields:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1758
2022-03-23 17:40:12 +00:00
msgid "``f_back``: use :c:func:`PyFrame_GetBack`."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1759
2022-03-23 17:40:12 +00:00
msgid "``f_blockstack``: removed."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1760
msgid "``f_builtins``: use :c:func:`PyFrame_GetBuiltins`."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1761
2022-03-23 17:40:12 +00:00
msgid "``f_code``: use :c:func:`PyFrame_GetCode`."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1762
msgid "``f_gen``: use :c:func:`PyFrame_GetGenerator`."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1763
msgid "``f_globals``: use :c:func:`PyFrame_GetGlobals`."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1764
2022-03-23 17:40:12 +00:00
msgid "``f_iblock``: removed."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1765
2022-03-23 17:40:12 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"``f_lasti``: use :c:func:`PyFrame_GetLasti`. Code using ``f_lasti`` with "
"``PyCode_Addr2Line()`` should use :c:func:`PyFrame_GetLineNumber` instead; "
"it may be faster."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1768
2022-03-23 17:40:12 +00:00
msgid "``f_lineno``: use :c:func:`PyFrame_GetLineNumber`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1769
msgid "``f_locals``: use :c:func:`PyFrame_GetLocals`."
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1770
2022-03-23 17:40:12 +00:00
msgid "``f_stackdepth``: removed."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1771
2022-03-23 17:40:12 +00:00
msgid "``f_state``: no public API (renamed to ``f_frame.f_state``)."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1772
2022-03-23 17:40:12 +00:00
msgid "``f_trace``: no public API."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1773
2022-03-23 17:40:12 +00:00
msgid ""
"``f_trace_lines``: use ``PyObject_GetAttrString((PyObject*)frame, "
"\"f_trace_lines\")``."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1774
2022-03-23 17:40:12 +00:00
msgid ""
"``f_trace_opcodes``: use ``PyObject_GetAttrString((PyObject*)frame, "
"\"f_trace_opcodes\")``."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1775
2022-03-23 17:40:12 +00:00
msgid "``f_localsplus``: no public API (renamed to ``f_frame.localsplus``)."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1776
2022-03-23 17:40:12 +00:00
msgid "``f_valuestack``: removed."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1778
2022-03-23 17:40:12 +00:00
msgid ""
"The Python frame object is now created lazily. A side effect is that the "
"``f_back`` member must not be accessed directly, since its value is now also "
"computed lazily. The :c:func:`PyFrame_GetBack` function must be called "
"instead."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1783
msgid ""
"Debuggers that accessed the ``f_locals`` directly *must* call :c:func:"
"`PyFrame_GetLocals` instead. They no longer need to call :c:func:"
"`PyFrame_FastToLocalsWithError` or :c:func:`PyFrame_LocalsToFast`, in fact "
"they should not call those functions. The necessary updating of the frame is "
"now managed by the virtual machine."
msgstr ""
#: whatsnew/3.11.rst:1789
2022-03-23 17:40:12 +00:00
msgid "Code defining ``PyFrame_GetCode()`` on Python 3.8 and older::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1799
2022-03-23 17:40:12 +00:00
msgid "Code defining ``PyFrame_GetBack()`` on Python 3.8 and older::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1809
2022-03-23 17:40:12 +00:00
msgid ""
"Or use the `pythoncapi_compat project <https://github.com/python/"
"pythoncapi_compat>`__ to get these two functions on older Python versions."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1813
2022-03-23 17:40:12 +00:00
msgid "Changes of the :c:type:`PyThreadState` structure members:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1815
2022-03-23 17:40:12 +00:00
msgid ""
"``frame``: removed, use :c:func:`PyThreadState_GetFrame` (function added to "
"Python 3.9 by :issue:`40429`). Warning: the function returns a :term:`strong "
"reference`, need to call :c:func:`Py_XDECREF`."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1819
2022-03-23 17:40:12 +00:00
msgid ""
"``tracing``: changed, use :c:func:`PyThreadState_EnterTracing` and :c:func:"
"`PyThreadState_LeaveTracing` (functions added to Python 3.11 by :issue:"
"`43760`)."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1822
2022-03-23 17:40:12 +00:00
msgid ""
"``recursion_depth``: removed, use ``(tstate->recursion_limit - tstate-"
">recursion_remaining)`` instead."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1824
2022-03-23 17:40:12 +00:00
msgid "``stackcheck_counter``: removed."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1826
2022-03-23 17:40:12 +00:00
msgid "Code defining ``PyThreadState_GetFrame()`` on Python 3.8 and older::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1836
2022-03-23 17:40:12 +00:00
msgid ""
"Code defining ``PyThreadState_EnterTracing()`` and "
"``PyThreadState_LeaveTracing()`` on Python 3.10 and older::"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1862
2022-03-23 17:40:12 +00:00
msgid ""
"Or use `the pythoncapi_compat project <https://github.com/python/"
"pythoncapi_compat>`__ to get these functions on old Python functions."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1866
msgid ""
"Distributors are encouraged to build Python with the optimized Blake2 "
"library `libb2`_."
msgstr ""
#: whatsnew/3.11.rst:1874
msgid ""
":c:func:`PyConfig_Read` no longer calculates the initial search path, and "
"will not fill any values into :c:member:`PyConfig.module_search_paths`. To "
"calculate default paths and then modify them, finish initialization and use :"
"c:func:`PySys_GetObject` to retrieve :data:`sys.path` as a Python list "
"object and modify it directly."
msgstr ""
#: whatsnew/3.11.rst:1883
2022-03-23 17:40:12 +00:00
msgid ""
"Deprecate the following functions to configure the Python initialization:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1885
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PySys_AddWarnOptionUnicode`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1886
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PySys_AddWarnOption`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1887
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PySys_AddXOption`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1888
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PySys_HasWarnOptions`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1889
msgid ":c:func:`PySys_SetArgvEx`"
msgstr ""
#: whatsnew/3.11.rst:1890
msgid ":c:func:`PySys_SetArgv`"
msgstr ""
#: whatsnew/3.11.rst:1891
msgid ":c:func:`PySys_SetPath`"
msgstr ""
#: whatsnew/3.11.rst:1892
2022-03-23 17:40:12 +00:00
msgid ":c:func:`Py_SetPath`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1893
2022-03-23 17:40:12 +00:00
msgid ":c:func:`Py_SetProgramName`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1894
2022-03-23 17:40:12 +00:00
msgid ":c:func:`Py_SetPythonHome`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1895
2022-03-23 17:40:12 +00:00
msgid ":c:func:`Py_SetStandardStreamEncoding`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1896
2022-03-23 17:40:12 +00:00
msgid ":c:func:`_Py_SetProgramFullPath`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1898
2022-03-23 17:40:12 +00:00
msgid ""
"Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization "
"Configuration <init-config>` instead (:pep:`587`). (Contributed by Victor "
2022-05-22 21:15:02 +00:00
"Stinner in :gh:`88279`.)"
2022-03-23 17:40:12 +00:00
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1902
2022-03-23 17:40:12 +00:00
msgid ""
"Deprecate the ``ob_shash`` member of the :c:type:`PyBytesObject`. Use :c:"
"func:`PyObject_Hash` instead. (Contributed by Inada Naoki in :issue:`46864`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1908
2022-03-23 17:40:12 +00:00
msgid ""
":c:func:`PyFrame_BlockSetup` and :c:func:`PyFrame_BlockPop` have been "
"removed. (Contributed by Mark Shannon in :issue:`40222`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1912
2022-03-23 17:40:12 +00:00
msgid "Remove the following math macros using the ``errno`` variable:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1914
2022-03-23 17:40:12 +00:00
msgid "``Py_ADJUST_ERANGE1()``"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1915
2022-03-23 17:40:12 +00:00
msgid "``Py_ADJUST_ERANGE2()``"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1916
2022-03-23 17:40:12 +00:00
msgid "``Py_OVERFLOWED()``"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1917
2022-03-23 17:40:12 +00:00
msgid "``Py_SET_ERANGE_IF_OVERFLOW()``"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1918
2022-03-23 17:40:12 +00:00
msgid "``Py_SET_ERRNO_ON_MATH_ERROR()``"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1920
2022-03-23 17:40:12 +00:00
msgid "(Contributed by Victor Stinner in :issue:`45412`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1922
2022-03-23 17:40:12 +00:00
msgid ""
"Remove ``Py_UNICODE_COPY()`` and ``Py_UNICODE_FILL()`` macros, deprecated "
"since Python 3.3. Use ``PyUnicode_CopyCharacters()`` or ``memcpy()`` "
"(``wchar_t*`` string), and ``PyUnicode_Fill()`` functions instead. "
"(Contributed by Victor Stinner in :issue:`41123`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1927
2022-03-23 17:40:12 +00:00
msgid ""
"Remove the ``pystrhex.h`` header file. It only contains private functions. C "
"extensions should only include the main ``<Python.h>`` header file. "
"(Contributed by Victor Stinner in :issue:`45434`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1931
2022-03-23 17:40:12 +00:00
msgid ""
"Remove the ``Py_FORCE_DOUBLE()`` macro. It was used by the "
"``Py_IS_INFINITY()`` macro. (Contributed by Victor Stinner in :issue:"
"`45440`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1935
2022-03-23 17:40:12 +00:00
msgid ""
"The following items are no longer available when :c:macro:`Py_LIMITED_API` "
"is defined:"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1938
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyMarshal_WriteLongToFile`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1939
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyMarshal_WriteObjectToFile`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1940
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyMarshal_ReadObjectFromString`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1941
2022-03-23 17:40:12 +00:00
msgid ":c:func:`PyMarshal_WriteObjectToString`"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1942
2022-03-23 17:40:12 +00:00
msgid "the ``Py_MARSHAL_VERSION`` macro"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1944
2022-03-23 17:40:12 +00:00
msgid "These are not part of the :ref:`limited API <stable-abi-list>`."
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1946
2022-03-23 17:40:12 +00:00
msgid "(Contributed by Victor Stinner in :issue:`45474`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1948
2022-03-23 17:40:12 +00:00
msgid ""
"Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never "
"worked since the :c:type:`PyWeakReference` structure is opaque in the "
"limited C API. (Contributed by Victor Stinner in :issue:`35134`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1953
2022-03-23 17:40:12 +00:00
msgid ""
"Remove the ``PyHeapType_GET_MEMBERS()`` macro. It was exposed in the public "
"C API by mistake, it must only be used by Python internally. Use the "
"``PyTypeObject.tp_members`` member instead. (Contributed by Victor Stinner "
"in :issue:`40170`.)"
msgstr ""
2022-05-22 21:15:02 +00:00
#: whatsnew/3.11.rst:1958
2022-03-23 17:40:12 +00:00
msgid ""
"Remove the ``HAVE_PY_SET_53BIT_PRECISION`` macro (moved to the internal C "
"API). (Contributed by Victor Stinner in :issue:`45412`.)"
msgstr ""