From c7531cc2a8c3d0aa04d1042b1a2a69fbeb25b9b9 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 2 Sep 2023 12:32:19 +0300 Subject: [PATCH 1/3] gh-101100: Fix sphinx warnings in `uuid.rst` (GH-108805) * gh-101100: Fix sphinx warnings in `uuid.rst` * Use anchors (cherry picked from commit 21da4980f5916e8fd648f04367a9e60d141af366) Co-authored-by: Nikita Sobolev --- Doc/library/uuid.rst | 51 ++++++++++++++++++++++++++------------------ Doc/tools/.nitignore | 1 - 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Doc/library/uuid.rst b/Doc/library/uuid.rst index 94b9a432372195..b78e74b4e04f1c 100644 --- a/Doc/library/uuid.rst +++ b/Doc/library/uuid.rst @@ -22,7 +22,7 @@ random UUID. Depending on support from the underlying platform, :func:`uuid1` may or may not return a "safe" UUID. A safe UUID is one which is generated using synchronization methods that ensure no two processes can obtain the same -UUID. All instances of :class:`UUID` have an :attr:`is_safe` attribute +UUID. All instances of :class:`UUID` have an :attr:`~UUID.is_safe` attribute which relays any information about the UUID's safety, using this enumeration: .. class:: SafeUUID @@ -95,25 +95,34 @@ which relays any information about the UUID's safety, using this enumeration: A tuple of the six integer fields of the UUID, which are also available as six individual attributes and two derived attributes: - +------------------------------+-------------------------------+ - | Field | Meaning | - +==============================+===============================+ - | :attr:`time_low` | the first 32 bits of the UUID | - +------------------------------+-------------------------------+ - | :attr:`time_mid` | the next 16 bits of the UUID | - +------------------------------+-------------------------------+ - | :attr:`time_hi_version` | the next 16 bits of the UUID | - +------------------------------+-------------------------------+ - | :attr:`clock_seq_hi_variant` | the next 8 bits of the UUID | - +------------------------------+-------------------------------+ - | :attr:`clock_seq_low` | the next 8 bits of the UUID | - +------------------------------+-------------------------------+ - | :attr:`node` | the last 48 bits of the UUID | - +------------------------------+-------------------------------+ - | :attr:`time` | the 60-bit timestamp | - +------------------------------+-------------------------------+ - | :attr:`clock_seq` | the 14-bit sequence number | - +------------------------------+-------------------------------+ +.. list-table:: + + * - Field + - Meaning + + * - .. attribute:: UUID.time_low + - The next 32 bits of the UUID. + + * - .. attribute:: UUID.time_mid + - The next 16 bits of the UUID. + + * - .. attribute:: UUID.time_hi_version + - The next 16 bits of the UUID. + + * - .. attribute:: UUID.clock_seq_hi_variant + - The next 8 bits of the UUID. + + * - .. attribute:: UUID.clock_seq_low + - The next 8 bits of the UUID. + + * - .. attribute:: UUID.node + - The last 48 bits of the UUID. + + * - .. attribute:: UUID.time + - The the 60-bit timestamp. + + * - .. attribute:: UUID.clock_seq + - The 14-bit sequence number. .. attribute:: UUID.hex @@ -233,7 +242,7 @@ The :mod:`uuid` module defines the following namespace identifiers for use with text output format. The :mod:`uuid` module defines the following constants for the possible values -of the :attr:`variant` attribute: +of the :attr:`~UUID.variant` attribute: .. data:: RESERVED_NCS diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 4fc681984bb8f7..20d22e93d1a5be 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -150,7 +150,6 @@ Doc/library/unittest.mock.rst Doc/library/unittest.rst Doc/library/urllib.parse.rst Doc/library/urllib.request.rst -Doc/library/uuid.rst Doc/library/weakref.rst Doc/library/webbrowser.rst Doc/library/wsgiref.rst From dade7eec3fcce6968944564be57e7480907a97a0 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 2 Sep 2023 12:39:53 +0300 Subject: [PATCH 2/3] Fix typo --- Doc/library/uuid.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/uuid.rst b/Doc/library/uuid.rst index b78e74b4e04f1c..d2ada7f471a752 100644 --- a/Doc/library/uuid.rst +++ b/Doc/library/uuid.rst @@ -119,7 +119,7 @@ which relays any information about the UUID's safety, using this enumeration: - The last 48 bits of the UUID. * - .. attribute:: UUID.time - - The the 60-bit timestamp. + - The 60-bit timestamp. * - .. attribute:: UUID.clock_seq - The 14-bit sequence number. From 7b625e6c217e77f56781314eca56519924afc8b4 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Sat, 2 Sep 2023 11:58:07 +0100 Subject: [PATCH 3/3] another typo --- Doc/library/uuid.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/uuid.rst b/Doc/library/uuid.rst index d2ada7f471a752..adf01770656754 100644 --- a/Doc/library/uuid.rst +++ b/Doc/library/uuid.rst @@ -101,7 +101,7 @@ which relays any information about the UUID's safety, using this enumeration: - Meaning * - .. attribute:: UUID.time_low - - The next 32 bits of the UUID. + - The first 32 bits of the UUID. * - .. attribute:: UUID.time_mid - The next 16 bits of the UUID.