Message 359848 - Python tracker

Message359848

Author taleinat
Recipients barry, berker.peksag, cheryl.sabella, conqp, jophine pranjal, taleinat, twouters, xtreak
Date 2020-01-12.13:57:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578837431.85.0.862453737523.issue34732@roundup.psfhosted.org>
In-reply-to
Content
The uuid module is likely used on a huge variety of operating systems and hardware; I feel making UUID.__init__() reject values which it accepted until now would unnecessarily break existing code.  While raising an exception in __init__ seems more natural and correct in theory, it is also a larger break in backwards-compatibility.

I'm specifically worried by the _windll() example in PR GH-9417, in which a non-RFC 4122 conforming UUID is created, leading to the addition of the new "strict" keyword argument so that we can disable the new check in __init__ in this case.  There's a good chance that there are other such scenarios of which we're simply not yet aware.

In light of this, returning None for UUID.version, as in PR GH-9413, actually seems like a very reasonable solution.
History
Date User Action Args
2020-01-12 13:57:11taleinatsetrecipients: + taleinat, twouters, barry, berker.peksag, conqp, cheryl.sabella, xtreak, jophine pranjal
2020-01-12 13:57:11taleinatsetmessageid: <1578837431.85.0.862453737523.issue34732@roundup.psfhosted.org>
2020-01-12 13:57:11taleinatlinkissue34732 messages
2020-01-12 13:57:11taleinatcreate