mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
Python 3.12.0b1
This commit is contained in:
parent
5360cb3d56
commit
5612078f68
@ -41,7 +41,7 @@ except ImportError:
|
||||
|
||||
ISSUE_URI = 'https://bugs.python.org/issue?@action=redirect&bpo=%s'
|
||||
GH_ISSUE_URI = 'https://github.com/python/cpython/issues/%s'
|
||||
SOURCE_URI = 'https://github.com/python/cpython/tree/main/%s'
|
||||
SOURCE_URI = 'https://github.com/python/cpython/tree/3.12/%s'
|
||||
|
||||
# monkey-patch reST parser to disable alphabetic and roman enumerated lists
|
||||
from docutils.parsers.rst.states import Body
|
||||
|
@ -19,11 +19,11 @@
|
||||
#define PY_MAJOR_VERSION 3
|
||||
#define PY_MINOR_VERSION 12
|
||||
#define PY_MICRO_VERSION 0
|
||||
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
|
||||
#define PY_RELEASE_SERIAL 7
|
||||
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
|
||||
#define PY_RELEASE_SERIAL 1
|
||||
|
||||
/* Version as a string */
|
||||
#define PY_VERSION "3.12.0a7+"
|
||||
#define PY_VERSION "3.12.0b1"
|
||||
/*--end constants--*/
|
||||
|
||||
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Autogenerated by Sphinx on Tue Apr 4 17:52:21 2023
|
||||
# Autogenerated by Sphinx on Mon May 22 14:02:15 2023
|
||||
topics = {'assert': 'The "assert" statement\n'
|
||||
'**********************\n'
|
||||
'\n'
|
||||
@ -2573,9 +2573,12 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'\n'
|
||||
'Any remaining exceptions that were not handled by any "except*" '
|
||||
'clause\n'
|
||||
'are re-raised at the end, combined into an exception group along '
|
||||
'with\n'
|
||||
'all exceptions that were raised from within "except*" clauses.\n'
|
||||
'are re-raised at the end, along with all exceptions that were '
|
||||
'raised\n'
|
||||
'from within the "except*" clauses. If this list contains more '
|
||||
'than one\n'
|
||||
'exception to reraise, they are combined into an exception '
|
||||
'group.\n'
|
||||
'\n'
|
||||
'If the raised exception is not an exception group and its type '
|
||||
'matches\n'
|
||||
@ -4587,8 +4590,7 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'case\n'
|
||||
' performance of a dict insertion, O(n^2) complexity. '
|
||||
'See\n'
|
||||
' http://www.ocert.org/advisories/ocert-2011-003.html '
|
||||
'for\n'
|
||||
' http://ocert.org/advisories/ocert-2011-003.html for\n'
|
||||
' details.Changing hash values affects the iteration '
|
||||
'order of sets.\n'
|
||||
' Python has never made guarantees about this ordering '
|
||||
@ -4651,60 +4653,14 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'traces of\n'
|
||||
' Python programs.\n'
|
||||
'\n'
|
||||
'The debugger’s prompt is "(Pdb)". Typical usage to run a program '
|
||||
'under\n'
|
||||
'control of the debugger is:\n'
|
||||
'\n'
|
||||
' >>> import pdb\n'
|
||||
' >>> import mymodule\n'
|
||||
" >>> pdb.run('mymodule.test()')\n"
|
||||
' > <string>(0)?()\n'
|
||||
' (Pdb) continue\n'
|
||||
' > <string>(1)?()\n'
|
||||
' (Pdb) continue\n'
|
||||
" NameError: 'spam'\n"
|
||||
' > <string>(1)?()\n'
|
||||
' (Pdb)\n'
|
||||
'\n'
|
||||
'Changed in version 3.3: Tab-completion via the "readline" module '
|
||||
'is\n'
|
||||
'available for commands and command arguments, e.g. the current '
|
||||
'global\n'
|
||||
'and local names are offered as arguments of the "p" command.\n'
|
||||
'\n'
|
||||
'"pdb.py" can also be invoked as a script to debug other '
|
||||
'scripts. For\n'
|
||||
'example:\n'
|
||||
'\n'
|
||||
' python -m pdb myscript.py\n'
|
||||
'\n'
|
||||
'When invoked as a script, pdb will automatically enter '
|
||||
'post-mortem\n'
|
||||
'debugging if the program being debugged exits abnormally. After '
|
||||
'post-\n'
|
||||
'mortem debugging (or after normal exit of the program), pdb '
|
||||
'will\n'
|
||||
'restart the program. Automatic restarting preserves pdb’s state '
|
||||
'(such\n'
|
||||
'as breakpoints) and in most cases is more useful than quitting '
|
||||
'the\n'
|
||||
'debugger upon program’s exit.\n'
|
||||
'\n'
|
||||
'New in version 3.2: "pdb.py" now accepts a "-c" option that '
|
||||
'executes\n'
|
||||
'commands as if given in a ".pdbrc" file, see Debugger Commands.\n'
|
||||
'\n'
|
||||
'New in version 3.7: "pdb.py" now accepts a "-m" option that '
|
||||
'execute\n'
|
||||
'modules similar to the way "python -m" does. As with a script, '
|
||||
'the\n'
|
||||
'debugger will pause execution just before the first line of the\n'
|
||||
'module.\n'
|
||||
'\n'
|
||||
'The typical usage to break into the debugger is to insert:\n'
|
||||
'\n'
|
||||
' import pdb; pdb.set_trace()\n'
|
||||
'\n'
|
||||
'Or:\n'
|
||||
'\n'
|
||||
' breakpoint()\n'
|
||||
'\n'
|
||||
'at the location you want to break into the debugger, and then '
|
||||
'run the\n'
|
||||
'program. You can then step through the code following this '
|
||||
@ -4716,21 +4672,83 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'with\n'
|
||||
'defaults, can be used instead of "import pdb; pdb.set_trace()".\n'
|
||||
'\n'
|
||||
' def double(x):\n'
|
||||
' breakpoint()\n'
|
||||
' return x * 2\n'
|
||||
' val = 3\n'
|
||||
' print(f"{val} * 2 is {double(val)}")\n'
|
||||
'\n'
|
||||
'The debugger’s prompt is "(Pdb)", which is the indicator that '
|
||||
'you are\n'
|
||||
'in debug mode:\n'
|
||||
'\n'
|
||||
' > ...(3)double()\n'
|
||||
' -> return x * 2\n'
|
||||
' (Pdb) p x\n'
|
||||
' 3\n'
|
||||
' (Pdb) continue\n'
|
||||
' 3 * 2 is 6\n'
|
||||
'\n'
|
||||
'Changed in version 3.3: Tab-completion via the "readline" module '
|
||||
'is\n'
|
||||
'available for commands and command arguments, e.g. the current '
|
||||
'global\n'
|
||||
'and local names are offered as arguments of the "p" command.\n'
|
||||
'\n'
|
||||
'You can also invoke "pdb" from the command line to debug other\n'
|
||||
'scripts. For example:\n'
|
||||
'\n'
|
||||
' python -m pdb myscript.py\n'
|
||||
'\n'
|
||||
'When invoked as a module, pdb will automatically enter '
|
||||
'post-mortem\n'
|
||||
'debugging if the program being debugged exits abnormally. After '
|
||||
'post-\n'
|
||||
'mortem debugging (or after normal exit of the program), pdb '
|
||||
'will\n'
|
||||
'restart the program. Automatic restarting preserves pdb’s state '
|
||||
'(such\n'
|
||||
'as breakpoints) and in most cases is more useful than quitting '
|
||||
'the\n'
|
||||
'debugger upon program’s exit.\n'
|
||||
'\n'
|
||||
'New in version 3.2: "-c" option is introduced to execute '
|
||||
'commands as\n'
|
||||
'if given in a ".pdbrc" file, see Debugger Commands.\n'
|
||||
'\n'
|
||||
'New in version 3.7: "-m" option is introduced to execute '
|
||||
'modules\n'
|
||||
'similar to the way "python -m" does. As with a script, the '
|
||||
'debugger\n'
|
||||
'will pause execution just before the first line of the module.\n'
|
||||
'\n'
|
||||
'Typical usage to execute a statement under control of the '
|
||||
'debugger is:\n'
|
||||
'\n'
|
||||
' >>> import pdb\n'
|
||||
' >>> def f(x):\n'
|
||||
' ... print(1 / x)\n'
|
||||
' >>> pdb.run("f(2)")\n'
|
||||
' > <string>(1)<module>()\n'
|
||||
' (Pdb) continue\n'
|
||||
' 0.5\n'
|
||||
' >>>\n'
|
||||
'\n'
|
||||
'The typical usage to inspect a crashed program is:\n'
|
||||
'\n'
|
||||
' >>> import pdb\n'
|
||||
' >>> import mymodule\n'
|
||||
' >>> mymodule.test()\n'
|
||||
' >>> def f(x):\n'
|
||||
' ... print(1 / x)\n'
|
||||
' ...\n'
|
||||
' >>> f(0)\n'
|
||||
' Traceback (most recent call last):\n'
|
||||
' File "<stdin>", line 1, in <module>\n'
|
||||
' File "./mymodule.py", line 4, in test\n'
|
||||
' test2()\n'
|
||||
' File "./mymodule.py", line 3, in test2\n'
|
||||
' print(spam)\n'
|
||||
' NameError: spam\n'
|
||||
' File "<stdin>", line 2, in f\n'
|
||||
' ZeroDivisionError: division by zero\n'
|
||||
' >>> pdb.pm()\n'
|
||||
' > ./mymodule.py(3)test2()\n'
|
||||
' -> print(spam)\n'
|
||||
' > <stdin>(2)f()\n'
|
||||
' (Pdb) p x\n'
|
||||
' 0\n'
|
||||
' (Pdb)\n'
|
||||
'\n'
|
||||
'The module defines the following functions; each enters the '
|
||||
@ -4914,6 +4932,29 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'implicit\n'
|
||||
'string concatenation "\';\'\';\'" or "";"";"".\n'
|
||||
'\n'
|
||||
'To set a temporary global variable, use a *convenience '
|
||||
'variable*. A\n'
|
||||
'*convenience variable* is a variable whose name starts with '
|
||||
'"$". For\n'
|
||||
'example, "$foo = 1" sets a global variable "$foo" which you can '
|
||||
'use in\n'
|
||||
'the debugger session. The *convenience variables* are cleared '
|
||||
'when\n'
|
||||
'the program resumes execution so it’s less likely to interfere '
|
||||
'with\n'
|
||||
'your program compared to using normal variables like "foo = 1".\n'
|
||||
'\n'
|
||||
'There are three preset *convenience variables*:\n'
|
||||
'\n'
|
||||
'* "$_frame": the current frame you are debugging\n'
|
||||
'\n'
|
||||
'* "$_retval": the return value if the frame is returning\n'
|
||||
'\n'
|
||||
'* "$_exception": the exception if the frame is raising an '
|
||||
'exception\n'
|
||||
'\n'
|
||||
'New in version 3.12.\n'
|
||||
'\n'
|
||||
'If a file ".pdbrc" exists in the user’s home directory or in '
|
||||
'the\n'
|
||||
'current directory, it is read with "\'utf-8\'" encoding and '
|
||||
@ -4949,9 +4990,9 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'\n'
|
||||
' Print a stack trace, with the most recent frame at the '
|
||||
'bottom. An\n'
|
||||
' arrow indicates the current frame, which determines the '
|
||||
'context of\n'
|
||||
' most commands.\n'
|
||||
' arrow (">") indicates the current frame, which determines '
|
||||
'the\n'
|
||||
' context of most commands.\n'
|
||||
'\n'
|
||||
'd(own) [count]\n'
|
||||
'\n'
|
||||
@ -5007,7 +5048,7 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'first\n'
|
||||
' ask confirmation).\n'
|
||||
'\n'
|
||||
'disable [bpnumber ...]\n'
|
||||
'disable bpnumber [bpnumber ...]\n'
|
||||
'\n'
|
||||
' Disable the breakpoints given as a space separated list of\n'
|
||||
' breakpoint numbers. Disabling a breakpoint means it cannot '
|
||||
@ -5016,7 +5057,7 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'breakpoint, it\n'
|
||||
' remains in the list of breakpoints and can be (re-)enabled.\n'
|
||||
'\n'
|
||||
'enable [bpnumber ...]\n'
|
||||
'enable bpnumber [bpnumber ...]\n'
|
||||
'\n'
|
||||
' Enable the breakpoints specified.\n'
|
||||
'\n'
|
||||
@ -5179,7 +5220,9 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'\n'
|
||||
'a(rgs)\n'
|
||||
'\n'
|
||||
' Print the argument list of the current function.\n'
|
||||
' Print the arguments of the current function and their '
|
||||
'current\n'
|
||||
' values.\n'
|
||||
'\n'
|
||||
'p expression\n'
|
||||
'\n'
|
||||
@ -5217,6 +5260,54 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'current\n'
|
||||
' frame.\n'
|
||||
'\n'
|
||||
' Note:\n'
|
||||
'\n'
|
||||
' Display evaluates *expression* and compares to the result '
|
||||
'of the\n'
|
||||
' previous evaluation of *expression*, so when the result is\n'
|
||||
' mutable, display may not be able to pick up the changes.\n'
|
||||
'\n'
|
||||
' Example:\n'
|
||||
'\n'
|
||||
' lst = []\n'
|
||||
' breakpoint()\n'
|
||||
' pass\n'
|
||||
' lst.append(1)\n'
|
||||
' print(lst)\n'
|
||||
'\n'
|
||||
' Display won’t realize "lst" has been changed because the '
|
||||
'result of\n'
|
||||
' evaluation is modified in place by "lst.append(1)" before '
|
||||
'being\n'
|
||||
' compared:\n'
|
||||
'\n'
|
||||
' > example.py(3)<module>()\n'
|
||||
' -> pass\n'
|
||||
' (Pdb) display lst\n'
|
||||
' display lst: []\n'
|
||||
' (Pdb) n\n'
|
||||
' > example.py(4)<module>()\n'
|
||||
' -> lst.append(1)\n'
|
||||
' (Pdb) n\n'
|
||||
' > example.py(5)<module>()\n'
|
||||
' -> print(lst)\n'
|
||||
' (Pdb)\n'
|
||||
'\n'
|
||||
' You can do some tricks with copy mechanism to make it work:\n'
|
||||
'\n'
|
||||
' > example.py(3)<module>()\n'
|
||||
' -> pass\n'
|
||||
' (Pdb) display lst[:]\n'
|
||||
' display lst[:]: []\n'
|
||||
' (Pdb) n\n'
|
||||
' > example.py(4)<module>()\n'
|
||||
' -> lst.append(1)\n'
|
||||
' (Pdb) n\n'
|
||||
' > example.py(5)<module>()\n'
|
||||
' -> print(lst)\n'
|
||||
' display lst[:]: [1] [old: []]\n'
|
||||
' (Pdb)\n'
|
||||
'\n'
|
||||
' New in version 3.2.\n'
|
||||
'\n'
|
||||
'undisplay [expression]\n'
|
||||
@ -5283,14 +5374,14 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'current\n'
|
||||
' stack frame. The exclamation point can be omitted unless the '
|
||||
'first\n'
|
||||
' word of the statement resembles a debugger command, e.g.:'
|
||||
' word of the statement resembles a debugger command, e.g.:\n'
|
||||
'\n'
|
||||
' (Pdb) ! n=42\n'
|
||||
' (Pdb)\n'
|
||||
'\n'
|
||||
' To set a global variable, you can prefix the assignment command '
|
||||
' with \n'
|
||||
' a "global" statement on the same line, e.g.:\n'
|
||||
' To set a global variable, you can prefix the assignment '
|
||||
'command\n'
|
||||
' with a "global" statement on the same line, e.g.:\n'
|
||||
'\n'
|
||||
" (Pdb) global list_options; list_options = ['-l']\n"
|
||||
' (Pdb)\n'
|
||||
@ -5321,7 +5412,8 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'\n'
|
||||
'retval\n'
|
||||
'\n'
|
||||
' Print the return value for the last return of a function.\n'
|
||||
' Print the return value for the last return of the current '
|
||||
'function.\n'
|
||||
'\n'
|
||||
'-[ Footnotes ]-\n'
|
||||
'\n'
|
||||
@ -9509,8 +9601,7 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
' by carefully chosen inputs that exploit the worst case\n'
|
||||
' performance of a dict insertion, O(n^2) complexity. '
|
||||
'See\n'
|
||||
' http://www.ocert.org/advisories/ocert-2011-003.html '
|
||||
'for\n'
|
||||
' http://ocert.org/advisories/ocert-2011-003.html for\n'
|
||||
' details.Changing hash values affects the iteration '
|
||||
'order of sets.\n'
|
||||
' Python has never made guarantees about this ordering '
|
||||
@ -10164,20 +10255,37 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'Resolving MRO entries\n'
|
||||
'---------------------\n'
|
||||
'\n'
|
||||
'If a base that appears in class definition is not an '
|
||||
'object.__mro_entries__(self, bases)\n'
|
||||
'\n'
|
||||
' If a base that appears in a class definition is not an '
|
||||
'instance of\n'
|
||||
'"type", then an "__mro_entries__" method is searched on it. '
|
||||
'If found,\n'
|
||||
'it is called with the original bases tuple. This method must '
|
||||
'return a\n'
|
||||
'tuple of classes that will be used instead of this base. The '
|
||||
'tuple may\n'
|
||||
'be empty, in such case the original base is ignored.\n'
|
||||
' "type", then an "__mro_entries__()" method is searched on '
|
||||
'the base.\n'
|
||||
' If an "__mro_entries__()" method is found, the base is '
|
||||
'substituted\n'
|
||||
' with the result of a call to "__mro_entries__()" when '
|
||||
'creating the\n'
|
||||
' class. The method is called with the original bases tuple '
|
||||
'passed to\n'
|
||||
' the *bases* parameter, and must return a tuple of classes '
|
||||
'that will\n'
|
||||
' be used instead of the base. The returned tuple may be '
|
||||
'empty: in\n'
|
||||
' these cases, the original base is ignored.\n'
|
||||
'\n'
|
||||
'See also:\n'
|
||||
'\n'
|
||||
' **PEP 560** - Core support for typing module and generic '
|
||||
'types\n'
|
||||
' "types.resolve_bases()"\n'
|
||||
' Dynamically resolve bases that are not instances of '
|
||||
'"type".\n'
|
||||
'\n'
|
||||
' "types.get_original_bases()"\n'
|
||||
' Retrieve a class’s “original bases” prior to '
|
||||
'modifications by\n'
|
||||
' "__mro_entries__()".\n'
|
||||
'\n'
|
||||
' **PEP 560**\n'
|
||||
' Core support for typing module and generic types.\n'
|
||||
'\n'
|
||||
'\n'
|
||||
'Determining the appropriate metaclass\n'
|
||||
@ -11153,6 +11261,61 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
' The specification for the Python "match" statement.\n'
|
||||
'\n'
|
||||
'\n'
|
||||
'Emulating buffer types\n'
|
||||
'======================\n'
|
||||
'\n'
|
||||
'The buffer protocol provides a way for Python objects to '
|
||||
'expose\n'
|
||||
'efficient access to a low-level memory array. This protocol '
|
||||
'is\n'
|
||||
'implemented by builtin types such as "bytes" and '
|
||||
'"memoryview", and\n'
|
||||
'third-party libraries may define additional buffer types.\n'
|
||||
'\n'
|
||||
'While buffer types are usually implemented in C, it is also '
|
||||
'possible\n'
|
||||
'to implement the protocol in Python.\n'
|
||||
'\n'
|
||||
'object.__buffer__(self, flags)\n'
|
||||
'\n'
|
||||
' Called when a buffer is requested from *self* (for '
|
||||
'example, by the\n'
|
||||
' "memoryview" constructor). The *flags* argument is an '
|
||||
'integer\n'
|
||||
' representing the kind of buffer requested, affecting for '
|
||||
'example\n'
|
||||
' whether the returned buffer is read-only or writable.\n'
|
||||
' "inspect.BufferFlags" provides a convenient way to '
|
||||
'interpret the\n'
|
||||
' flags. The method must return a "memoryview" object.\n'
|
||||
'\n'
|
||||
'object.__release_buffer__(self, buffer)\n'
|
||||
'\n'
|
||||
' Called when a buffer is no longer needed. The *buffer* '
|
||||
'argument is\n'
|
||||
' a "memoryview" object that was previously returned by\n'
|
||||
' "__buffer__()". The method must release any resources '
|
||||
'associated\n'
|
||||
' with the buffer. This method should return "None". Buffer '
|
||||
'objects\n'
|
||||
' that do not need to perform any cleanup are not required '
|
||||
'to\n'
|
||||
' implement this method.\n'
|
||||
'\n'
|
||||
'New in version 3.12.\n'
|
||||
'\n'
|
||||
'See also:\n'
|
||||
'\n'
|
||||
' **PEP 688** - Making the buffer protocol accessible in '
|
||||
'Python\n'
|
||||
' Introduces the Python "__buffer__" and '
|
||||
'"__release_buffer__"\n'
|
||||
' methods.\n'
|
||||
'\n'
|
||||
' "collections.abc.Buffer"\n'
|
||||
' ABC for buffer types.\n'
|
||||
'\n'
|
||||
'\n'
|
||||
'Special method lookup\n'
|
||||
'=====================\n'
|
||||
'\n'
|
||||
@ -11300,8 +11463,8 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
' "casefold()" converts it to ""ss"".\n'
|
||||
'\n'
|
||||
' The casefolding algorithm is described in section 3.13 '
|
||||
'of the\n'
|
||||
' Unicode Standard.\n'
|
||||
'‘Default\n'
|
||||
' Case Folding’ of the Unicode Standard.\n'
|
||||
'\n'
|
||||
' New in version 3.3.\n'
|
||||
'\n'
|
||||
@ -11519,8 +11682,9 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
' being one of “Lm”, “Lt”, “Lu”, “Ll”, or “Lo”. Note '
|
||||
'that this is\n'
|
||||
' different from the Alphabetic property defined in the '
|
||||
'Unicode\n'
|
||||
' Standard.\n'
|
||||
'section 4.10\n'
|
||||
' ‘Letters, Alphabetic, and Ideographic’ of the Unicode '
|
||||
'Standard.\n'
|
||||
'\n'
|
||||
'str.isascii()\n'
|
||||
'\n'
|
||||
@ -11692,8 +11856,8 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
' converted to lowercase.\n'
|
||||
'\n'
|
||||
' The lowercasing algorithm used is described in section '
|
||||
'3.13 of the\n'
|
||||
' Unicode Standard.\n'
|
||||
'3.13\n'
|
||||
' ‘Default Case Folding’ of the Unicode Standard.\n'
|
||||
'\n'
|
||||
'str.lstrip([chars])\n'
|
||||
'\n'
|
||||
@ -12159,8 +12323,8 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
' uppercase), but e.g. “Lt” (Letter, titlecase).\n'
|
||||
'\n'
|
||||
' The uppercasing algorithm used is described in section '
|
||||
'3.13 of the\n'
|
||||
' Unicode Standard.\n'
|
||||
'3.13\n'
|
||||
' ‘Default Case Folding’ of the Unicode Standard.\n'
|
||||
'\n'
|
||||
'str.zfill(width)\n'
|
||||
'\n'
|
||||
@ -12704,9 +12868,10 @@ topics = {'assert': 'The "assert" statement\n'
|
||||
'\n'
|
||||
'Any remaining exceptions that were not handled by any "except*" '
|
||||
'clause\n'
|
||||
'are re-raised at the end, combined into an exception group along '
|
||||
'with\n'
|
||||
'all exceptions that were raised from within "except*" clauses.\n'
|
||||
'are re-raised at the end, along with all exceptions that were raised\n'
|
||||
'from within the "except*" clauses. If this list contains more than '
|
||||
'one\n'
|
||||
'exception to reraise, they are combined into an exception group.\n'
|
||||
'\n'
|
||||
'If the raised exception is not an exception group and its type '
|
||||
'matches\n'
|
||||
|
2412
Misc/NEWS.d/3.12.0b1.rst
Normal file
2412
Misc/NEWS.d/3.12.0b1.rst
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
Add platform triplets for 64-bit LoongArch:
|
||||
|
||||
* loongarch64-linux-gnusf
|
||||
* loongarch64-linux-gnuf32
|
||||
* loongarch64-linux-gnu
|
||||
|
||||
Patch by Zhang Na.
|
@ -1,4 +0,0 @@
|
||||
Changed the default value of the ``SHELL`` Makefile variable from ``/bin/sh``
|
||||
to ``/bin/sh -e`` to ensure that complex recipes correctly fail after an error.
|
||||
Previously, ``make install`` could fail to install some files and yet return
|
||||
a successful result.
|
@ -1 +0,0 @@
|
||||
Extended workaround defining ``static_assert`` when missing from the libc headers to all clang and gcc builds. In particular, this fixes building on macOS <= 10.10.
|
@ -1,4 +0,0 @@
|
||||
The ``TKINTER_PROTECT_LOADTK`` macro is no longer defined or used in the
|
||||
``_tkinter`` module. It was previously only defined when building against
|
||||
Tk 8.4.13 and older, but Tk older than 8.5.12 has been unsupported since
|
||||
gh-issue-91152.
|
@ -1 +0,0 @@
|
||||
Add gcc fallback of mkfifoat/mknodat for macOS. Patch by Dong-hee Na.
|
@ -1 +0,0 @@
|
||||
Define ``.PHONY`` / virtual make targets consistently and properly.
|
@ -1 +0,0 @@
|
||||
``PYTHON_FOR_REGEN`` now require Python 3.10 or newer.
|
@ -1,4 +0,0 @@
|
||||
BOLT optimization is now applied to the libpython shared library if building
|
||||
a shared library. BOLT instrumentation and application settings can now be
|
||||
influenced via the ``BOLT_INSTRUMENT_FLAGS`` and ``BOLT_APPLY_FLAGS``
|
||||
configure variables.
|
@ -1,6 +0,0 @@
|
||||
Add unstable C-API functions to get the code object, lasti and line number from
|
||||
the internal ``_PyInterpreterFrame`` in the limited API. The functions are:
|
||||
|
||||
* ``PyCodeObject * PyUnstable_InterpreterFrame_GetCode(struct _PyInterpreterFrame *frame)``
|
||||
* ``int PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame *frame)``
|
||||
* ``int PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame)``
|
@ -1,4 +0,0 @@
|
||||
Add support of more formatting options (left aligning, octals, uppercase
|
||||
hexadecimals, :c:expr:`intmax_t`, :c:expr:`ptrdiff_t`, :c:expr:`wchar_t` C
|
||||
strings, variable width and precision) in :c:func:`PyUnicode_FromFormat` and
|
||||
:c:func:`PyUnicode_FromFormatV`.
|
@ -1,2 +0,0 @@
|
||||
:c:func:`PyObject_GC_Resize` should calculate preheader size if needed.
|
||||
Patch by Dong-hee Na.
|
@ -1 +0,0 @@
|
||||
Add a new C-API function to eagerly assign a version tag to a PyTypeObject: ``PyUnstable_Type_AssignVersionTag()``.
|
@ -1,5 +0,0 @@
|
||||
Added C API for extending types whose instance memory layout is opaque:
|
||||
:c:member:`PyType_Spec.basicsize` can now be zero or negative,
|
||||
:c:func:`PyObject_GetTypeData` can be used to get subclass-specific data,
|
||||
and :c:macro:`Py_TPFLAGS_ITEMS_AT_END` can be used to safely extend
|
||||
variable-size objects. See :pep:`697` for details.
|
@ -1,5 +0,0 @@
|
||||
Introduced :c:func:`PyUnstable_WritePerfMapEntry`, :c:func:`PyUnstable_PerfMapState_Init` and
|
||||
:c:func:`PyUnstable_PerfMapState_Fini`. These allow extension modules (JIT compilers in
|
||||
particular) to write to perf-map files in a thread safe manner. The
|
||||
:doc:`../howto/perf_profiling` also uses these APIs to write
|
||||
entries in the perf-map file.
|
@ -1,2 +0,0 @@
|
||||
Add :c:func:`PyUnstable_Object_GC_NewWithExtraData` function that can be used to
|
||||
allocate additional memory after an object for data not managed by Python.
|
@ -1,4 +0,0 @@
|
||||
:c:func:`PyType_FromSpec` and its variants now allow creating classes whose
|
||||
metaclass overrides :c:member:`~PyTypeObject.tp_new`. The ``tp_new`` is
|
||||
ignored. This behavior is deprecated and will be disallowed in 3.14+. The
|
||||
new :c:func:`PyType_FromMetaclass` already disallows it.
|
@ -1,5 +0,0 @@
|
||||
We've added ``Py_NewInterpreterFromConfig()`` and ``PyInterpreterConfig`` to
|
||||
the public C-API (but not the stable ABI; not yet at least). The new
|
||||
function may be used to create a new interpreter with various features
|
||||
configured. The function was added to support PEP 684 (per-interpreter
|
||||
GIL).
|
@ -1,3 +0,0 @@
|
||||
Added unstable C API for extracting the value of "compact" integers:
|
||||
:c:func:`PyUnstable_Long_IsCompact` and
|
||||
:c:func:`PyUnstable_Long_CompactValue`.
|
@ -1 +0,0 @@
|
||||
Fix :func:`!pause_reading` to work when called from :func:`!connection_made` in :mod:`asyncio`.
|
@ -1,2 +0,0 @@
|
||||
``len()`` for 0-dimensional :class:`memoryview`` objects (such as ``memoryview(ctypes.c_uint8(42))``) now raises a :exc:`TypeError`.
|
||||
Previously this returned ``1``, which was not consistent with ``mem_0d[0]`` raising an :exc:`IndexError``.
|
@ -1,3 +0,0 @@
|
||||
Complex function calls are now faster and consume no C stack
|
||||
space.
|
||||
|
@ -1,2 +0,0 @@
|
||||
Bypass instance attribute access of ``__name__`` in ``repr`` of
|
||||
:class:`weakref.ref`.
|
@ -1,2 +0,0 @@
|
||||
:pep:`709`: inline list, dict and set comprehensions to improve performance
|
||||
and reduce bytecode size.
|
@ -1,3 +0,0 @@
|
||||
Make the buffer protocol accessible in Python code using the new
|
||||
``__buffer__`` and ``__release_buffer__`` magic methods. See :pep:`688` for
|
||||
details. Patch by Jelle Zijlstra.
|
@ -1 +0,0 @@
|
||||
Reduce the number of inline :opcode:`CACHE` entries for :opcode:`CALL`.
|
@ -1 +0,0 @@
|
||||
Implement :pep:`669` Low Impact Monitoring for CPython.
|
@ -1 +0,0 @@
|
||||
Allow built-in modules to be submodules. This allows submodules to be statically linked into a CPython binary.
|
@ -1,3 +0,0 @@
|
||||
The implementation of PEP-683 which adds Immortal Objects by using a fixed
|
||||
reference count that skips reference counting to make objects truly
|
||||
immutable.
|
@ -1,3 +0,0 @@
|
||||
We've replaced our use of ``_PyRuntime.tstate_current`` with a thread-local
|
||||
variable. This is a fairly low-level implementation detail, and there
|
||||
should be no change in behavior.
|
@ -1,2 +0,0 @@
|
||||
Migrate :meth:`~ssl.SSLContext.set_ecdh_curve` method not to use deprecated
|
||||
OpenSSL APIs. Patch by Dong-hee Na.
|
@ -1 +0,0 @@
|
||||
:exc:`AttributeError` now retains the ``name`` attribute when pickled and unpickled.
|
@ -1,3 +0,0 @@
|
||||
Exceptions raised in a typeobject's ``__set_name__`` method are no longer
|
||||
wrapped by a :exc:`RuntimeError`. Context information is added to the
|
||||
exception as a :pep:`678` note.
|
@ -1,5 +0,0 @@
|
||||
The bitwise inversion operator (``~``) on bool is deprecated.
|
||||
It returns the bitwise inversion of the underlying ``int`` representation such that
|
||||
``bool(~True) == True``, which can be confusing. Use ``not`` for logical negation
|
||||
of bools. In the rare case that you really need the bitwise inversion of the underlying ``int``,
|
||||
convert to int explicitly ``~int(x)``.
|
@ -1,3 +0,0 @@
|
||||
Change the internal offset distinguishing yield and return target addresses,
|
||||
so that the instruction pointer is correct for exception handling and other
|
||||
stack unwinding.
|
@ -1,4 +0,0 @@
|
||||
Add :opcode:`LOAD_SUPER_ATTR` (and a specialization for ``super().method()``) to
|
||||
speed up ``super().method()`` and ``super().attr``. This makes
|
||||
``super().method()`` roughly 2.3x faster and brings it within 20% of the
|
||||
performance of a simple method call. Patch by Vladimir Matveev and Carl Meyer.
|
@ -1 +0,0 @@
|
||||
Clarify :exc:`SyntaxWarning` with literal ``is`` comparison by specifying which literal is problematic, since comparisons using ``is`` with e.g. None and bool literals are idiomatic.
|
@ -1 +0,0 @@
|
||||
Fix bug in line numbers of instructions emitted for :keyword:`except* <except_star>`.
|
@ -1 +0,0 @@
|
||||
Clarify the error message raised when the called part of a class pattern isn't actually a class.
|
@ -1 +0,0 @@
|
||||
Implement the required C tokenizer changes for PEP 701. Patch by Pablo Galindo Salgado, Lysandros Nikolaou, Batuhan Taskaya, Marta Gómez Macías and sunmy2019.
|
@ -1 +0,0 @@
|
||||
Change the perf map format to remove the '0x' prefix from the addresses
|
@ -1 +0,0 @@
|
||||
Do not wrap a single exception raised from a ``try-except*`` construct in an :exc:`ExceptionGroup`.
|
@ -1 +0,0 @@
|
||||
Change the error range for invalid bytes literals.
|
@ -1,3 +0,0 @@
|
||||
Optimized asyncio Task creation by deferring expensive string formatting
|
||||
(task name generation) from Task creation to the first time ``get_name`` is
|
||||
called. This makes asyncio benchmarks up to 5% faster.
|
@ -1 +0,0 @@
|
||||
Adds three minor linting fixes to the wasm module caught that were caught by ruff.
|
@ -1,23 +0,0 @@
|
||||
Implement :pep:`695`, adding syntactic support for generic classes, generic
|
||||
functions, and type aliases.
|
||||
|
||||
A new ``type X = ...`` syntax is added for type aliases, which resolves at
|
||||
runtime to an instance of the new class ``typing.TypeAliasType``.
|
||||
The value is lazily evaluated and is accessible through the ``.__value__``
|
||||
attribute. This is implemented as a new AST node ``ast.TypeAlias``.
|
||||
|
||||
New syntax (``class X[T]: ...``, ``def func[T](): ...``) is added for defining
|
||||
generic functions and classes. This is implemented as a new
|
||||
``type_params`` attribute on the AST nodes for classes and functions.
|
||||
This node holds instances of the new AST classes ``ast.TypeVar``,
|
||||
``ast.ParamSpec``, and ``ast.TypeVarTuple``.
|
||||
|
||||
``typing.TypeVar``, ``typing.ParamSpec``, ``typing.ParamSpecArgs``,
|
||||
``typing.ParamSpecKwargs``, ``typing.TypeVarTuple``, and
|
||||
``typing.Generic`` are now implemented in C rather than Python.
|
||||
|
||||
There are new bytecode instructions ``LOAD_LOCALS``,
|
||||
``LOAD_CLASSDICT_OR_GLOBAL``, and ``LOAD_CLASSDICT_OR_DEREF``
|
||||
to support correct resolution of names in class namespaces.
|
||||
|
||||
Patch by Eric Traut, Larry Hastings, and Jelle Zijlstra.
|
@ -1 +0,0 @@
|
||||
Remove both line and instruction instrumentation before adding new ones for monitoring, to avoid newly added instrumentation being removed immediately.
|
@ -1,3 +0,0 @@
|
||||
Provide a helpful hint in the :exc:`TypeError` message when accidentally
|
||||
calling a :term:`module` object that has a callable attribute of the same
|
||||
name (such as :func:`dis.dis` or :class:`datetime.datetime`).
|
@ -1,2 +0,0 @@
|
||||
Don't modify the refcounts of known immortal objects (:const:`True`,
|
||||
:const:`False`, and :const:`None`) in the main interpreter loop.
|
@ -1,3 +0,0 @@
|
||||
Improve handling of edge cases in showing ``Exception.__notes__``. Ensures
|
||||
that the messages always end with a newline and that string/bytes are not
|
||||
exploded over multiple lines. Patch by Carey Metcalfe.
|
@ -1 +0,0 @@
|
||||
Fix performance loss when accessing an object's attributes with ``__getattr__`` defined.
|
@ -1 +0,0 @@
|
||||
Disallow the "z" format specifier in %-format of bytes objects.
|
@ -1,2 +0,0 @@
|
||||
Reduce object creation while calling callback function from gc.
|
||||
Patch by Dong-hee Na.
|
@ -1,2 +0,0 @@
|
||||
Improve the performance of :func:`hasattr` for module objects with a missing
|
||||
attribute.
|
@ -1 +0,0 @@
|
||||
Improve the performance of :c:func:`PyObject_HasAttrString`
|
@ -1,2 +0,0 @@
|
||||
Fix an issue where :class:`list` or :class:`tuple` repetition could fail to
|
||||
respect :pep:`683`.
|
@ -1,6 +0,0 @@
|
||||
Multi-phase init extension modules may now indicate whether or not they
|
||||
actually support multiple interpreters. By default such modules are
|
||||
expected to support use in multiple interpreters. In the uncommon case that
|
||||
one does not, it may use the new ``Py_mod_multiple_interpreters`` module def
|
||||
slot. A value of ``0`` means the module does not support them. ``1`` means
|
||||
it does. The default is ``1``.
|
@ -1,6 +0,0 @@
|
||||
The GIL is now (optionally) per-interpreter. This is the fundamental change
|
||||
for PEP 684. This is all made possible by virtue of the isolated state of
|
||||
each interpreter in the process. The behavior of the main interpreter
|
||||
remains unchanged. Likewise, interpreters created using
|
||||
``Py_NewInterpreter()`` are not affected. To get an interpreter with its
|
||||
own GIL, call ``Py_NewInterpreterFromConfig()``.
|
@ -1,11 +0,0 @@
|
||||
Multi-phase init extension modules may now indicate that they support
|
||||
running in subinterpreters that have their own GIL. This is done by using
|
||||
``Py_MOD_PER_INTERPRETER_GIL_SUPPORTED`` as the value for the
|
||||
``Py_mod_multiple_interpreters`` module def slot. Otherwise the module, by
|
||||
default, cannot be imported in such subinterpreters. (This does not affect
|
||||
the main interpreter or subinterpreters that do not have their own GIL.) In
|
||||
addition to the isolation that multi-phase init already normally requires,
|
||||
support for per-interpreter GIL involves one additional constraint:
|
||||
thread-safety. If the module has external (linked) dependencies and those
|
||||
libraries have any state that isn't thread-safe then the module must do the
|
||||
additional work to add thread-safety. This should be an uncommon case.
|
@ -1,6 +0,0 @@
|
||||
Fix ``float("nan")`` to produce a quiet NaN on platforms (like MIPS) where
|
||||
the meaning of the signalling / quiet bit is inverted from its usual
|
||||
meaning. Also introduce a new macro ``Py_INFINITY`` matching C99's
|
||||
``INFINITY``, and refactor internals to rely on C99's ``NAN`` and
|
||||
``INFINITY`` macros instead of hard-coding bit patterns for infinities and
|
||||
NaNs. Thanks Sebastian Berg.
|
@ -1,5 +0,0 @@
|
||||
Change behavior of ``sys.monitoring.events.LINE`` events in
|
||||
``sys.monitoring``: Line events now occur when a new line is reached
|
||||
dynamically, instead of using a static approximation, as before. This makes
|
||||
the behavior very similar to that of "line" events in ``sys.settrace``. This
|
||||
should ease porting of tools from 3.11 to 3.12.
|
@ -1,2 +0,0 @@
|
||||
Fix an issue where some :term:`bytecode` instructions could ignore
|
||||
:pep:`523` when "inlining" calls.
|
@ -1,5 +0,0 @@
|
||||
Do not add a frame to the traceback in the ``sys.setprofile`` and
|
||||
``sys.settrace`` trampoline functions. This ensures that frames are not
|
||||
duplicated if an exception is raised in the callback function, and ensures
|
||||
that frames are not omitted if a C callback is used and that does not add the
|
||||
frame.
|
@ -1 +0,0 @@
|
||||
Fix three error handling bugs in ast.c's validation of pattern matching statements.
|
@ -1,2 +0,0 @@
|
||||
Improve syntax error message for invalid constructs in :pep:`695` contexts
|
||||
and in annotations when ``from __future__ import annotations`` is active.
|
@ -1,2 +0,0 @@
|
||||
Fix wrong ordering of assignments in code like ``a, a = x, y``. Contributed by
|
||||
Carl Meyer.
|
@ -1 +0,0 @@
|
||||
Implement PEP 701 changes in the :mod:`tokenize` module. Patch by Marta Gómez Macías and Pablo Galindo Salgado
|
@ -1 +0,0 @@
|
||||
Fix extension type from documentation for compiling in C++20 mode
|
@ -1,2 +0,0 @@
|
||||
Add support for Unicode Path Extra Field in ZipFile. Patch by Yeojin Kim
|
||||
and Andrea Giudiceandrea
|
@ -1 +0,0 @@
|
||||
Clarifying documentation about the url parameter to urllib.request.urlopen and urllib.request.Requst needing to be encoded properly.
|
@ -1,2 +0,0 @@
|
||||
Mention the new way of typing ``**kwargs`` with ``Unpack`` and ``TypedDict``
|
||||
introduced in :pep:`692`.
|
@ -1,2 +0,0 @@
|
||||
Document that the effect of registering or unregistering an :mod:`atexit`
|
||||
cleanup function from within a registered cleanup function is undefined.
|
@ -1 +0,0 @@
|
||||
Fix IDLE test hang on macOS.
|
@ -1 +0,0 @@
|
||||
About prints both tcl and tk versions if different (expected someday).
|
@ -1 +0,0 @@
|
||||
Fix completions for Tk Aqua 8.7 (currently blank).
|
@ -1,3 +0,0 @@
|
||||
http.client CONNECT method tunnel improvements: Use HTTP 1.1 protocol; send
|
||||
a matching Host: header with CONNECT, if one is not provided; convert IDN
|
||||
domain names to Punycode. Patch by Michael Handler.
|
@ -1 +0,0 @@
|
||||
Make :func:`asyncio.subprocess.Process.communicate` close the subprocess's stdin even when called with ``input=None``.
|
@ -1,2 +0,0 @@
|
||||
:mod:`multiprocessing` now supports stronger HMAC algorithms for inter-process
|
||||
connection authentication rather than only HMAC-MD5.
|
@ -1,3 +0,0 @@
|
||||
Added :meth:`http.client.HTTPConnection.get_proxy_response_headers` that
|
||||
provides access to the HTTP headers on a proxy server response to the
|
||||
``CONNECT`` request.
|
@ -1,2 +0,0 @@
|
||||
Add :data:`~csv.QUOTE_STRINGS` and :data:`~csv.QUOTE_NOTNULL` to the suite
|
||||
of :mod:`csv` module quoting styles.
|
@ -1,5 +0,0 @@
|
||||
Fixed the bug in :meth:`pathlib.Path.glob` -- previously a dangling symlink
|
||||
would not be found by this method when the pattern is an exact match, but
|
||||
would be found when the pattern contains a wildcard or the recursive
|
||||
wildcard (``**``). With this change, a dangling symlink will be found in
|
||||
both cases.
|
@ -1 +0,0 @@
|
||||
Enables :mod:`webbrowser` to detect and launch Microsoft Edge browser.
|
@ -1,4 +0,0 @@
|
||||
Deprecation warnings are now emitted for :class:`!ast.Num`,
|
||||
:class:`!ast.Bytes`, :class:`!ast.Str`, :class:`!ast.NameConstant` and
|
||||
:class:`!ast.Ellipsis`. These have been documented as deprecated since Python
|
||||
3.8, and will be removed in Python 3.14.
|
@ -1,3 +0,0 @@
|
||||
When creating zip files using :mod:`zipfile`, ``os.altsep``, if not ``None``,
|
||||
will always be treated as a path separator even when it is not ``/``.
|
||||
Patch by Carey Metcalfe.
|
@ -1 +0,0 @@
|
||||
Convert private :meth:`_posixsubprocess.fork_exec` to use Argument Clinic.
|
@ -1,2 +0,0 @@
|
||||
Make :func:`tempfile.mkdtemp` return absolute paths when its *dir*
|
||||
parameter is relative.
|
@ -1 +0,0 @@
|
||||
Support multiple steps in :func:`math.nextafter`. Patch by Shantanu Jain and Matthias Gorgens.
|
@ -1 +0,0 @@
|
||||
Fix potential file descriptor leaks in :class:`subprocess.Popen`.
|
@ -1 +0,0 @@
|
||||
Support divert(4) added in FreeBSD 14.
|
@ -1 +0,0 @@
|
||||
Fix potential deadlock in pty.spawn()
|
@ -1,2 +0,0 @@
|
||||
Remove more deprecated importlib APIs: ``find_loader()``, ``find_module()``,
|
||||
``importlib.abc.Finder``, ``pkgutil.ImpImporter``, ``pkgutil.ImpLoader``.
|
@ -1,3 +0,0 @@
|
||||
Flatten arguments in :meth:`tkinter.Canvas.coords`. It now accepts not only
|
||||
``x1, y1, x2, y2, ...`` and ``[x1, y1, x2, y2, ...]``, but also ``(x1, y1),
|
||||
(x2, y2), ...`` and ``[(x1, y1), (x2, y2), ...]``.
|
@ -1,2 +0,0 @@
|
||||
Deprecate :func:`pkgutil.find_loader` and :func:`pkgutil.get_loader`
|
||||
in favor of :func:`importlib.util.find_spec`.
|
@ -1 +0,0 @@
|
||||
Remove the long-deprecated ``imp`` module.
|
@ -1,3 +0,0 @@
|
||||
Respect the :class:`http.client.HTTPConnection` ``.debuglevel`` flag
|
||||
in :class:`urllib.request.AbstractHTTPHandler` when its constructor
|
||||
parameter ``debuglevel`` is not set. And do the same for ``*HTTPS*``.
|
@ -1 +0,0 @@
|
||||
Remove the bundled setuptools wheel from ``ensurepip``, and stop installing setuptools in environments created by ``venv``.
|
@ -1,2 +0,0 @@
|
||||
Decrease execution time of some :mod:`gzip` file writes by 15% by
|
||||
adding more appropriate buffering.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user