cchecksum 0.3.1__cp310-cp310-musllinux_1_2_x86_64.whl → 0.3.2__cp310-cp310-musllinux_1_2_x86_64.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.

Potentially problematic release.


This version of cchecksum might be problematic. Click here for more details.

cchecksum/_checksum.c CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.1.1 */
1
+ /* Generated by Cython 3.1.4 */
2
2
 
3
3
  /* BEGIN: Cython Metadata
4
4
  {
@@ -27,8 +27,8 @@ END: Cython Metadata */
27
27
  #elif PY_VERSION_HEX < 0x03080000
28
28
  #error Cython requires Python 3.8+.
29
29
  #else
30
- #define __PYX_ABI_VERSION "3_1_1"
31
- #define CYTHON_HEX_VERSION 0x030101F0
30
+ #define __PYX_ABI_VERSION "3_1_4"
31
+ #define CYTHON_HEX_VERSION 0x030104F0
32
32
  #define CYTHON_FUTURE_DIVISION 1
33
33
  /* CModulePreamble */
34
34
  #include <stddef.h>
@@ -391,6 +391,9 @@ END: Cython Metadata */
391
391
  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
392
392
  #endif
393
393
  #endif
394
+ #ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME
395
+ #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100
396
+ #endif
394
397
  #ifndef __has_attribute
395
398
  #define __has_attribute(x) 0
396
399
  #endif
@@ -443,7 +446,7 @@ END: Cython Metadata */
443
446
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
444
447
  #endif
445
448
  #ifndef CYTHON_NCP_UNUSED
446
- # if CYTHON_COMPILING_IN_CPYTHON
449
+ # if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
447
450
  # define CYTHON_NCP_UNUSED
448
451
  # else
449
452
  # define CYTHON_NCP_UNUSED CYTHON_UNUSED
@@ -888,11 +891,19 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
888
891
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
889
892
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
890
893
  #endif
891
- #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
894
+ #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
892
895
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
893
896
  #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
897
+ #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
898
+ #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
894
899
  #else
895
- #define __Pyx_PyList_GetItemRef(o, i) PySequence_GetItem(o, i)
900
+ #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
901
+ #endif
902
+ #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
903
+ #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
904
+ #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
905
+ #else
906
+ #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
896
907
  #endif
897
908
  #else
898
909
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
@@ -1305,7 +1316,9 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1305
1316
  #endif /* __GNUC__ */
1306
1317
  /* PretendToInitialize */
1307
1318
  #ifdef __cplusplus
1319
+ #if __cplusplus > 201103L
1308
1320
  #include <type_traits>
1321
+ #endif
1309
1322
  template <typename T>
1310
1323
  static void __Pyx_pretend_to_initialize(T* ptr) {
1311
1324
  #if __cplusplus > 201103L
@@ -2100,18 +2113,18 @@ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2100
2113
  static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2101
2114
 
2102
2115
  /* GetItemInt.proto */
2103
- #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2116
+ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
2104
2117
  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2105
2118
  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2106
2119
  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2107
2120
  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2108
- #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2121
+ #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
2109
2122
  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2110
2123
  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2111
2124
  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2112
2125
  static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2113
2126
  int wraparound, int boundscheck);
2114
- #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2127
+ #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
2115
2128
  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2116
2129
  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2117
2130
  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
@@ -2292,7 +2305,7 @@ static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
2292
2305
  #endif
2293
2306
 
2294
2307
  /* SetItemInt.proto */
2295
- #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2308
+ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
2296
2309
  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2297
2310
  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
2298
2311
  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
@@ -2379,6 +2392,15 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2379
2392
  static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
2380
2393
  #endif
2381
2394
 
2395
+ /* LimitedApiGetTypeDict.proto */
2396
+ #if CYTHON_COMPILING_IN_LIMITED_API
2397
+ static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
2398
+ #endif
2399
+
2400
+ /* SetItemOnTypeDict.proto */
2401
+ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
2402
+ #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
2403
+
2382
2404
  /* FixUpExtensionType.proto */
2383
2405
  static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
2384
2406
 
@@ -2408,39 +2430,30 @@ static void* __Pyx_GetVtable(PyTypeObject *type);
2408
2430
  /* MergeVTables.proto */
2409
2431
  static int __Pyx_MergeVtables(PyTypeObject *type);
2410
2432
 
2411
- /* LimitedApiGetTypeDict.proto */
2412
- #if CYTHON_COMPILING_IN_LIMITED_API
2413
- static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
2414
- #endif
2415
-
2416
2433
  /* DelItemOnTypeDict.proto */
2417
2434
  static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
2418
2435
  #define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)
2419
2436
 
2420
- /* SetItemOnTypeDict.proto */
2421
- static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
2422
- #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
2423
-
2424
2437
  /* SetupReduce.proto */
2425
2438
  static int __Pyx_setup_reduce(PyObject* type_obj);
2426
2439
 
2427
2440
  /* TypeImport.proto */
2428
- #ifndef __PYX_HAVE_RT_ImportType_proto_3_1_1
2429
- #define __PYX_HAVE_RT_ImportType_proto_3_1_1
2441
+ #ifndef __PYX_HAVE_RT_ImportType_proto_3_1_4
2442
+ #define __PYX_HAVE_RT_ImportType_proto_3_1_4
2430
2443
  #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2431
2444
  #include <stdalign.h>
2432
2445
  #endif
2433
2446
  #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2434
- #define __PYX_GET_STRUCT_ALIGNMENT_3_1_1(s) alignof(s)
2447
+ #define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) alignof(s)
2435
2448
  #else
2436
- #define __PYX_GET_STRUCT_ALIGNMENT_3_1_1(s) sizeof(void*)
2449
+ #define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) sizeof(void*)
2437
2450
  #endif
2438
- enum __Pyx_ImportType_CheckSize_3_1_1 {
2439
- __Pyx_ImportType_CheckSize_Error_3_1_1 = 0,
2440
- __Pyx_ImportType_CheckSize_Warn_3_1_1 = 1,
2441
- __Pyx_ImportType_CheckSize_Ignore_3_1_1 = 2
2451
+ enum __Pyx_ImportType_CheckSize_3_1_4 {
2452
+ __Pyx_ImportType_CheckSize_Error_3_1_4 = 0,
2453
+ __Pyx_ImportType_CheckSize_Warn_3_1_4 = 1,
2454
+ __Pyx_ImportType_CheckSize_Ignore_3_1_4 = 2
2442
2455
  };
2443
- static PyTypeObject *__Pyx_ImportType_3_1_1(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_1 check_size);
2456
+ static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size);
2444
2457
  #endif
2445
2458
 
2446
2459
  /* ListPack.proto */
@@ -2453,7 +2466,11 @@ static PyObject *__Pyx_FetchSharedCythonABIModule(void);
2453
2466
  static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type);
2454
2467
 
2455
2468
  /* FetchCommonType.proto */
2456
- static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
2469
+ static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
2470
+
2471
+ /* CommonTypesMetaclass.proto */
2472
+ static int __pyx_CommonTypesMetaclass_init(PyObject *module);
2473
+ #define __Pyx_CommonTypesMetaclass_USED
2457
2474
 
2458
2475
  /* PyMethodNew.proto */
2459
2476
  static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
@@ -3032,9 +3049,9 @@ static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cyt
3032
3049
  static const char __pyx_k_to_checksum_address_line_21[] = "to_checksum_address (line 21)";
3033
3050
  static const char __pyx_k_attempted_to_normalize_to_0x[] = ", attempted to normalize to '0x";
3034
3051
  static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
3035
- static const char __pyx_k_1A_z_8_9RRSSZZdde_a_1HG1_G1F_a[] = "\320\000)\250\021\360>\000\005)\250\t\260\021\260!\360\010\000\005#\240&\250\002\250)\2601\260A\340\004\007\200z\220\021\220'\230\021\330\010\034\320\0348\270\001\3209R\320RS\320SZ\320Zd\320de\330\010\036\230a\340\t\023\2201\220H\230G\2401\330\010\034\230G\2401\240F\250&\260\001\330\010\036\230a\330\010\024\320\024$\240A\240Q\340\r\016\330\014\020\220\005\220U\230!\2301\330\020\024\320\024'\240q\250\001\340\020\023\2202\220S\230\001\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\360\006\000\025\033\230*\240A\330\030\032\320\032-\250T\260\021\3202Y\320Yj\320jq\320qr\360\010\000\t\017\210i\220q\330\014\016\320\016%\240T\250\021\250$\250a\250q\360\006\000\005\010\320\007\027\220q\320\030+\2503\250a\330\010\016\210j\230\001\330\014\016\320\016!\240\024\240Q\320&M\320M^\320^e\320ef\360\006\000\005\024\220<\230q\240\001\330\004/\250q\340\t\n\330\010)\250\021\320*:\270-\300q\330\010\036\230a\230\320.C\3001\360\006\000\005\014\210=\230\002\230#\230W\240A\240Q";
3052
+ static const char __pyx_k_1A_z_8_9RRSSZZdde_a_1HG1_G1F_a[] = "\320\000)\250\021\360>\000\005)\250\t\260\021\260!\360\010\000\005#\240&\250\002\250)\2601\260A\340\004\007\200z\220\021\220'\230\021\330\010\034\320\0348\270\001\3209R\320RS\320SZ\320Zd\320de\330\010\036\230a\340\t\023\2201\220H\230G\2401\330\010\034\230G\2401\240F\250&\260\001\330\010\036\230a\330\010\024\320\024$\240A\240Q\340\r\016\330\014\020\220\005\220U\230!\2301\330\020\024\320\024'\240q\250\001\340\020\023\2202\220S\230\001\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\340\025\027\220s\230!\360\006\000\025\033\230*\240A\330\030\032\320\032-\250T\260\021\3202Y\320Yj\320jq\320qr\360\010\000\t\017\210i\220q\330\014\016\320\016%\240T\250\021\250$\250a\250q\360\006\000\005\010\320\007\027\220q\320\030+\2503\250a\330\010\016\210j\230\001\330\014\016\320\016!\240\024\240Q\320&M\320M^\320^e\320ef\360\006\000\005\024\220<\230q\240\001\330\004/\250q\340\t\n\330\010)\250\021\320*:\270-\300q\330\010\036\230a\230\177\320.C\3001\360\006\000\005\014\210=\230\002\230#\230W\240A\240Q";
3036
3053
  static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
3037
- static const char __pyx_k_Convert_an_address_to_its_EIP_5[] = "\n Convert an address to its EIP-55 checksum format.\n\n This function takes an address in any supported format and returns it in the\n checksummed format as defined by EIP-55. It uses a custom Cython implementation\n for the checksum conversion to optimize performance.\n\n Args:\n value: The address to be converted. It can be in any format supported by\n :func:`eth_utils.to_normalized_address`.\n\n Raises:\n ValueError: If the input address is not in a recognized format.\n TypeError: If the input is not a string, bytes, or any address type.\n\n Examples:\n >>> to_checksum_address(\"0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb\")\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n >>> to_checksum_address(b'\302\264~<\303\2307\303\235\303\270\303\244\303\205\005\303\227\n\302\270e\303\236n\031;\302\273')\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n See Also:\n - :func:`eth_utils.to_checksum_address` for the standard implementation.\n - :func:`to_normalized_address` for converting to a normalized address before checksumming.\n ";
3054
+ static const char __pyx_k_Convert_an_address_to_its_EIP_5[] = "\n Convert an address to its EIP-55 checksum format.\n\n This function takes an address in any supported format and returns it in the\n checksummed format as defined by EIP-55. It uses a custom Cython implementation\n for the checksum conversion to optimize performance.\n\n Args:\n value: The address to be converted. It can be in any format supported by\n :func:`eth_utils.to_normalized_address`.\n\n Raises:\n ValueError: If the input address is not in a recognized format.\n TypeError: If the input is not a string, bytes, or any address type.\n\n Examples:\n >>> to_checksum_address(\"0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb\")\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n >>> to_checksum_address(b'\302\264~<\303\2307\303\235\303\270\303\244\303\205\177\005\303\227\n\302\270e\303\236n\031;\302\273')\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n See Also:\n - :func:`eth_utils.to_checksum_address` for the standard implementation.\n - :func:`to_normalized_address` for converting to a normalized address before checksumming.\n ";
3038
3055
  static const char __pyx_k_Must_be_one_of_bool_str_bytes_b[] = "'. Must be one of: bool, str, bytes, bytearray or int.";
3039
3056
  static const char __pyx_k_when_sending_a_str_it_must_be_a[] = "when sending a str, it must be a hex string. Got: ";
3040
3057
  static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
@@ -3162,6 +3179,9 @@ typedef struct {
3162
3179
  PyObject *__pyx_int_184977713;
3163
3180
  PyObject *__pyx_int_neg_1;
3164
3181
  /* #### Code section: module_state_contents ### */
3182
+ /* CommonTypesMetaclass.module_state_decls */
3183
+ PyTypeObject *__pyx_CommonTypesMetaclassType;
3184
+
3165
3185
  /* CachedMethodType.module_state_decls */
3166
3186
  #if CYTHON_COMPILING_IN_LIMITED_API
3167
3187
  PyObject *__Pyx_CachedMethodType;
@@ -8386,7 +8406,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
8386
8406
  *
8387
8407
  */
8388
8408
  __Pyx_XDECREF(__pyx_r);
8389
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
8409
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
8390
8410
  __Pyx_GOTREF(__pyx_t_1);
8391
8411
  __pyx_r = __pyx_t_1;
8392
8412
  __pyx_t_1 = 0;
@@ -11233,7 +11253,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
11233
11253
  * idx += 1
11234
11254
  *
11235
11255
  */
11236
- if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
11256
+ if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
11237
11257
  }
11238
11258
  __pyx_L5:;
11239
11259
 
@@ -17034,7 +17054,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__
17034
17054
  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
17035
17055
  __PYX_ERR(1, 12, __pyx_L1_error)
17036
17056
  }
17037
- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
17057
+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
17038
17058
  __Pyx_GOTREF(__pyx_t_1);
17039
17059
  __Pyx_GIVEREF(__pyx_t_1);
17040
17060
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
@@ -17077,7 +17097,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__
17077
17097
  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
17078
17098
  __PYX_ERR(1, 14, __pyx_L1_error)
17079
17099
  }
17080
- __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
17100
+ __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
17081
17101
  __Pyx_GOTREF(__pyx_t_7);
17082
17102
  __pyx_t_8 = 0;
17083
17103
  {
@@ -17901,7 +17921,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17901
17921
  PyObject *__pyx_args, PyObject *__pyx_kwds
17902
17922
  #endif
17903
17923
  ); /*proto*/
17904
- PyDoc_STRVAR(__pyx_doc_9cchecksum_9_checksum_to_checksum_address, "to_checksum_address(value: Union[AnyAddress, str, bytes]) -> str\n Convert an address to its EIP-55 checksum format.\n\n This function takes an address in any supported format and returns it in the\n checksummed format as defined by EIP-55. It uses a custom Cython implementation\n for the checksum conversion to optimize performance.\n\n Args:\n value: The address to be converted. It can be in any format supported by\n :func:`eth_utils.to_normalized_address`.\n\n Raises:\n ValueError: If the input address is not in a recognized format.\n TypeError: If the input is not a string, bytes, or any address type.\n\n Examples:\n >>> to_checksum_address(\"0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb\")\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n >>> to_checksum_address(b'\302\264~<\303\2307\303\235\303\270\303\244\303\205\005\303\227\n\302\270e\303\236n\031;\302\273')\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n See Also:\n - :func:`eth_utils.to_checksum_address` for the standard implementation.\n - :func:`to_normalized_address` for converting to a normalized address before checksumming.\n ");
17924
+ PyDoc_STRVAR(__pyx_doc_9cchecksum_9_checksum_to_checksum_address, "to_checksum_address(value: Union[AnyAddress, str, bytes]) -> str\n\n Convert an address to its EIP-55 checksum format.\n\n This function takes an address in any supported format and returns it in the\n checksummed format as defined by EIP-55. It uses a custom Cython implementation\n for the checksum conversion to optimize performance.\n\n Args:\n value: The address to be converted. It can be in any format supported by\n :func:`eth_utils.to_normalized_address`.\n\n Raises:\n ValueError: If the input address is not in a recognized format.\n TypeError: If the input is not a string, bytes, or any address type.\n\n Examples:\n >>> to_checksum_address(\"0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb\")\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n >>> to_checksum_address(b'\302\264~<\303\2307\303\235\303\270\303\244\303\205\177\005\303\227\n\302\270e\303\236n\031;\302\273')\n '0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'\n\n See Also:\n - :func:`eth_utils.to_checksum_address` for the standard implementation.\n - :func:`to_normalized_address` for converting to a normalized address before checksumming.\n ");
17905
17925
  static PyMethodDef __pyx_mdef_9cchecksum_9_checksum_1to_checksum_address = {"to_checksum_address", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cchecksum_9_checksum_1to_checksum_address, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cchecksum_9_checksum_to_checksum_address};
17906
17926
  static PyObject *__pyx_pw_9cchecksum_9_checksum_1to_checksum_address(PyObject *__pyx_self,
17907
17927
  #if CYTHON_METH_FASTCALL
@@ -22050,15 +22070,15 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
22050
22070
  /*--- Type import code ---*/
22051
22071
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
22052
22072
  __Pyx_GOTREF(__pyx_t_1);
22053
- __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_1(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
22073
+ __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
22054
22074
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
22055
- sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_1(PyTypeObject),
22075
+ sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PyTypeObject),
22056
22076
  #elif CYTHON_COMPILING_IN_LIMITED_API
22057
22077
  0, 0,
22058
22078
  #else
22059
- sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_1(PyHeapTypeObject),
22079
+ sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PyHeapTypeObject),
22060
22080
  #endif
22061
- __Pyx_ImportType_CheckSize_Warn_3_1_1); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
22081
+ __Pyx_ImportType_CheckSize_Warn_3_1_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
22062
22082
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22063
22083
  __Pyx_RefNannyFinishContext();
22064
22084
  return 0;
@@ -22328,6 +22348,13 @@ __Pyx_RefNannySetupContext("PyInit__checksum", 0);
22328
22348
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
22329
22349
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
22330
22350
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
22351
+ /*--- Initialize various global constants etc. ---*/
22352
+ if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22353
+ stringtab_initialized = 1;
22354
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22355
+ #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED)
22356
+ if (__pyx_CommonTypesMetaclass_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22357
+ #endif
22331
22358
  #ifdef __Pyx_CyFunction_USED
22332
22359
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22333
22360
  #endif
@@ -22344,10 +22371,6 @@ __Pyx_RefNannySetupContext("PyInit__checksum", 0);
22344
22371
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22345
22372
  #endif
22346
22373
  /*--- Library function declarations ---*/
22347
- /*--- Initialize various global constants etc. ---*/
22348
- if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22349
- stringtab_initialized = 1;
22350
- if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22351
22374
  if (__pyx_module_is_main_cchecksum___checksum) {
22352
22375
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22353
22376
  }
@@ -23084,11 +23107,11 @@ __Pyx_RefNannySetupContext("PyInit__checksum", 0);
23084
23107
 
23085
23108
  typedef struct {
23086
23109
  const char *s;
23087
- #if 1146 <= 65535
23110
+ #if 1149 <= 65535
23088
23111
  const unsigned short n;
23089
- #elif 1146 / 2 < INT_MAX
23112
+ #elif 1149 / 2 < INT_MAX
23090
23113
  const unsigned int n;
23091
- #elif 1146 / 2 < LONG_MAX
23114
+ #elif 1149 / 2 < LONG_MAX
23092
23115
  const unsigned long n;
23093
23116
  #else
23094
23117
  const Py_ssize_t n;
@@ -26278,24 +26301,83 @@ static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visi
26278
26301
  }
26279
26302
  #endif
26280
26303
 
26304
+ /* LimitedApiGetTypeDict */
26305
+ #if CYTHON_COMPILING_IN_LIMITED_API
26306
+ static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
26307
+ PyObject *tp_dictoffset_o;
26308
+ Py_ssize_t tp_dictoffset;
26309
+ tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
26310
+ if (unlikely(!tp_dictoffset_o)) return -1;
26311
+ tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
26312
+ Py_DECREF(tp_dictoffset_o);
26313
+ if (unlikely(tp_dictoffset == 0)) {
26314
+ PyErr_SetString(
26315
+ PyExc_TypeError,
26316
+ "'type' doesn't have a dictoffset");
26317
+ return -1;
26318
+ } else if (unlikely(tp_dictoffset < 0)) {
26319
+ PyErr_SetString(
26320
+ PyExc_TypeError,
26321
+ "'type' has an unexpected negative dictoffset. "
26322
+ "Please report this as Cython bug");
26323
+ return -1;
26324
+ }
26325
+ return tp_dictoffset;
26326
+ }
26327
+ static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
26328
+ static Py_ssize_t tp_dictoffset = 0;
26329
+ if (unlikely(tp_dictoffset == 0)) {
26330
+ tp_dictoffset = __Pyx_GetTypeDictOffset();
26331
+ if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
26332
+ tp_dictoffset = 0; // try again next time?
26333
+ return NULL;
26334
+ }
26335
+ }
26336
+ return *(PyObject**)((char*)tp + tp_dictoffset);
26337
+ }
26338
+ #endif
26339
+
26340
+ /* SetItemOnTypeDict */
26341
+ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
26342
+ int result;
26343
+ PyObject *tp_dict;
26344
+ #if CYTHON_COMPILING_IN_LIMITED_API
26345
+ tp_dict = __Pyx_GetTypeDict(tp);
26346
+ if (unlikely(!tp_dict)) return -1;
26347
+ #else
26348
+ tp_dict = tp->tp_dict;
26349
+ #endif
26350
+ result = PyDict_SetItem(tp_dict, k, v);
26351
+ if (likely(!result)) {
26352
+ PyType_Modified(tp);
26353
+ if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
26354
+ PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
26355
+ if (!setNameResult) return -1;
26356
+ Py_DECREF(setNameResult);
26357
+ }
26358
+ }
26359
+ return result;
26360
+ }
26361
+
26281
26362
  /* FixUpExtensionType */
26282
26363
  static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
26283
- #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
26364
+ #if __PYX_LIMITED_VERSION_HEX > 0x030900B1
26284
26365
  CYTHON_UNUSED_VAR(spec);
26285
26366
  CYTHON_UNUSED_VAR(type);
26367
+ CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
26286
26368
  #else
26287
26369
  const PyType_Slot *slot = spec->slots;
26370
+ int changed = 0;
26371
+ #if !CYTHON_COMPILING_IN_LIMITED_API
26288
26372
  while (slot && slot->slot && slot->slot != Py_tp_members)
26289
26373
  slot++;
26290
26374
  if (slot && slot->slot == Py_tp_members) {
26291
- int changed = 0;
26292
- #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
26375
+ #if !CYTHON_COMPILING_IN_CPYTHON
26293
26376
  const
26294
- #endif
26377
+ #endif // !CYTHON_COMPILING_IN_CPYTHON)
26295
26378
  PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
26296
26379
  while (memb && memb->name) {
26297
26380
  if (memb->name[0] == '_' && memb->name[1] == '_') {
26298
- #if PY_VERSION_HEX < 0x030900b1
26299
26381
  if (strcmp(memb->name, "__weaklistoffset__") == 0) {
26300
26382
  assert(memb->type == T_PYSSIZET);
26301
26383
  assert(memb->flags == READONLY);
@@ -26319,11 +26401,8 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
26319
26401
  #endif
26320
26402
  changed = 1;
26321
26403
  }
26322
- #endif
26323
- #else
26324
- if ((0));
26325
- #endif
26326
- #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
26404
+ #endif // CYTHON_METH_FASTCALL
26405
+ #if !CYTHON_COMPILING_IN_PYPY
26327
26406
  else if (strcmp(memb->name, "__module__") == 0) {
26328
26407
  PyObject *descr;
26329
26408
  assert(memb->type == T_OBJECT);
@@ -26331,21 +26410,55 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
26331
26410
  descr = PyDescr_NewMember(type, memb);
26332
26411
  if (unlikely(!descr))
26333
26412
  return -1;
26334
- if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
26335
- Py_DECREF(descr);
26413
+ int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
26414
+ Py_DECREF(descr);
26415
+ if (unlikely(set_item_result < 0)) {
26336
26416
  return -1;
26337
26417
  }
26338
- Py_DECREF(descr);
26339
26418
  changed = 1;
26340
26419
  }
26341
- #endif
26420
+ #endif // !CYTHON_COMPILING_IN_PYPY
26342
26421
  }
26343
26422
  memb++;
26344
26423
  }
26345
- if (changed)
26346
- PyType_Modified(type);
26347
26424
  }
26348
- #endif
26425
+ #endif // !CYTHON_COMPILING_IN_LIMITED_API
26426
+ #if !CYTHON_COMPILING_IN_PYPY
26427
+ slot = spec->slots;
26428
+ while (slot && slot->slot && slot->slot != Py_tp_getset)
26429
+ slot++;
26430
+ if (slot && slot->slot == Py_tp_getset) {
26431
+ PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
26432
+ while (getset && getset->name) {
26433
+ if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
26434
+ PyObject *descr = PyDescr_NewGetSet(type, getset);
26435
+ if (unlikely(!descr))
26436
+ return -1;
26437
+ #if CYTHON_COMPILING_IN_LIMITED_API
26438
+ PyObject *pyname = PyUnicode_FromString(getset->name);
26439
+ if (unlikely(!pyname)) {
26440
+ Py_DECREF(descr);
26441
+ return -1;
26442
+ }
26443
+ int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
26444
+ Py_DECREF(pyname);
26445
+ #else
26446
+ CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
26447
+ int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
26448
+ #endif
26449
+ Py_DECREF(descr);
26450
+ if (unlikely(set_item_result < 0)) {
26451
+ return -1;
26452
+ }
26453
+ changed = 1;
26454
+ }
26455
+ ++getset;
26456
+ }
26457
+ }
26458
+ #endif // !CYTHON_COMPILING_IN_PYPY
26459
+ if (changed)
26460
+ PyType_Modified(type);
26461
+ #endif // PY_VERSION_HEX > 0x030900B1
26349
26462
  return 0;
26350
26463
  }
26351
26464
 
@@ -26447,6 +26560,13 @@ try_unpack:
26447
26560
 
26448
26561
  /* PyObjectCallMethod0 */
26449
26562
  static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
26563
+ #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
26564
+ PyObject *args[1] = {obj};
26565
+ (void) __Pyx_PyObject_GetMethod;
26566
+ (void) __Pyx_PyObject_CallOneArg;
26567
+ (void) __Pyx_PyObject_CallNoArg;
26568
+ return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
26569
+ #else
26450
26570
  PyObject *method = NULL, *result = NULL;
26451
26571
  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
26452
26572
  if (likely(is_method)) {
@@ -26459,6 +26579,7 @@ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name
26459
26579
  Py_DECREF(method);
26460
26580
  bad:
26461
26581
  return result;
26582
+ #endif
26462
26583
  }
26463
26584
 
26464
26585
  /* ValidateBasesTuple */
@@ -26763,42 +26884,6 @@ other_failure:
26763
26884
  return -1;
26764
26885
  }
26765
26886
 
26766
- /* LimitedApiGetTypeDict */
26767
- #if CYTHON_COMPILING_IN_LIMITED_API
26768
- static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
26769
- PyObject *tp_dictoffset_o;
26770
- Py_ssize_t tp_dictoffset;
26771
- tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
26772
- if (unlikely(!tp_dictoffset_o)) return -1;
26773
- tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
26774
- Py_DECREF(tp_dictoffset_o);
26775
- if (unlikely(tp_dictoffset == 0)) {
26776
- PyErr_SetString(
26777
- PyExc_TypeError,
26778
- "'type' doesn't have a dictoffset");
26779
- return -1;
26780
- } else if (unlikely(tp_dictoffset < 0)) {
26781
- PyErr_SetString(
26782
- PyExc_TypeError,
26783
- "'type' has an unexpected negative dictoffset. "
26784
- "Please report this as Cython bug");
26785
- return -1;
26786
- }
26787
- return tp_dictoffset;
26788
- }
26789
- static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
26790
- static Py_ssize_t tp_dictoffset = 0;
26791
- if (unlikely(tp_dictoffset == 0)) {
26792
- tp_dictoffset = __Pyx_GetTypeDictOffset();
26793
- if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
26794
- tp_dictoffset = 0; // try again next time?
26795
- return NULL;
26796
- }
26797
- }
26798
- return *(PyObject**)((char*)tp + tp_dictoffset);
26799
- }
26800
- #endif
26801
-
26802
26887
  /* DelItemOnTypeDict */
26803
26888
  static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
26804
26889
  int result;
@@ -26814,28 +26899,6 @@ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
26814
26899
  return result;
26815
26900
  }
26816
26901
 
26817
- /* SetItemOnTypeDict */
26818
- static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
26819
- int result;
26820
- PyObject *tp_dict;
26821
- #if CYTHON_COMPILING_IN_LIMITED_API
26822
- tp_dict = __Pyx_GetTypeDict(tp);
26823
- if (unlikely(!tp_dict)) return -1;
26824
- #else
26825
- tp_dict = tp->tp_dict;
26826
- #endif
26827
- result = PyDict_SetItem(tp_dict, k, v);
26828
- if (likely(!result)) {
26829
- PyType_Modified(tp);
26830
- if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
26831
- PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
26832
- if (!setNameResult) return -1;
26833
- Py_DECREF(setNameResult);
26834
- }
26835
- }
26836
- return result;
26837
- }
26838
-
26839
26902
  /* SetupReduce */
26840
26903
  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
26841
26904
  int ret;
@@ -26946,15 +27009,15 @@ __PYX_GOOD:
26946
27009
  }
26947
27010
 
26948
27011
  /* TypeImport */
26949
- #ifndef __PYX_HAVE_RT_ImportType_3_1_1
26950
- #define __PYX_HAVE_RT_ImportType_3_1_1
26951
- static PyTypeObject *__Pyx_ImportType_3_1_1(PyObject *module, const char *module_name, const char *class_name,
26952
- size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_1 check_size)
27012
+ #ifndef __PYX_HAVE_RT_ImportType_3_1_4
27013
+ #define __PYX_HAVE_RT_ImportType_3_1_4
27014
+ static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject *module, const char *module_name, const char *class_name,
27015
+ size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size)
26953
27016
  {
26954
27017
  PyObject *result = 0;
26955
27018
  Py_ssize_t basicsize;
26956
27019
  Py_ssize_t itemsize;
26957
- #if CYTHON_COMPILING_IN_LIMITED_API
27020
+ #ifdef Py_LIMITED_API
26958
27021
  PyObject *py_basicsize;
26959
27022
  PyObject *py_itemsize;
26960
27023
  #endif
@@ -26967,7 +27030,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_1(PyObject *module, const char *module
26967
27030
  module_name, class_name);
26968
27031
  goto bad;
26969
27032
  }
26970
- #if !CYTHON_COMPILING_IN_LIMITED_API
27033
+ #ifndef Py_LIMITED_API
26971
27034
  basicsize = ((PyTypeObject *)result)->tp_basicsize;
26972
27035
  itemsize = ((PyTypeObject *)result)->tp_itemsize;
26973
27036
  #else
@@ -27005,7 +27068,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_1(PyObject *module, const char *module
27005
27068
  module_name, class_name, size, basicsize+itemsize);
27006
27069
  goto bad;
27007
27070
  }
27008
- if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_1 &&
27071
+ if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_4 &&
27009
27072
  ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
27010
27073
  PyErr_Format(PyExc_ValueError,
27011
27074
  "%.200s.%.200s size changed, may indicate binary incompatibility. "
@@ -27013,7 +27076,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_1(PyObject *module, const char *module
27013
27076
  module_name, class_name, size, basicsize, basicsize+itemsize);
27014
27077
  goto bad;
27015
27078
  }
27016
- else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_1 && (size_t)basicsize > size) {
27079
+ else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_4 && (size_t)basicsize > size) {
27017
27080
  if (PyErr_WarnFormat(NULL, 0,
27018
27081
  "%.200s.%.200s size changed, may indicate binary incompatibility. "
27019
27082
  "Expected %zd from C header, got %zd from PyObject",
@@ -27070,6 +27133,24 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke
27070
27133
  }
27071
27134
 
27072
27135
  /* FetchCommonType */
27136
+ #if __PYX_LIMITED_VERSION_HEX < 0x030C0000
27137
+ static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
27138
+ PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
27139
+ if (result && metaclass) {
27140
+ PyObject *old_tp = (PyObject*)Py_TYPE(result);
27141
+ Py_INCREF((PyObject*)metaclass);
27142
+ #if __PYX_LIMITED_VERSION_HEX >= 0x03090000
27143
+ Py_SET_TYPE(result, metaclass);
27144
+ #else
27145
+ result->ob_type = metaclass;
27146
+ #endif
27147
+ Py_DECREF(old_tp);
27148
+ }
27149
+ return result;
27150
+ }
27151
+ #else
27152
+ #define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
27153
+ #endif
27073
27154
  static int __Pyx_VerifyCachedType(PyObject *cached_type,
27074
27155
  const char *name,
27075
27156
  Py_ssize_t expected_basicsize) {
@@ -27079,6 +27160,9 @@ static int __Pyx_VerifyCachedType(PyObject *cached_type,
27079
27160
  "Shared Cython type %.200s is not a type object", name);
27080
27161
  return -1;
27081
27162
  }
27163
+ if (expected_basicsize == 0) {
27164
+ return 0; // size is inherited, nothing useful to check
27165
+ }
27082
27166
  #if CYTHON_COMPILING_IN_LIMITED_API
27083
27167
  PyObject *py_basicsize;
27084
27168
  py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
@@ -27098,7 +27182,7 @@ static int __Pyx_VerifyCachedType(PyObject *cached_type,
27098
27182
  }
27099
27183
  return 0;
27100
27184
  }
27101
- static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
27185
+ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
27102
27186
  PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
27103
27187
  int get_item_ref_result;
27104
27188
  const char* object_name = strrchr(spec->name, '.');
@@ -27122,7 +27206,7 @@ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec
27122
27206
  goto bad;
27123
27207
  }
27124
27208
  CYTHON_UNUSED_VAR(module);
27125
- cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
27209
+ cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases);
27126
27210
  if (unlikely(!cached_type)) goto bad;
27127
27211
  if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
27128
27212
  new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1);
@@ -27151,6 +27235,43 @@ bad:
27151
27235
  goto done;
27152
27236
  }
27153
27237
 
27238
+ /* CommonTypesMetaclass */
27239
+ static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
27240
+ return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
27241
+ }
27242
+ static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
27243
+ {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
27244
+ {0, 0, 0, 0, 0}
27245
+ };
27246
+ static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
27247
+ {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
27248
+ {0, 0}
27249
+ };
27250
+ static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
27251
+ __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
27252
+ 0,
27253
+ 0,
27254
+ #if PY_VERSION_HEX >= 0x030A0000
27255
+ Py_TPFLAGS_IMMUTABLETYPE |
27256
+ Py_TPFLAGS_DISALLOW_INSTANTIATION |
27257
+ #endif
27258
+ Py_TPFLAGS_DEFAULT,
27259
+ __pyx_CommonTypesMetaclass_slots
27260
+ };
27261
+ static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
27262
+ __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
27263
+ PyObject *bases = PyTuple_Pack(1, &PyType_Type);
27264
+ if (unlikely(!bases)) {
27265
+ return -1;
27266
+ }
27267
+ mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
27268
+ Py_DECREF(bases);
27269
+ if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
27270
+ return -1;
27271
+ }
27272
+ return 0;
27273
+ }
27274
+
27154
27275
  /* PyMethodNew */
27155
27276
  #if CYTHON_COMPILING_IN_LIMITED_API
27156
27277
  static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
@@ -28248,7 +28369,8 @@ static PyType_Spec __pyx_CyFunctionType_spec = {
28248
28369
  };
28249
28370
  static int __pyx_CyFunction_init(PyObject *module) {
28250
28371
  __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
28251
- mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
28372
+ mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
28373
+ mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
28252
28374
  if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
28253
28375
  return -1;
28254
28376
  }
@@ -30844,6 +30966,10 @@ __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
30844
30966
  PyCode_NewWithPosOnlyArgs
30845
30967
  #endif
30846
30968
  (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
30969
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
30970
+ if (likely(result))
30971
+ result->_co_firsttraceable = 0;
30972
+ #endif
30847
30973
  return result;
30848
30974
  }
30849
30975
  #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cchecksum
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: A ~8x faster drop-in replacement for eth_utils.to_checksum_address. Raises the exact same Exceptions. Implemented in C.
5
5
  Home-page: https://github.com/BobTheBuidler/cchecksum
6
6
  Author: BobTheBuidler
@@ -25,6 +25,9 @@ Dynamic: summary
25
25
 
26
26
  ## CChecksum
27
27
 
28
+ [![PyPI](https://img.shields.io/pypi/v/cchecksum.svg?logo=Python&logoColor=white)](https://pypi.org/project/cchecksum/)
29
+ [![Monthly Downloads](https://img.shields.io/pypi/dm/cchecksum)](https://pypistats.org/packages/cchecksum)
30
+
28
31
  CChecksum is a ~8x faster drop-in replacement for eth_utils.to_checksum_address, with the most cpu-intensive part implemented in c.
29
32
 
30
33
  It keeps the exact same API as the existing implementation, exceptions and all.
@@ -0,0 +1,12 @@
1
+ cchecksum/__init__.py,sha256=fafE-7zsvZEXsb9R-xAGud6-MaSgBPAD62ccWPGjQtw,437
2
+ cchecksum/_checksum.c,sha256=iPPgnF0DQ6zOr4dQByP9FxpOg-mwBjMO6YnzQLB0Vuc,1179018
3
+ cchecksum/_checksum.cpython-310-x86_64-linux-gnu.so,sha256=7mRicJK-K_92hxhEVsT4izw1phVoRbwzlV255edq9GA,1180792
4
+ cchecksum/_checksum.pyi,sha256=4f0RJE47-cRH74C3ChN3JZqITUGtlg5wZtzuZaePm7g,2320
5
+ cchecksum/_checksum.pyx,sha256=W9yFwnxv9J-7LLm5e1eCZdFpwgSnNJ_btqadArd4UVg,15662
6
+ cchecksum/monkey_patch.py,sha256=ZCHPmfgeD6nOY9Gw2wU8d5qsBJMX-gymS-FryZ63IfQ,1540
7
+ cchecksum/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ cchecksum-0.3.2.dist-info/METADATA,sha256=tTYgcQvZpwOwDZpr8JTkimr5laSlRqsN4MsQYOZVv_Q,1410
9
+ cchecksum-0.3.2.dist-info/WHEEL,sha256=YJPq7zroHSsdctrb_KymZ4ss41PkmaA9SD9TZzqKSX8,112
10
+ cchecksum-0.3.2.dist-info/top_level.txt,sha256=Qm8-fG-PzUlKgrtwwH508kIYkP63C2tRYA1qePeqAZQ,10
11
+ cchecksum-0.3.2.dist-info/RECORD,,
12
+ cchecksum-0.3.2.dist-info/licenses/LICENSE,sha256=qakxXN2B307yD6T3mvzxR7reyaih9WyLgpLoA3QoWdI,1070
@@ -1,12 +0,0 @@
1
- cchecksum/__init__.py,sha256=fafE-7zsvZEXsb9R-xAGud6-MaSgBPAD62ccWPGjQtw,437
2
- cchecksum/_checksum.c,sha256=pEGRudvfL0IopksyFnmrfBpPxXBSjsWqhWWgtvXCqRM,1173714
3
- cchecksum/_checksum.cpython-310-x86_64-linux-gnu.so,sha256=PyfL3YypHASfCe5btnE3HPXGYYoHRyR2FwgoGZGoPnM,1178392
4
- cchecksum/_checksum.pyi,sha256=4f0RJE47-cRH74C3ChN3JZqITUGtlg5wZtzuZaePm7g,2320
5
- cchecksum/_checksum.pyx,sha256=W9yFwnxv9J-7LLm5e1eCZdFpwgSnNJ_btqadArd4UVg,15662
6
- cchecksum/monkey_patch.py,sha256=ZCHPmfgeD6nOY9Gw2wU8d5qsBJMX-gymS-FryZ63IfQ,1540
7
- cchecksum/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- cchecksum-0.3.1.dist-info/METADATA,sha256=ts9ubjvuwxC1r8vpuhkNe70-wTuqloBsq6aHNzHmjqc,1182
9
- cchecksum-0.3.1.dist-info/WHEEL,sha256=YJPq7zroHSsdctrb_KymZ4ss41PkmaA9SD9TZzqKSX8,112
10
- cchecksum-0.3.1.dist-info/top_level.txt,sha256=Qm8-fG-PzUlKgrtwwH508kIYkP63C2tRYA1qePeqAZQ,10
11
- cchecksum-0.3.1.dist-info/RECORD,,
12
- cchecksum-0.3.1.dist-info/licenses/LICENSE,sha256=qakxXN2B307yD6T3mvzxR7reyaih9WyLgpLoA3QoWdI,1070