- Updated dev dependencies
- Improved documentation about generator's clock rollback behavior
Most notably, v3 switches the letter case of generated IDs from uppercase (e.g., "036Z951MHJIKZIK2GSL81GR7L") to lowercase (e.g., "036z951mhjikzik2gsl81gr7l"), though it is technically not supposed to break existing code because SCRU128 is a case-insensitive scheme. Other changes include the removal of deprecated APIs.
- Deprecated items:
scru128()
andscru128_string()
Scru128Generator#generate_core()
Scru128Generator#last_status
andScru128Generator.Status
- Letter case of generated IDs from uppercase to lowercase
- Edge case behavior of generator functions' rollback allowance handling
- Upgraded minimum supported Python version to 3.8
- Updated dev dependencies
- Updated dev dependencies
- Improved test cases
- Updated dev dependencies
- Tweaked docs and tests
generate_or_abort()
andgenerate_or_abort_core()
toScru128Generator
(formerly named asgenerate_no_rewind()
andgenerate_core_no_rewind()
)Scru128Generator#generate_or_reset_core()
Scru128Generator#generate_core()
Scru128Generator#last_status
andScru128Generator.Status
generate_no_rewind()
andgenerate_core_no_rewind()
toScru128Generator
(experimental)
- Improved documentation about generator method flavors
- Updated dev dependencies
- Iterable and Iterator implementations to
Scru128Generator
to make it work as infinite iterator
- Updated dev dependencies
new()
andnew_string()
scru128()
andscru128_string()
to promotescru128.new()
syntax overfrom scru128 import scru128
- Updated dev dependencies
generate_core()
to updatecounter_hi
whentimestamp
passed < 1000
- Updated dev dependencies
generate_core()
to reject zero astimestamp
value
generate_core()
andlast_status
to Scru128Generator
- Textual representation: 26-digit Base32 -> 25-digit Base36
- Field structure: {
timestamp
: 44 bits,counter
: 28 bits,per_sec_random
: 24 bits,per_gen_random
: 32 bits } -> {timestamp
: 48 bits,counter_hi
: 24 bits,counter_lo
: 24 bits,entropy
: 32 bits } - Timestamp epoch: 2020-01-01 00:00:00.000 UTC -> 1970-01-01 00:00:00.000 UTC
- Counter overflow handling: stall generator -> increment timestamp
TIMESTAMP_BIAS
Scru128Id#counter()
,Scru128Id#per_sec_random()
,Scru128Id#per_gen_random()
Scru128Id#counter_hi()
,Scru128Id#counter_lo()
,Scru128Id#entropy()
- Updated dev dependencies
- Initial stable release