Skip to content

Commit

Permalink
Merge branch 'main' into range-iter
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Sep 15, 2021
2 parents 175b0d3 + 9f93018 commit 22f76b8
Show file tree
Hide file tree
Showing 254 changed files with 3,168 additions and 2,978 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Objects/clinic/*.h linguist-generated=true
PC/clinic/*.h linguist-generated=true
Python/clinic/*.h linguist-generated=true
Python/frozen_modules/*.h linguist-generated=true
Python/frozen_modules/MANIFEST linguist-generated=true
Include/internal/pycore_ast.h linguist-generated=true
Python/Python-ast.c linguist-generated=true
Include/opcode.h linguist-generated=true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
strategy:
fail-fast: false
matrix:
openssl_ver: [1.1.1l, 3.0.0-beta1]
openssl_ver: [1.1.1l, 3.0.0]
env:
OPENSSL_VER: ${{ matrix.openssl_ver }}
MULTISSL_DIR: ${{ github.workspace }}/multissl
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ Tools/msi/obj
Tools/ssl/amd64
Tools/ssl/win32

# TODO: Once we auto-regen frozem modules for Windows builds
# we can drop the .h files from the repo and ignore them here.
# At that point we will rely the frozen manifest file to identify
# changed generated files. We'll drop the entry for it then.
# See: Tools/scripts/freeze_modules.py.
#Python/frozen_modules/*.h

# Two-trick pony for OSX and other case insensitive file systems:
# Ignore ./python binary on Unix but still look into ./Python/ directory.
/python
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/iter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ There are two functions specifically for working with iterators.
Return non-zero if the object *o* supports the iterator protocol, and ``0``
otherwise. This function always succeeds.
.. c:function:: int PyAiter_Check(PyObject *o)
.. c:function:: int PyAIter_Check(PyObject *o)
Returns non-zero if the object 'obj' provides :class:`AsyncIterator`
protocols, and ``0`` otherwise. This function always succeeds.
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ Object Protocol
iterated.
.. c:function:: PyObject* PyObject_GetAiter(PyObject *o)
.. c:function:: PyObject* PyObject_GetAIter(PyObject *o)
This is the equivalent to the Python expression ``aiter(o)``. Takes an
:class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it.
Expand Down
13 changes: 10 additions & 3 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ the definition of all other Python objects.
Return a :term:`borrowed reference`.
The :c:func:`Py_SET_TYPE` function must be used to set an object type.
Use the :c:func:`Py_SET_TYPE` function to set an object type.
.. versionchanged:: 3.11
:c:func:`Py_TYPE()` is changed to an inline static function.
.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type)
Expand All @@ -121,9 +124,10 @@ the definition of all other Python objects.
Get the reference count of the Python object *o*.
Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count.
.. versionchanged:: 3.10
:c:func:`Py_REFCNT()` is changed to the inline static function.
Use :c:func:`Py_SET_REFCNT()` to set an object reference count.
.. c:function:: void Py_SET_REFCNT(PyObject *o, Py_ssize_t refcnt)
Expand All @@ -137,7 +141,10 @@ the definition of all other Python objects.
Get the size of the Python object *o*.
The :c:func:`Py_SET_SIZE` function must be used to set an object size.
Use the :c:func:`Py_SET_SIZE` function to set an object size.
.. versionchanged:: 3.11
:c:func:`Py_SIZE()` is changed to an inline static function.
.. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size)
Expand Down
8 changes: 4 additions & 4 deletions Doc/data/refcounts.dat
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,8 @@ PyInterpreterState_New:PyInterpreterState*:::
PyIter_Check:int:::
PyIter_Check:PyObject*:o:0:

PyAiter_Check:int:::
PyAiter_Check:PyObject*:o:0:
PyAIter_Check:int:::
PyAIter_Check:PyObject*:o:0:

PyIter_Next:PyObject*::+1:
PyIter_Next:PyObject*:o:0:
Expand Down Expand Up @@ -1700,8 +1700,8 @@ PyObject_GetItem:PyObject*:key:0:
PyObject_GetIter:PyObject*::+1:
PyObject_GetIter:PyObject*:o:0:

PyObject_GetAiter:PyObject*::+1:
PyObject_GetAiter:PyObject*:o:0:
PyObject_GetAIter:PyObject*::+1:
PyObject_GetAIter:PyObject*:o:0:

PyObject_HasAttr:int:::
PyObject_HasAttr:PyObject*:o:0:
Expand Down
4 changes: 2 additions & 2 deletions Doc/data/stable_abi.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
role,name,added,ifdef_note
function,PyAiter_Check,3.10,
function,PyAIter_Check,3.10,
function,PyArg_Parse,3.2,
function,PyArg_ParseTuple,3.2,
function,PyArg_ParseTupleAndKeywords,3.2,
Expand Down Expand Up @@ -491,7 +491,7 @@ function,PyObject_GenericGetAttr,3.2,
function,PyObject_GenericGetDict,3.10,
function,PyObject_GenericSetAttr,3.2,
function,PyObject_GenericSetDict,3.7,
function,PyObject_GetAiter,3.10,
function,PyObject_GetAIter,3.10,
function,PyObject_GetAttr,3.2,
function,PyObject_GetAttrString,3.2,
function,PyObject_GetItem,3.2,
Expand Down
16 changes: 0 additions & 16 deletions Doc/distutils/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1852,22 +1852,6 @@ Subclasses of :class:`Command` must define the following methods.
.. % todo
:mod:`distutils.command.bdist_msi` --- Build a Microsoft Installer binary package
=================================================================================

.. module:: distutils.command.bdist_msi
:synopsis: Build a binary distribution as a Windows MSI file

.. class:: bdist_msi

.. deprecated:: 3.9
Use bdist_wheel (wheel packages) instead.

Builds a `Windows Installer`_ (.msi) binary package.

.. _Windows Installer: https://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx


:mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a Redhat RPM and SRPM
===========================================================================================

Expand Down
5 changes: 0 additions & 5 deletions Doc/distutils/builtdist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ generated by each, are:
+--------------------------+-------------------------------------+
| :command:`bdist_rpm` | rpm, srpm |
+--------------------------+-------------------------------------+
| :command:`bdist_msi` | msi |
+--------------------------+-------------------------------------+

.. note::
bdist_msi is deprecated since Python 3.9.

The following sections give details on the individual :command:`bdist_\*`
commands.
Expand Down
38 changes: 19 additions & 19 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -493,24 +493,9 @@ Opening network connections
.. coroutinemethod:: loop.create_datagram_endpoint(protocol_factory, \
local_addr=None, remote_addr=None, *, \
family=0, proto=0, flags=0, \
reuse_address=None, reuse_port=None, \
reuse_port=None, \
allow_broadcast=None, sock=None)
.. note::
The parameter *reuse_address* is no longer supported, as using
:py:data:`~sockets.SO_REUSEADDR` poses a significant security concern for
UDP. Explicitly passing ``reuse_address=True`` will raise an exception.

When multiple processes with differing UIDs assign sockets to an
identical UDP socket address with ``SO_REUSEADDR``, incoming packets can
become randomly distributed among the sockets.

For supported platforms, *reuse_port* can be used as a replacement for
similar functionality. With *reuse_port*,
:py:data:`~sockets.SO_REUSEPORT` is used instead, which specifically
prevents processes with differing UIDs from assigning sockets to the same
socket address.

Create a datagram connection.

The socket family can be either :py:data:`~socket.AF_INET`,
Expand Down Expand Up @@ -557,16 +542,31 @@ Opening network connections
:ref:`UDP echo server protocol <asyncio-udp-echo-server-protocol>` examples.

.. versionchanged:: 3.4.4
The *family*, *proto*, *flags*, *reuse_address*, *reuse_port,
The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*,
*allow_broadcast*, and *sock* parameters were added.

.. versionchanged:: 3.8.1
The *reuse_address* parameter is no longer supported due to security
concerns.
The *reuse_address* parameter is no longer supported, as using
:py:data:`~sockets.SO_REUSEADDR` poses a significant security concern for
UDP. Explicitly passing ``reuse_address=True`` will raise an exception.

When multiple processes with differing UIDs assign sockets to an
identical UDP socket address with ``SO_REUSEADDR``, incoming packets can
become randomly distributed among the sockets.

For supported platforms, *reuse_port* can be used as a replacement for
similar functionality. With *reuse_port*,
:py:data:`~sockets.SO_REUSEPORT` is used instead, which specifically
prevents processes with differing UIDs from assigning sockets to the same
socket address.

.. versionchanged:: 3.8
Added support for Windows.

.. versionchanged:: 3.11
The *reuse_address* parameter, disabled since Python 3.9.0, 3.8.1,
3.7.6 and 3.6.10, has been entirely removed.

.. coroutinemethod:: loop.create_unix_connection(protocol_factory, \
path=None, *, ssl=None, sock=None, \
server_hostname=None, ssl_handshake_timeout=None)
Expand Down
Loading

0 comments on commit 22f76b8

Please sign in to comment.