Bug report
Bug description:
import uuid
uuid.UUID("123_4567812345678123456781234567")
# UUID('01234567-8123-4567-8123-456781234567')
UUID parsing hex strings internally uses int method which from Python 3.6 accepts underscores (_) as digit separators
Changed in version 3.6: Grouping digits with underscores as in code literals is allowed.
Since the UUID does not performs sanitization of this character this may result in parsing as valid non-RFC compliant UUID values.
CPython versions tested on:
3.10, CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
UUID parsing hex strings internally uses int method which from Python 3.6 accepts underscores (
_) as digit separatorsSince the UUID does not performs sanitization of this character this may result in parsing as valid non-RFC compliant UUID values.
CPython versions tested on:
3.10, CPython main branch
Operating systems tested on:
Linux
Linked PRs