From e259b79a6d3911c18ee6987806fde20be203477d Mon Sep 17 00:00:00 2001 From: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:29:35 +0800 Subject: [PATCH 1/5] Add some errnos --- Doc/library/errno.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index 5122c69697ef914..2be09adddc692d1 100644 --- a/Doc/library/errno.rst +++ b/Doc/library/errno.rst @@ -666,3 +666,19 @@ defined by the module. The specific list of defined symbols is available as .. availability:: WASI, FreeBSD .. versionadded:: 3.11.1 + +.. data:: ECANCELED + + operation canceled + +.. data:: EOWNERDEAD + + owner dead + +.. data:: ENOTRECOVERABLE + + state not recoverable + +.. data:: ENOTSUP + + not supported \ No newline at end of file From 1a9c776782067bcd003515334b57a5a76ff5e988 Mon Sep 17 00:00:00 2001 From: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com> Date: Wed, 23 Aug 2023 23:49:53 +0800 Subject: [PATCH 2/5] some changes in order --- Doc/c-api/arg.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index c43dd0f4303cd47..404b8ec77743cfe 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -237,6 +237,17 @@ Numbers Convert a Python integer to a tiny int without overflow checking, stored in a C :c:expr:`unsigned char`. +``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char] + Convert a Python byte, represented as a :class:`bytes` or + :class:`bytearray` object of length 1, to a C :c:expr:`char`. + + .. versionchanged:: 3.3 + Allow :class:`bytearray` objects. + +``C`` (:class:`str` of length 1) [int] + Convert a Python character, represented as a :class:`str` object of + length 1, to a C :c:expr:`int`. + ``h`` (:class:`int`) [short int] Convert a Python integer to a C :c:expr:`short int`. @@ -251,13 +262,13 @@ Numbers Convert a Python integer to a C :c:expr:`unsigned int`, without overflow checking. -``l`` (:class:`int`) [long int] - Convert a Python integer to a C :c:expr:`long int`. - ``k`` (:class:`int`) [unsigned long] Convert a Python integer to a C :c:expr:`unsigned long` without overflow checking. +``l`` (:class:`int`) [long int] + Convert a Python integer to a C :c:expr:`long int`. + ``L`` (:class:`int`) [long long] Convert a Python integer to a C :c:expr:`long long`. @@ -268,17 +279,6 @@ Numbers ``n`` (:class:`int`) [:c:type:`Py_ssize_t`] Convert a Python integer to a C :c:type:`Py_ssize_t`. -``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char] - Convert a Python byte, represented as a :class:`bytes` or - :class:`bytearray` object of length 1, to a C :c:expr:`char`. - - .. versionchanged:: 3.3 - Allow :class:`bytearray` objects. - -``C`` (:class:`str` of length 1) [int] - Convert a Python character, represented as a :class:`str` object of - length 1, to a C :c:expr:`int`. - ``f`` (:class:`float`) [float] Convert a Python floating point number to a C :c:expr:`float`. From b1dc32fb8555987d07e92e39017a5cc66da2969f Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Wed, 23 Aug 2023 17:29:44 +0100 Subject: [PATCH 3/5] Capitalise, add versionadded --- Doc/library/errno.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index 2be09adddc692d1..5107e8a8ccd0134 100644 --- a/Doc/library/errno.rst +++ b/Doc/library/errno.rst @@ -669,16 +669,24 @@ defined by the module. The specific list of defined symbols is available as .. data:: ECANCELED - operation canceled + Operation canceled + + .. versionadded:: 3.2 .. data:: EOWNERDEAD - owner dead + Owner died + + .. versionadded:: 3.2 .. data:: ENOTRECOVERABLE - state not recoverable + State not recoverable + + .. versionadded:: 3.2 .. data:: ENOTSUP - not supported \ No newline at end of file + Operation not supported + + .. versionadded:: 3.2 From 96b5829c6f2ad9217a951352704eab727970ebc8 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Wed, 23 Aug 2023 17:30:02 +0100 Subject: [PATCH 4/5] Revert "some changes in order" This reverts commit 1a9c776782067bcd003515334b57a5a76ff5e988. --- Doc/c-api/arg.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index 404b8ec77743cfe..c43dd0f4303cd47 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -237,17 +237,6 @@ Numbers Convert a Python integer to a tiny int without overflow checking, stored in a C :c:expr:`unsigned char`. -``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char] - Convert a Python byte, represented as a :class:`bytes` or - :class:`bytearray` object of length 1, to a C :c:expr:`char`. - - .. versionchanged:: 3.3 - Allow :class:`bytearray` objects. - -``C`` (:class:`str` of length 1) [int] - Convert a Python character, represented as a :class:`str` object of - length 1, to a C :c:expr:`int`. - ``h`` (:class:`int`) [short int] Convert a Python integer to a C :c:expr:`short int`. @@ -262,13 +251,13 @@ Numbers Convert a Python integer to a C :c:expr:`unsigned int`, without overflow checking. +``l`` (:class:`int`) [long int] + Convert a Python integer to a C :c:expr:`long int`. + ``k`` (:class:`int`) [unsigned long] Convert a Python integer to a C :c:expr:`unsigned long` without overflow checking. -``l`` (:class:`int`) [long int] - Convert a Python integer to a C :c:expr:`long int`. - ``L`` (:class:`int`) [long long] Convert a Python integer to a C :c:expr:`long long`. @@ -279,6 +268,17 @@ Numbers ``n`` (:class:`int`) [:c:type:`Py_ssize_t`] Convert a Python integer to a C :c:type:`Py_ssize_t`. +``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char] + Convert a Python byte, represented as a :class:`bytes` or + :class:`bytearray` object of length 1, to a C :c:expr:`char`. + + .. versionchanged:: 3.3 + Allow :class:`bytearray` objects. + +``C`` (:class:`str` of length 1) [int] + Convert a Python character, represented as a :class:`str` object of + length 1, to a C :c:expr:`int`. + ``f`` (:class:`float`) [float] Convert a Python floating point number to a C :c:expr:`float`. From 9bf946edcd080e67c3395329b0b4f9264c53cd63 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Wed, 23 Aug 2023 18:46:39 +0100 Subject: [PATCH 5/5] Sort --- Doc/library/errno.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index 5107e8a8ccd0134..283e8b013265d95 100644 --- a/Doc/library/errno.rst +++ b/Doc/library/errno.rst @@ -511,6 +511,13 @@ defined by the module. The specific list of defined symbols is available as Operation not supported on transport endpoint +.. data:: ENOTSUP + + Operation not supported + + .. versionadded:: 3.2 + + .. data:: EPFNOSUPPORT Protocol family not supported @@ -667,26 +674,23 @@ defined by the module. The specific list of defined symbols is available as .. versionadded:: 3.11.1 + .. data:: ECANCELED Operation canceled .. versionadded:: 3.2 + .. data:: EOWNERDEAD Owner died .. versionadded:: 3.2 + .. data:: ENOTRECOVERABLE State not recoverable .. versionadded:: 3.2 - -.. data:: ENOTSUP - - Operation not supported - - .. versionadded:: 3.2