ulid-transform 0.10.1__cp311-cp311-win32.whl → 0.10.2__cp311-cp311-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- __version__ = "0.10.1"
1
+ __version__ = "0.10.2"
2
2
 
3
3
  from .ulid_impl import (
4
4
  bytes_to_ulid,
Binary file
@@ -1844,27 +1844,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
1844
1844
  /* RaiseException.proto */
1845
1845
  static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1846
1846
 
1847
- /* PyObjectFormatSimple.proto */
1848
- #if CYTHON_COMPILING_IN_PYPY
1849
- #define __Pyx_PyObject_FormatSimple(s, f) (\
1850
- likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1851
- PyObject_Format(s, f))
1852
- #elif PY_MAJOR_VERSION < 3
1853
- #define __Pyx_PyObject_FormatSimple(s, f) (\
1854
- likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1855
- likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
1856
- PyObject_Format(s, f))
1857
- #elif CYTHON_USE_TYPE_SLOTS
1858
- #define __Pyx_PyObject_FormatSimple(s, f) (\
1859
- likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1860
- likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
1861
- likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
1862
- PyObject_Format(s, f))
1863
- #else
1864
- #define __Pyx_PyObject_FormatSimple(s, f) (\
1865
- likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1866
- PyObject_Format(s, f))
1867
- #endif
1847
+ /* PyObjectFormatAndDecref.proto */
1848
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
1849
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
1868
1850
 
1869
1851
  /* MoveIfSupported.proto */
1870
1852
  #if CYTHON_USE_CPP_STD_MOVE
@@ -2228,8 +2210,8 @@ static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
2228
2210
  static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2229
2211
  static const char __pyx_k_bytes_to_ulid_or_none[] = "_bytes_to_ulid_or_none";
2230
2212
  static const char __pyx_k_ulid_to_bytes_or_none[] = "_ulid_to_bytes_or_none";
2231
- static const char __pyx_k_ULID_bytes_be_16_bytes[] = "ULID bytes be 16 bytes: ";
2232
2213
  static const char __pyx_k_ulid_transform__ulid_impl[] = "ulid_transform._ulid_impl";
2214
+ static const char __pyx_k_ULID_bytes_must_be_16_bytes[] = "ULID bytes must be 16 bytes: ";
2233
2215
  static const char __pyx_k_ULID_must_be_a_26_character_stri[] = "ULID must be a 26 character string: ";
2234
2216
  static const char __pyx_k_src_ulid_transform__ulid_impl_py[] = "src\\ulid_transform\\_ulid_impl.pyx";
2235
2217
  /* #### Code section: decls ### */
@@ -2278,7 +2260,7 @@ typedef struct {
2278
2260
  PyObject *__pyx_n_s_Optional;
2279
2261
  PyObject *__pyx_kp_s_Optional_bytes;
2280
2262
  PyObject *__pyx_kp_s_Optional_str;
2281
- PyObject *__pyx_kp_u_ULID_bytes_be_16_bytes;
2263
+ PyObject *__pyx_kp_u_ULID_bytes_must_be_16_bytes;
2282
2264
  PyObject *__pyx_kp_u_ULID_must_be_a_26_character_stri;
2283
2265
  PyObject *__pyx_n_s_ValueError;
2284
2266
  PyObject *__pyx_n_s__11;
@@ -2361,7 +2343,7 @@ static int __pyx_m_clear(PyObject *m) {
2361
2343
  Py_CLEAR(clear_module_state->__pyx_n_s_Optional);
2362
2344
  Py_CLEAR(clear_module_state->__pyx_kp_s_Optional_bytes);
2363
2345
  Py_CLEAR(clear_module_state->__pyx_kp_s_Optional_str);
2364
- Py_CLEAR(clear_module_state->__pyx_kp_u_ULID_bytes_be_16_bytes);
2346
+ Py_CLEAR(clear_module_state->__pyx_kp_u_ULID_bytes_must_be_16_bytes);
2365
2347
  Py_CLEAR(clear_module_state->__pyx_kp_u_ULID_must_be_a_26_character_stri);
2366
2348
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
2367
2349
  Py_CLEAR(clear_module_state->__pyx_n_s__11);
@@ -2422,7 +2404,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
2422
2404
  Py_VISIT(traverse_module_state->__pyx_n_s_Optional);
2423
2405
  Py_VISIT(traverse_module_state->__pyx_kp_s_Optional_bytes);
2424
2406
  Py_VISIT(traverse_module_state->__pyx_kp_s_Optional_str);
2425
- Py_VISIT(traverse_module_state->__pyx_kp_u_ULID_bytes_be_16_bytes);
2407
+ Py_VISIT(traverse_module_state->__pyx_kp_u_ULID_bytes_must_be_16_bytes);
2426
2408
  Py_VISIT(traverse_module_state->__pyx_kp_u_ULID_must_be_a_26_character_stri);
2427
2409
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
2428
2410
  Py_VISIT(traverse_module_state->__pyx_n_s__11);
@@ -2499,7 +2481,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
2499
2481
  #define __pyx_n_s_Optional __pyx_mstate_global->__pyx_n_s_Optional
2500
2482
  #define __pyx_kp_s_Optional_bytes __pyx_mstate_global->__pyx_kp_s_Optional_bytes
2501
2483
  #define __pyx_kp_s_Optional_str __pyx_mstate_global->__pyx_kp_s_Optional_str
2502
- #define __pyx_kp_u_ULID_bytes_be_16_bytes __pyx_mstate_global->__pyx_kp_u_ULID_bytes_be_16_bytes
2484
+ #define __pyx_kp_u_ULID_bytes_must_be_16_bytes __pyx_mstate_global->__pyx_kp_u_ULID_bytes_must_be_16_bytes
2503
2485
  #define __pyx_kp_u_ULID_must_be_a_26_character_stri __pyx_mstate_global->__pyx_kp_u_ULID_must_be_a_26_character_stri
2504
2486
  #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
2505
2487
  #define __pyx_n_s__11 __pyx_mstate_global->__pyx_n_s__11
@@ -3269,7 +3251,7 @@ static PyObject *__pyx_pf_14ulid_transform_10_ulid_impl_4_ulid_to_bytes(CYTHON_U
3269
3251
  *
3270
3252
  * def _bytes_to_ulid(ulid_bytes: bytes) -> str: # <<<<<<<<<<<<<<
3271
3253
  * if len(ulid_bytes) != 16:
3272
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
3254
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
3273
3255
  */
3274
3256
 
3275
3257
  /* Python wrapper */
@@ -3390,7 +3372,7 @@ static PyObject *__pyx_pf_14ulid_transform_10_ulid_impl_6_bytes_to_ulid(CYTHON_U
3390
3372
  *
3391
3373
  * def _bytes_to_ulid(ulid_bytes: bytes) -> str:
3392
3374
  * if len(ulid_bytes) != 16: # <<<<<<<<<<<<<<
3393
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
3375
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
3394
3376
  * return _cpp_bytes_to_ulid(ulid_bytes).decode("ascii")
3395
3377
  */
3396
3378
  __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_ulid_bytes); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 29, __pyx_L1_error)
@@ -3400,13 +3382,13 @@ static PyObject *__pyx_pf_14ulid_transform_10_ulid_impl_6_bytes_to_ulid(CYTHON_U
3400
3382
  /* "ulid_transform/_ulid_impl.pyx":30
3401
3383
  * def _bytes_to_ulid(ulid_bytes: bytes) -> str:
3402
3384
  * if len(ulid_bytes) != 16:
3403
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}") # <<<<<<<<<<<<<<
3385
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}") # <<<<<<<<<<<<<<
3404
3386
  * return _cpp_bytes_to_ulid(ulid_bytes).decode("ascii")
3405
3387
  *
3406
3388
  */
3407
- __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_ulid_bytes, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
3389
+ __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_ulid_bytes), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
3408
3390
  __Pyx_GOTREF(__pyx_t_3);
3409
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_ULID_bytes_be_16_bytes, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error)
3391
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_ULID_bytes_must_be_16_bytes, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error)
3410
3392
  __Pyx_GOTREF(__pyx_t_4);
3411
3393
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3412
3394
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
@@ -3420,14 +3402,14 @@ static PyObject *__pyx_pf_14ulid_transform_10_ulid_impl_6_bytes_to_ulid(CYTHON_U
3420
3402
  *
3421
3403
  * def _bytes_to_ulid(ulid_bytes: bytes) -> str:
3422
3404
  * if len(ulid_bytes) != 16: # <<<<<<<<<<<<<<
3423
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
3405
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
3424
3406
  * return _cpp_bytes_to_ulid(ulid_bytes).decode("ascii")
3425
3407
  */
3426
3408
  }
3427
3409
 
3428
3410
  /* "ulid_transform/_ulid_impl.pyx":31
3429
3411
  * if len(ulid_bytes) != 16:
3430
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
3412
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
3431
3413
  * return _cpp_bytes_to_ulid(ulid_bytes).decode("ascii") # <<<<<<<<<<<<<<
3432
3414
  *
3433
3415
  * def _ulid_to_bytes_or_none(ulid_str: Optional[str]) -> Optional[bytes]:
@@ -3445,7 +3427,7 @@ static PyObject *__pyx_pf_14ulid_transform_10_ulid_impl_6_bytes_to_ulid(CYTHON_U
3445
3427
  *
3446
3428
  * def _bytes_to_ulid(ulid_bytes: bytes) -> str: # <<<<<<<<<<<<<<
3447
3429
  * if len(ulid_bytes) != 16:
3448
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
3430
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
3449
3431
  */
3450
3432
 
3451
3433
  /* function exit code */
@@ -3884,7 +3866,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
3884
3866
  {&__pyx_n_s_Optional, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
3885
3867
  {&__pyx_kp_s_Optional_bytes, __pyx_k_Optional_bytes, sizeof(__pyx_k_Optional_bytes), 0, 0, 1, 0},
3886
3868
  {&__pyx_kp_s_Optional_str, __pyx_k_Optional_str, sizeof(__pyx_k_Optional_str), 0, 0, 1, 0},
3887
- {&__pyx_kp_u_ULID_bytes_be_16_bytes, __pyx_k_ULID_bytes_be_16_bytes, sizeof(__pyx_k_ULID_bytes_be_16_bytes), 0, 1, 0, 0},
3869
+ {&__pyx_kp_u_ULID_bytes_must_be_16_bytes, __pyx_k_ULID_bytes_must_be_16_bytes, sizeof(__pyx_k_ULID_bytes_must_be_16_bytes), 0, 1, 0, 0},
3888
3870
  {&__pyx_kp_u_ULID_must_be_a_26_character_stri, __pyx_k_ULID_must_be_a_26_character_stri, sizeof(__pyx_k_ULID_must_be_a_26_character_stri), 0, 1, 0, 0},
3889
3871
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
3890
3872
  {&__pyx_n_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 1},
@@ -3967,7 +3949,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
3967
3949
  *
3968
3950
  * def _bytes_to_ulid(ulid_bytes: bytes) -> str: # <<<<<<<<<<<<<<
3969
3951
  * if len(ulid_bytes) != 16:
3970
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
3952
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
3971
3953
  */
3972
3954
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_ulid_bytes); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 28, __pyx_L1_error)
3973
3955
  __Pyx_GOTREF(__pyx_tuple__7);
@@ -4455,7 +4437,7 @@ if (!__Pyx_RefNanny) {
4455
4437
  *
4456
4438
  * def _bytes_to_ulid(ulid_bytes: bytes) -> str: # <<<<<<<<<<<<<<
4457
4439
  * if len(ulid_bytes) != 16:
4458
- * raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
4440
+ * raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
4459
4441
  */
4460
4442
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
4461
4443
  __Pyx_GOTREF(__pyx_t_3);
@@ -5635,6 +5617,27 @@ bad:
5635
5617
  }
5636
5618
  #endif
5637
5619
 
5620
+ /* PyObjectFormatAndDecref */
5621
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
5622
+ if (unlikely(!s)) return NULL;
5623
+ if (likely(PyUnicode_CheckExact(s))) return s;
5624
+ #if PY_MAJOR_VERSION < 3
5625
+ if (likely(PyString_CheckExact(s))) {
5626
+ PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
5627
+ Py_DECREF(s);
5628
+ return result;
5629
+ }
5630
+ #endif
5631
+ return __Pyx_PyObject_FormatAndDecref(s, f);
5632
+ }
5633
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
5634
+ PyObject *result;
5635
+ if (unlikely(!s)) return NULL;
5636
+ result = PyObject_Format(s, f);
5637
+ Py_DECREF(s);
5638
+ return result;
5639
+ }
5640
+
5638
5641
  /* Import */
5639
5642
  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
5640
5643
  PyObject *module = 0;
@@ -27,7 +27,7 @@ def _ulid_to_bytes(ulid_str: str) -> bytes:
27
27
 
28
28
  def _bytes_to_ulid(ulid_bytes: bytes) -> str:
29
29
  if len(ulid_bytes) != 16:
30
- raise ValueError(f"ULID bytes be 16 bytes: {ulid_bytes}")
30
+ raise ValueError(f"ULID bytes must be 16 bytes: {ulid_bytes!r}")
31
31
  return _cpp_bytes_to_ulid(ulid_bytes).decode("ascii")
32
32
 
33
33
  def _ulid_to_bytes_or_none(ulid_str: Optional[str]) -> Optional[bytes]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ulid-transform
3
- Version: 0.10.1
3
+ Version: 0.10.2
4
4
  Summary: Create and transform ULIDs
5
5
  Home-page: https://github.com/bdraco/ulid-transform
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
- ulid_transform/__init__.py,sha256=p3JHoB6geHaG050xbrrcyDbWg6c1S7lz_mZ8RKaUHoc,377
2
- ulid_transform/_ulid_impl.cpp,sha256=EcAHAHy5VWDBoSRW84p7gW1n356Pq_U-TgUn-Y4qLdQ,330260
3
- ulid_transform/_ulid_impl.pyx,sha256=Qlhh9TuB5JyxNHhr370W5pgYx5AdZpkvANbBYVLCmWY,1347
1
+ ulid_transform/__init__.py,sha256=1pY4OeLuVQ10t0Cjf52lJF4_O1Y18dcC7h_m5qACRu8,377
2
+ ulid_transform/_ulid_impl.cpp,sha256=SQIiExEtawm0F5HdeCw4tka_6h--Cq22yAGDwtkls1I,330384
3
+ ulid_transform/_ulid_impl.pyx,sha256=EgJjDUXbyl2G4dSi1W_3ZiJlMg1JfmCiCrE36RF_qD0,1354
4
4
  ulid_transform/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  ulid_transform/ulid.hh,sha256=RwGduPUOt5AEfAaAkafGaHyhr2yd7vfHJeY0lOXlTPw,312
6
6
  ulid_transform/ulid_impl.py,sha256=-OqxT7yi7tloT6EnRMmxLMgSLmGSb-hPhO4kn99vDiU,10934
@@ -8,8 +8,8 @@ ulid_transform/ulid_struct.hh,sha256=Jh326iAyOkEaEpBZr4CY6xOOSXqO_hcsBS37qUcUCeM
8
8
  ulid_transform/ulid_uint128.hh,sha256=ibwgd8Qksjc0oG52h8kb7ClJruJe9CyfMQra4B3fk1E,15370
9
9
  ulid_transform/ulid_wrapper.cpp,sha256=-S7Eq1ae0bHeEOaY1uWHRn2RA9MQG2PrFcIJSl_37Rg,933
10
10
  ulid_transform/ulid_wrapper.h,sha256=H_AaGGLSS3ymjaRh4uUhG-lvFUrwJhnLL0irzDoqgZM,275
11
- ulid_transform/_ulid_impl.cp311-win32.pyd,sha256=QfJj0bVGb8jXqHRf2_UdF7OfEe51n4u4MvnrGay15EI,48128
12
- ulid_transform-0.10.1.dist-info/LICENSE,sha256=glXAnenXQvBuN4WzZ8ikikOHF6v3qq4_z8fCZobbgxs,1094
13
- ulid_transform-0.10.1.dist-info/METADATA,sha256=ydvpOxvAknjpYdK-nYRIh4MinZg1R5YeM21If61j25I,5389
14
- ulid_transform-0.10.1.dist-info/WHEEL,sha256=YNF03C6wU6sbf4sshwLi9SMwlebguWcPUch8KBoFT9s,94
15
- ulid_transform-0.10.1.dist-info/RECORD,,
11
+ ulid_transform/_ulid_impl.cp311-win32.pyd,sha256=ee2LOZES-V7t4CtMcj8IuzgrAYyG6DUn6Wl1Kbw6L5Y,48128
12
+ ulid_transform-0.10.2.dist-info/LICENSE,sha256=glXAnenXQvBuN4WzZ8ikikOHF6v3qq4_z8fCZobbgxs,1094
13
+ ulid_transform-0.10.2.dist-info/METADATA,sha256=DQWi0XhaJ8iTiEWBqqAm7Fs06Sq8KG243mLjVaj2NRE,5389
14
+ ulid_transform-0.10.2.dist-info/WHEEL,sha256=YNF03C6wU6sbf4sshwLi9SMwlebguWcPUch8KBoFT9s,94
15
+ ulid_transform-0.10.2.dist-info/RECORD,,