crcmod-plus 2.1.0__tar.gz → 2.2.0__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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: crcmod-plus
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: CRC generator - modernized
5
5
  Author-email: Ray Buvel <rlbuvel@gmail.com>
6
6
  Maintainer-email: Tamas Nepusz <tamas@sxd.hu>
@@ -54,8 +54,11 @@ Classifier: Topic :: Scientific/Engineering :: Mathematics
54
54
  Classifier: Topic :: Utilities
55
55
  Requires-Python: >=3.7
56
56
  Description-Content-Type: text/markdown
57
- Provides-Extra: dev
58
57
  License-File: LICENSE.txt
58
+ Requires-Dist: typing_extensions; python_version < "3.8"
59
+ Provides-Extra: dev
60
+ Requires-Dist: pytest; extra == "dev"
61
+ Dynamic: license-file
59
62
 
60
63
  [![Build status](https://github.com/ntamas/crcmod-plus/actions/workflows/build.yml/badge.svg)](https://github.com/ntamas/crcmod-plus/actions/workflows/build.yml)
61
64
 
@@ -604,5 +604,9 @@ PyInit__crcfunext(void)
604
604
  Py_FatalError("crcfunext: One of the data types is invalid");
605
605
  }
606
606
 
607
- return PyModule_Create(&moduleDef);
607
+ PyObject* mod = PyModule_Create(&moduleDef);
608
+ #ifdef Py_GIL_DISABLED
609
+ PyUnstable_Module_SetGIL(mod, Py_MOD_GIL_NOT_USED);
610
+ #endif
611
+ return mod;
608
612
  }
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "crcmod-plus"
7
- version = "2.1.0"
7
+ version = "2.2.0"
8
8
  authors = [{ name = "Ray Buvel", email = "rlbuvel@gmail.com" }]
9
9
  description = "CRC generator - modernized"
10
10
  readme = "README.md"
@@ -45,7 +45,10 @@ Source = "https://github.com/ntamas/crcmod-plus"
45
45
  [project.optional-dependencies]
46
46
  dev = ["pytest"]
47
47
 
48
- [tool.ruff.extend-per-file-ignores]
48
+ [tool.cibuildwheel]
49
+ enable = ["cpython-freethreading", "pypy"]
50
+
51
+ [tool.ruff.lint.extend-per-file-ignores]
49
52
  "predefined.py" = ["E501"]
50
53
 
51
54
  [tool.setuptools.packages.find]
@@ -1,12 +1,21 @@
1
1
  from platform import python_implementation
2
2
  from setuptools import setup, Extension
3
3
  from sys import version_info
4
+ import sysconfig
4
5
  from wheel.bdist_wheel import bdist_wheel
5
6
 
7
+
8
+ def is_freethread():
9
+ if sysconfig.get_config_var("Py_GIL_DISABLED"):
10
+ return True
11
+ return False
12
+
13
+
6
14
  # fmt: off
7
15
  can_use_limited_api = (
8
16
  python_implementation() == "CPython" and
9
- version_info >= (3, 11, 0)
17
+ version_info >= (3, 11, 0) and
18
+ not is_freethread()
10
19
  )
11
20
  # fmt: on
12
21
 
@@ -32,6 +41,7 @@ setup_args = dict(
32
41
  ext_modules=[
33
42
  Extension("crcmod._crcfunext", ["lib/_crcfunext.c"], **extension_kwargs)
34
43
  ],
44
+ package_dir={"": "src"},
35
45
  cmdclass={"bdist_wheel": bdist_wheel_abi3},
36
46
  )
37
47
 
@@ -1,2 +1,2 @@
1
- __version_tuple__ = (2, 1, 0)
1
+ __version_tuple__ = (2, 2, 0)
2
2
  __version__ = ".".join(map(str, __version_tuple__))
@@ -38,8 +38,9 @@ Buffer = Union[str, bytes, bytearray, memoryview, array]
38
38
  class CrcFun(Protocol):
39
39
  """Type alias for CRC calculator functions created by this module."""
40
40
 
41
- def __call__(self, data: Buffer, crc: int = ..., table: Sequence[int] = ...) -> int:
42
- ...
41
+ def __call__(
42
+ self, data: Buffer, crc: int = ..., table: Sequence[int] = ...
43
+ ) -> int: ...
43
44
 
44
45
 
45
46
  CrcFunNoDefaultArgs = Callable[[Buffer, int, Sequence[int]], int]
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: crcmod-plus
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: CRC generator - modernized
5
5
  Author-email: Ray Buvel <rlbuvel@gmail.com>
6
6
  Maintainer-email: Tamas Nepusz <tamas@sxd.hu>
@@ -54,8 +54,11 @@ Classifier: Topic :: Scientific/Engineering :: Mathematics
54
54
  Classifier: Topic :: Utilities
55
55
  Requires-Python: >=3.7
56
56
  Description-Content-Type: text/markdown
57
- Provides-Extra: dev
58
57
  License-File: LICENSE.txt
58
+ Requires-Dist: typing_extensions; python_version < "3.8"
59
+ Provides-Extra: dev
60
+ Requires-Dist: pytest; extra == "dev"
61
+ Dynamic: license-file
59
62
 
60
63
  [![Build status](https://github.com/ntamas/crcmod-plus/actions/workflows/build.yml/badge.svg)](https://github.com/ntamas/crcmod-plus/actions/workflows/build.yml)
61
64
 
@@ -22,7 +22,6 @@
22
22
  # -----------------------------------------------------------------------------
23
23
  """Unit tests for crcmod functionality"""
24
24
 
25
-
26
25
  import unittest
27
26
 
28
27
  from array import array
File without changes
File without changes
File without changes