Skip to content

Commit 7c329e3

Browse files
authored
Draft 04 (#47)
1 parent f4ced79 commit 7c329e3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ New time-based UUID formats which are suited for use as a database key.
77
[![Python versions supported](https://img.shields.io/pypi/pyversions/uuid6.svg?logo=python)](https://pypi.org/project/uuid6/)
88
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
99

10-
This module extends immutable UUID objects (the UUID class) with the functions `uuid6()` and `uuid7()` from [the IETF draft][ietf draft].
10+
This module extends immutable UUID objects (the UUID class) with the functions `uuid6()` and `uuid7()` from [the IETF draft][draft repository].
1111

1212
## Install
1313

@@ -47,7 +47,7 @@ assert my_uuid < uuid7()
4747

4848
## UUIDv7 Field and Bit Layout
4949

50-
### [Draft 03][draft 03]
50+
### [Draft 04][draft 04]
5151

5252
```
5353
0 1 2 3
@@ -122,7 +122,7 @@ Mean +- std dev: 4.94 us +- 0.24 us
122122
+-----------+---------+-----------------------+-----------------------+-----------------------+
123123
```
124124

125-
[ietf draft]: https://github.com/uuid6/uuid6-ietf-draft
126-
[draft 03]: https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#section-5.2
125+
[draft repository]: https://github.com/uuid6/uuid6-ietf-draft
126+
[draft 04]: https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04#section-5.2
127127
[cloud shell]: https://cloud.google.com/shell/docs
128128
[bench]: https://github.com/oittaa/uuid6-python/blob/main/bench.sh

test/test_vectors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class TestVectors(unittest.TestCase):
88
"""
9-
https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#appendix-B
9+
https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04#appendix-B
1010
"""
1111

1212
@patch("uuid6._last_v6_timestamp", 1)
@@ -17,10 +17,10 @@ def test_uuid6_hex_from_time(self, mocktime, mockrand):
1717
self.assertEqual(str(uuid_6), "1ec9414c-232a-6b00-b3c8-9e6bdeced846")
1818

1919
@patch("uuid6._last_v7_timestamp", 1)
20-
@patch("time.time_ns", return_value=0x17F21CFD130 * 10**6)
20+
@patch("time.time_ns", return_value=0x17F22E279B0 * 10**6)
2121
def test_uuid7_hex_from_time(self, mocktime):
2222
uuid_7 = uuid7()
23-
self.assertEqual(str(uuid_7)[:15], "017f21cf-d130-7")
23+
self.assertEqual(str(uuid_7)[:15], "017f22e2-79b0-7")
2424

2525
def test_uuid6_time_from_hex(self):
2626
uuid_6 = UUID(hex="1EC9414C-232A-6B00-B3C8-9E6BDECED846")

0 commit comments

Comments
 (0)