Skip to content

Commit 5496c4f

Browse files
committed
Clarify the type name
1 parent 2f76612 commit 5496c4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Modules/_uuidmodule.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,13 @@ static PyType_Slot Uuid_slots[] = {
15341534

15351535

15361536
static PyType_Spec Uuid_spec = {
1537+
// We use "uuid.UUID" here and not "_uuid.UUID" to have full
1538+
// compatibility with old pickled UUIDs. There's no workaround
1539+
// if we want both to produce compatible pickles that can be read
1540+
// by older Pythons (using ancient pickle protocol verions) and
1541+
// restore from pickles produced by old Python versions.
15371542
.name = "uuid.UUID",
1543+
15381544
.basicsize = sizeof(uuidobject),
15391545
.flags = (
15401546
Py_TPFLAGS_DEFAULT

0 commit comments

Comments
 (0)