Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eea02f9

Browse files
committed
Catch up with main
2 parents 53d066e + f082098 commit eea02f9

187 files changed

Lines changed: 3191 additions & 1706 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Python/traceback.c @iritkatriel
6363
# bytecode.
6464
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6565
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
66-
**/*importlib/resources/* @jaraco @warsaw @brettcannon @FFY00
66+
**/*importlib/resources/* @jaraco @warsaw @FFY00
6767
**/importlib/metadata/* @jaraco @warsaw
6868

6969
# Dates and times
@@ -144,7 +144,7 @@ Lib/ast.py @isidentical
144144
**/*cgi* @ethanfurman
145145
**/*tarfile* @ethanfurman
146146

147-
**/*tomllib* @encukou
147+
**/*tomllib* @encukou @hauntsaninja
148148

149149
**/*sysconfig* @FFY00
150150

@@ -153,7 +153,7 @@ Lib/ast.py @isidentical
153153
**/*osx_support* @python/macos-team
154154

155155
# pathlib
156-
**/*pathlib* @brettcannon
156+
**/*pathlib* @barneygale
157157

158158
# zipfile.Path
159159
**/*zipfile/*_path.py @jaraco

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: "Check PRs"
18-
uses: actions/stale@v6
18+
uses: actions/stale@v7
1919
with:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
2121
stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity.'

Doc/c-api/init.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ code, or when embedding the Python interpreter:
10491049
.. versionchanged:: 3.2
10501050
This function cannot be called before :c:func:`Py_Initialize()` anymore.
10511051
1052-
.. deprecated-removed:: 3.9 3.11
1052+
.. deprecated:: 3.9
10531053
10541054
.. index:: module: _thread
10551055
@@ -1063,7 +1063,7 @@ code, or when embedding the Python interpreter:
10631063
.. versionchanged:: 3.7
10641064
The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`.
10651065
1066-
.. deprecated-removed:: 3.9 3.11
1066+
.. deprecated:: 3.9
10671067
10681068
10691069
.. c:function:: PyThreadState* PyEval_SaveThread()

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ slot typedefs
452452
| | | |
453453
| | :c:type:`PyObject` * | |
454454
| | :c:type:`Py_ssize_t` | |
455+
| | :c:type:`PyObject` * | |
455456
+-----------------------------+-----------------------------+----------------------+
456457
| :c:type:`objobjproc` | .. line-block:: | int |
457458
| | | |
@@ -2633,7 +2634,7 @@ Slot Type typedefs
26332634
26342635
.. c:type:: PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t)
26352636
2636-
.. c:type:: int (*ssizeobjargproc)(PyObject *, Py_ssize_t)
2637+
.. c:type:: int (*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *)
26372638
26382639
.. c:type:: int (*objobjproc)(PyObject *, PyObject *)
26392640

Doc/copyright.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright
44

55
Python and this documentation is:
66

7-
Copyright © 2001-2022 Python Software Foundation. All rights reserved.
7+
Copyright © 2001-2023 Python Software Foundation. All rights reserved.
88

99
Copyright © 2000 BeOpen.com. All rights reserved.
1010

Doc/library/curses.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,11 +1297,11 @@ the following methods and attributes:
12971297
:meth:`refresh`.
12981298

12991299

1300-
.. method:: window.vline(ch, n)
1301-
window.vline(y, x, ch, n)
1300+
.. method:: window.vline(ch, n[, attr])
1301+
window.vline(y, x, ch, n[, attr])
13021302

13031303
Display a vertical line starting at ``(y, x)`` with length *n* consisting of the
1304-
character *ch*.
1304+
character *ch* with attributes *attr*.
13051305

13061306

13071307
Constants

Doc/library/dataclasses.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ parameters to :meth:`__post_init__`. Also see the warning about how
552552
Class variables
553553
---------------
554554

555-
One of two places where :func:`dataclass` actually inspects the type
555+
One of the few places where :func:`dataclass` actually inspects the type
556556
of a field is to determine if a field is a class variable as defined
557557
in :pep:`526`. It does this by checking if the type of the field is
558558
``typing.ClassVar``. If a field is a ``ClassVar``, it is excluded
@@ -563,7 +563,7 @@ module-level :func:`fields` function.
563563
Init-only variables
564564
-------------------
565565

566-
The other place where :func:`dataclass` inspects a type annotation is to
566+
Another place where :func:`dataclass` inspects a type annotation is to
567567
determine if a field is an init-only variable. It does this by seeing
568568
if the type of a field is of type ``dataclasses.InitVar``. If a field
569569
is an ``InitVar``, it is considered a pseudo-field called an init-only

Doc/library/dis.rst

Lines changed: 19 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,6 @@ The Python compiler currently generates the following bytecode instructions.
460460
Unary operations take the top of the stack, apply the operation, and push the
461461
result back on the stack.
462462

463-
.. opcode:: UNARY_POSITIVE
464-
465-
Implements ``TOS = +TOS``.
466-
467463

468464
.. opcode:: UNARY_NEGATIVE
469465

@@ -607,15 +603,6 @@ the original TOS1.
607603
.. versionadded:: 3.12
608604

609605

610-
.. opcode:: STOPITERATION_ERROR
611-
612-
Handles a StopIteration raised in a generator or coroutine.
613-
If TOS is an instance of :exc:`StopIteration`, or :exc:`StopAsyncIteration`
614-
replace it with a :exc:`RuntimeError`.
615-
616-
.. versionadded:: 3.12
617-
618-
619606
.. opcode:: BEFORE_ASYNC_WITH
620607

621608
Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the
@@ -627,13 +614,6 @@ the original TOS1.
627614

628615
**Miscellaneous opcodes**
629616

630-
.. opcode:: PRINT_EXPR
631-
632-
Implements the expression statement for the interactive mode. TOS is removed
633-
from the stack and printed. In non-interactive mode, an expression statement
634-
is terminated with :opcode:`POP_TOP`.
635-
636-
637617
.. opcode:: SET_ADD (i)
638618

639619
Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions.
@@ -682,13 +662,6 @@ iterations of the loop.
682662
.. versionadded:: 3.6
683663

684664

685-
.. opcode:: IMPORT_STAR
686-
687-
Loads all symbols not starting with ``'_'`` directly from the module TOS to
688-
the local namespace. The module is popped after loading all names. This
689-
opcode implements ``from module import *``.
690-
691-
692665
.. opcode:: POP_EXCEPT
693666

694667
Pops a value from the stack, which is used to restore the exception state.
@@ -929,13 +902,6 @@ iterations of the loop.
929902
.. versionadded:: 3.6
930903

931904

932-
.. opcode:: LIST_TO_TUPLE
933-
934-
Pops a list from the stack and pushes a tuple containing the same values.
935-
936-
.. versionadded:: 3.9
937-
938-
939905
.. opcode:: LIST_EXTEND (i)
940906

941907
Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists.
@@ -1395,14 +1361,6 @@ iterations of the loop.
13951361
.. versionadded:: 3.11
13961362

13971363

1398-
.. opcode:: ASYNC_GEN_WRAP
1399-
1400-
Wraps the value on top of the stack in an ``async_generator_wrapped_value``.
1401-
Used to yield in async generators.
1402-
1403-
.. versionadded:: 3.11
1404-
1405-
14061364
.. opcode:: HAVE_ARGUMENT
14071365

14081366
This is not really an opcode. It identifies the dividing line between
@@ -1422,6 +1380,25 @@ iterations of the loop.
14221380
they use their arg.
14231381

14241382

1383+
.. opcode:: CALL_INTRINSIC_1
1384+
1385+
Calls an intrinsic function with one argument. Passes the TOS as the argument
1386+
and sets TOS to the result. Used to implement functionality that is necessary
1387+
but not performance critical.
1388+
1389+
The operand determines which intrinsic function is called:
1390+
1391+
* ``0`` Not valid
1392+
* ``1`` Prints the argument to standard out. Used in the REPL.
1393+
* ``2`` Performs ``import *`` for the named module.
1394+
* ``3`` Extracts the return value from a ``StopIteration`` exception.
1395+
* ``4`` Wraps an aync generator value
1396+
* ``5`` Performs the unary ``+`` operation
1397+
* ``6`` Converts a list to a tuple
1398+
1399+
.. versionadded:: 3.12
1400+
1401+
14251402
**Pseudo-instructions**
14261403

14271404
These opcodes do not appear in python bytecode, they are used by the compiler

Doc/library/enum.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -807,9 +807,9 @@ Utilities and Decorators
807807
call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value.
808808
For *Enum* and *IntEnum* that appropriate value will be the last value plus
809809
one; for *Flag* and *IntFlag* it will be the first power-of-two greater
810-
than the last value; for *StrEnum* it will be the lower-cased version of the
811-
member's name. Care must be taken if mixing *auto()* with manually specified
812-
values.
810+
than the highest value; for *StrEnum* it will be the lower-cased version of
811+
the member's name. Care must be taken if mixing *auto()* with manually
812+
specified values.
813813

814814
*auto* instances are only resolved when at the top level of an assignment:
815815

Doc/library/fractions.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ another rational number, or from a string.
117117

118118
.. versionadded:: 3.8
119119

120+
.. method:: is_integer()
121+
122+
Return ``True`` if the Fraction is an integer.
123+
124+
.. versionadded:: 3.12
125+
120126
.. classmethod:: from_float(flt)
121127

122128
Alternative constructor which only accepts instances of

0 commit comments

Comments
 (0)