cchecksum 0.0.9__tar.gz → 0.0.10__tar.gz

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.

Files changed (43) hide show
  1. {cchecksum-0.0.9 → cchecksum-0.0.10}/.github/workflows/deploy-docs.yaml +6 -3
  2. {cchecksum-0.0.9/cchecksum.egg-info → cchecksum-0.0.10}/PKG-INFO +1 -1
  3. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum/_checksum.c +16 -36
  4. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum/_checksum.pyi +1 -1
  5. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum/_checksum.pyx +1 -1
  6. {cchecksum-0.0.9 → cchecksum-0.0.10/cchecksum.egg-info}/PKG-INFO +1 -1
  7. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/conf.py +1 -0
  8. {cchecksum-0.0.9 → cchecksum-0.0.10}/.github/workflows/black.yaml +0 -0
  9. {cchecksum-0.0.9 → cchecksum-0.0.10}/.github/workflows/pytest.yaml +0 -0
  10. {cchecksum-0.0.9 → cchecksum-0.0.10}/.github/workflows/release.yaml +0 -0
  11. {cchecksum-0.0.9 → cchecksum-0.0.10}/.gitignore +0 -0
  12. {cchecksum-0.0.9 → cchecksum-0.0.10}/LICENSE +0 -0
  13. {cchecksum-0.0.9 → cchecksum-0.0.10}/Makefile +0 -0
  14. {cchecksum-0.0.9 → cchecksum-0.0.10}/README.md +0 -0
  15. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum/__init__.py +0 -0
  16. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum/checksum.py +0 -0
  17. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum/checksum.pyi +0 -0
  18. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum/py.typed +0 -0
  19. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum.egg-info/SOURCES.txt +0 -0
  20. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum.egg-info/dependency_links.txt +0 -0
  21. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum.egg-info/not-zip-safe +0 -0
  22. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum.egg-info/requires.txt +0 -0
  23. {cchecksum-0.0.9 → cchecksum-0.0.10}/cchecksum.egg-info/top_level.txt +0 -0
  24. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/Makefile +0 -0
  25. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/alabaster.css +0 -0
  26. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/basic.css +0 -0
  27. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/custom.css +0 -0
  28. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/doctools.js +0 -0
  29. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/documentation_options.js +0 -0
  30. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/file.png +0 -0
  31. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/language_data.js +0 -0
  32. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/minus.png +0 -0
  33. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/plus.png +0 -0
  34. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/pygments.css +0 -0
  35. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/searchtools.js +0 -0
  36. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/_build/html/_static/sphinx_highlight.js +0 -0
  37. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/index.rst +0 -0
  38. {cchecksum-0.0.9 → cchecksum-0.0.10}/docs/make.bat +0 -0
  39. {cchecksum-0.0.9 → cchecksum-0.0.10}/pyproject.toml +0 -0
  40. {cchecksum-0.0.9 → cchecksum-0.0.10}/requirements.txt +0 -0
  41. {cchecksum-0.0.9 → cchecksum-0.0.10}/setup.cfg +0 -0
  42. {cchecksum-0.0.9 → cchecksum-0.0.10}/setup.py +0 -0
  43. {cchecksum-0.0.9 → cchecksum-0.0.10}/test_checksum.py +0 -0
@@ -5,6 +5,9 @@ on:
5
5
  branches:
6
6
  - master
7
7
 
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress: true
8
11
 
9
12
  # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10
13
  permissions:
@@ -16,13 +19,12 @@ permissions:
16
19
  jobs:
17
20
  build-and-deploy:
18
21
  runs-on: ubuntu-latest
19
-
20
- environment:
21
- name: github-pages
22
22
 
23
23
  steps:
24
24
  - name: Check out code
25
25
  uses: actions/checkout@v2
26
+ with:
27
+ persist-credentials: false
26
28
 
27
29
  - name: Set up Python
28
30
  uses: actions/setup-python@v2
@@ -55,6 +57,7 @@ jobs:
55
57
  uses: actions/checkout@v4
56
58
  with:
57
59
  ref: gh-pages
60
+ persist-credentials: false
58
61
 
59
62
  - name: Setup Pages
60
63
  uses: actions/configure-pages@v4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cchecksum
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A ~2x 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
@@ -2599,32 +2599,12 @@ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_s
2599
2599
  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2600
2600
  }
2601
2601
 
2602
- /* decode_c_bytes.proto */
2603
- static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
2604
- const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
2602
+ /* decode_c_string.proto */
2603
+ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2604
+ const char* cstring, Py_ssize_t start, Py_ssize_t stop,
2605
2605
  const char* encoding, const char* errors,
2606
2606
  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
2607
2607
 
2608
- /* decode_bytes.proto */
2609
- static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
2610
- PyObject* string, Py_ssize_t start, Py_ssize_t stop,
2611
- const char* encoding, const char* errors,
2612
- PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
2613
- char* as_c_string;
2614
- Py_ssize_t size;
2615
- #if CYTHON_ASSUME_SAFE_MACROS
2616
- as_c_string = PyBytes_AS_STRING(string);
2617
- size = PyBytes_GET_SIZE(string);
2618
- #else
2619
- if (PyBytes_AsStringAndSize(string, &as_c_string, &size) < 0) {
2620
- return NULL;
2621
- }
2622
- #endif
2623
- return __Pyx_decode_c_bytes(
2624
- as_c_string, size,
2625
- start, stop, encoding, errors, decode_func);
2626
- }
2627
-
2628
2608
  /* PyObject_GenericGetAttrNoDict.proto */
2629
2609
  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2630
2610
  static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
@@ -18270,18 +18250,12 @@ static PyObject *__pyx_pf_9cchecksum_9_checksum_cchecksum(CYTHON_UNUSED PyObject
18270
18250
  /* "cchecksum/_checksum.pyx":55
18271
18251
  * # NOTE: For some reason on some systems the buffer length is longer than 42 here, even though that should not be possible.
18272
18252
  * # Lucky for us, the first 42 characters are always correct. One day maybe I'll debug this.
18273
- * return bytes(buffer[:42]).decode('ascii') # <<<<<<<<<<<<<<
18253
+ * return buffer[:42].decode('ascii') # <<<<<<<<<<<<<<
18274
18254
  */
18275
18255
  __Pyx_TraceLine(55,0,__PYX_ERR(0, 55, __pyx_L1_error))
18276
18256
  __Pyx_XDECREF(__pyx_r);
18277
- __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_buffer) + 0, 42 - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
18278
- __Pyx_GOTREF(__pyx_t_3);
18279
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
18280
- __Pyx_GOTREF(__pyx_t_1);
18281
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18282
- __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
18257
+ __pyx_t_3 = __Pyx_decode_c_string(((char const *)__pyx_v_buffer), 0, 42, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
18283
18258
  __Pyx_GOTREF(__pyx_t_3);
18284
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18285
18259
  __pyx_r = ((PyObject*)__pyx_t_3);
18286
18260
  __pyx_t_3 = 0;
18287
18261
  goto __pyx_L0;
@@ -23269,12 +23243,20 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
23269
23243
  }
23270
23244
  }
23271
23245
 
23272
- /* decode_c_bytes */
23273
- static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
23274
- const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
23246
+ /* decode_c_string */
23247
+ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
23248
+ const char* cstring, Py_ssize_t start, Py_ssize_t stop,
23275
23249
  const char* encoding, const char* errors,
23276
23250
  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
23251
+ Py_ssize_t length;
23277
23252
  if (unlikely((start < 0) | (stop < 0))) {
23253
+ size_t slen = strlen(cstring);
23254
+ if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
23255
+ PyErr_SetString(PyExc_OverflowError,
23256
+ "c-string too long to convert to Python");
23257
+ return NULL;
23258
+ }
23259
+ length = (Py_ssize_t) slen;
23278
23260
  if (start < 0) {
23279
23261
  start += length;
23280
23262
  if (start < 0)
@@ -23283,8 +23265,6 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
23283
23265
  if (stop < 0)
23284
23266
  stop += length;
23285
23267
  }
23286
- if (stop > length)
23287
- stop = length;
23288
23268
  if (unlikely(stop <= start))
23289
23269
  return __Pyx_NewRef(__pyx_empty_unicode);
23290
23270
  length = stop - start;
@@ -1,3 +1,3 @@
1
1
  from eth_typing import ChecksumAddress
2
2
 
3
- def cchecksum(norm_address_no_0x: str, address_hash_hex_no_0x: bytearray) -> ChecksumAddress: ...
3
+ def cchecksum(norm_address_no_0x: str, address_hash_hex_no_0x: bytes) -> ChecksumAddress: ...
@@ -52,4 +52,4 @@ def cchecksum(str norm_address_no_0x, const unsigned char[::1] address_hash_hex_
52
52
 
53
53
  # NOTE: For some reason on some systems the buffer length is longer than 42 here, even though that should not be possible.
54
54
  # Lucky for us, the first 42 characters are always correct. One day maybe I'll debug this.
55
- return bytes(buffer[:42]).decode('ascii')
55
+ return buffer[:42].decode('ascii')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cchecksum
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A ~2x 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
@@ -36,6 +36,7 @@ exclude_patterns = [
36
36
  # Looks for objects in documentation of external libraries
37
37
  intersphinx_mapping = {
38
38
  "eth_typing": ("https://eth-typing.readthedocs.io/en/stable/", None),
39
+ "eth_utils": ("https://eth-utils.readthedocs.io/en/stable/", None),
39
40
  "python": ("https://docs.python.org/3", None),
40
41
  }
41
42
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes