jni 1.0.0b22__zip → 1.1.0b5__zip

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.
Files changed (77) hide show
  1. {jni-1.0.0b22 → jni-1.1.0b5}/.readthedocs.yml +1 -1
  2. {jni-1.0.0b22 → jni-1.1.0b5}/CHANGES.rst +9 -0
  3. {jni-1.0.0b22 → jni-1.1.0b5}/PKG-INFO +28 -18
  4. {jni-1.0.0b22 → jni-1.1.0b5}/README.rst +3 -2
  5. {jni-1.0.0b22 → jni-1.1.0b5}/docs/conf.py +2 -1
  6. {jni-1.0.0b22 → jni-1.1.0b5}/docs/install.rst +2 -2
  7. {jni-1.0.0b22 → jni-1.1.0b5}/pyproject.toml +78 -73
  8. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/_config.py +1 -2
  9. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/ctypes/_ct.py +7 -10
  10. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cython/__init__.py +3 -3
  11. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cython/jni.c +1865 -1773
  12. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cython/jni.h +1 -1
  13. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/jni.c +13 -4
  14. jni-1.1.0b5/src/jni/pvm.c +226 -0
  15. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni.egg-info/PKG-INFO +28 -18
  16. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni.egg-info/SOURCES.txt +2 -0
  17. jni-1.1.0b5/src/jni.egg-info/requires.txt +22 -0
  18. jni-1.1.0b5/tests/__main.py +134 -0
  19. jni-1.1.0b5/tests/__main__.py +11 -0
  20. jni-1.1.0b5/tests/_jvm.py +254 -0
  21. {jni-1.0.0b22 → jni-1.1.0b5}/tests/test_jni.py +52 -51
  22. {jni-1.0.0b22 → jni-1.1.0b5}/tests/test_util.py +2 -1
  23. jni-1.0.0b22/src/jni.egg-info/requires.txt +0 -22
  24. jni-1.0.0b22/tests/__main__.py +0 -89
  25. jni-1.0.0b22/tests/_jvm.py +0 -136
  26. {jni-1.0.0b22 → jni-1.1.0b5}/LICENSE +0 -0
  27. {jni-1.0.0b22 → jni-1.1.0b5}/MANIFEST.in +0 -0
  28. {jni-1.0.0b22 → jni-1.1.0b5}/docs/CHANGES.rst +0 -0
  29. {jni-1.0.0b22 → jni-1.1.0b5}/docs/MappingPyJNI.txt +0 -0
  30. {jni-1.0.0b22 → jni-1.1.0b5}/docs/README.rst +0 -0
  31. {jni-1.0.0b22 → jni-1.1.0b5}/docs/_static/.keep +0 -0
  32. {jni-1.0.0b22 → jni-1.1.0b5}/docs/_templates/.keep +0 -0
  33. {jni-1.0.0b22 → jni-1.1.0b5}/docs/index.rst +0 -0
  34. {jni-1.0.0b22 → jni-1.1.0b5}/docs/userguide.rst +0 -0
  35. {jni-1.0.0b22 → jni-1.1.0b5}/setup.cfg +0 -0
  36. {jni-1.0.0b22 → jni-1.1.0b5}/setup.py +0 -0
  37. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/__about__.py +0 -0
  38. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/__config__.py +0 -0
  39. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/__init__.py +0 -0
  40. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/_util.py +0 -0
  41. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/__init__.py +0 -0
  42. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/_notes_.txt +0 -0
  43. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/darwin/jni_md.h +0 -0
  44. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/darwin/jni_md.h.dsc.txt +0 -0
  45. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/jni.h +0 -0
  46. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/jni.h.dsc.txt +0 -0
  47. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/linux/jni_md.h +0 -0
  48. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/linux/jni_md.h.dsc.txt +0 -0
  49. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/win32/jni_md.h +0 -0
  50. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk/include/win32/jni_md.h.dsc.txt +0 -0
  51. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/java/jdk-8_android/include/jni.h +0 -0
  52. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/capi/jni.c +0 -0
  53. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cffi/__init__.py +0 -0
  54. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cffi/jni.h +0 -0
  55. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cffi/jni.py +0 -0
  56. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/ctypes/__init__.py +0 -0
  57. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cython/jni.pxd +0 -0
  58. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/cython/jni.pyx +0 -0
  59. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni/jni.cfg +0 -0
  60. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni.egg-info/dependency_links.txt +0 -0
  61. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni.egg-info/not-zip-safe +0 -0
  62. {jni-1.0.0b22 → jni-1.1.0b5}/src/jni.egg-info/top_level.txt +0 -0
  63. {jni-1.0.0b22 → jni-1.1.0b5}/tests/__init__.py +0 -0
  64. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/AbstractCallback.class +0 -0
  65. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/BaseExample.class +0 -0
  66. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/Example$1.class +0 -0
  67. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/Example$Inner.class +0 -0
  68. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/Example$Stuff.class +0 -0
  69. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/Example.class +0 -0
  70. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/ICallback.class +0 -0
  71. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/classes/org/jt/jni/test/Thing.class +0 -0
  72. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/lib/.keep +0 -0
  73. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/org/jt/jni/test/AbstractCallback.java +0 -0
  74. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/org/jt/jni/test/BaseExample.java +0 -0
  75. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/org/jt/jni/test/Example.java +0 -0
  76. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/org/jt/jni/test/ICallback.java +0 -0
  77. {jni-1.0.0b22 → jni-1.1.0b5}/tests/java/org/jt/jni/test/Thing.java +0 -0
@@ -2,7 +2,7 @@ version: 2
2
2
  build:
3
3
  os: "ubuntu-22.04"
4
4
  tools:
5
- python: "3.11"
5
+ python: "3.12"
6
6
  python:
7
7
  install:
8
8
  - method: pip
@@ -1,6 +1,15 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.1.0b5 (2024-11-08)
5
+ --------------------
6
+ - Add support for Python 3.13
7
+ - Drop support for Python 3.8
8
+ - jni.c and pvm.c (useful for embedded python applications) have been added.
9
+ - Unittest have been performed for much more JVMs.
10
+ - Setup fixes.
11
+ - Setup (dependencies) update.
12
+
4
13
  1.0.0b22 (2024-01-26)
5
14
  ---------------------
6
15
  - Tox configuration has been moved to pyproject.toml
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jni
3
- Version: 1.0.0b22
3
+ Version: 1.1.0b5
4
4
  Summary: Python bridge for the Java Native Interface.
5
5
  Author: Adam Karpierz
6
6
  Author-email: adam@karpierz.net
@@ -22,38 +22,38 @@ Classifier: Operating System :: OS Independent
22
22
  Classifier: Natural Language :: Polish
23
23
  Classifier: Programming Language :: Python
24
24
  Classifier: Programming Language :: Python :: 3
25
- Classifier: Programming Language :: Python :: 3.8
26
25
  Classifier: Programming Language :: Python :: 3.9
27
26
  Classifier: Programming Language :: Python :: 3.10
28
27
  Classifier: Programming Language :: Python :: 3.11
29
28
  Classifier: Programming Language :: Python :: 3.12
29
+ Classifier: Programming Language :: Python :: 3.13
30
30
  Classifier: Programming Language :: Python :: 3 :: Only
31
31
  Classifier: Programming Language :: Python :: Implementation :: CPython
32
32
  Classifier: Programming Language :: Python :: Implementation :: PyPy
33
33
  Classifier: Programming Language :: Java
34
34
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
35
35
  Classifier: Topic :: Software Development :: Libraries :: Java Libraries
36
- Requires-Python: <4.0.0,>=3.8.1
36
+ Requires-Python: <4.0.0,>=3.9.0
37
37
  Description-Content-Type: text/x-rst; charset=UTF-8
38
38
  License-File: LICENSE
39
- Requires-Dist: setuptools>=68.2.2
40
- Requires-Dist: pkg-about>=1.1.5
39
+ Requires-Dist: setuptools>=75.3.0
40
+ Requires-Dist: pkg-about>=1.2.2
41
41
  Provides-Extra: cffi
42
- Requires-Dist: cffi>=1.16.0; extra == "cffi"
42
+ Requires-Dist: cffi>=1.17.1; extra == "cffi"
43
43
  Provides-Extra: cython
44
- Requires-Dist: Cython>=3.0.8; extra == "cython"
44
+ Requires-Dist: Cython>=3.0.11; extra == "cython"
45
45
  Provides-Extra: doc
46
- Requires-Dist: Sphinx>=7.1.2; extra == "doc"
47
- Requires-Dist: sphinx-toolbox>=3.5.0; extra == "doc"
48
- Requires-Dist: sphinx-tabs>=3.4.1; extra == "doc"
49
- Requires-Dist: sphinx-copybutton>=0.5.1; extra == "doc"
50
- Requires-Dist: sphinxcontrib-spelling>=7.7.0; extra == "doc"
51
- Requires-Dist: sphinx-lint>=0.6.7; extra == "doc"
46
+ Requires-Dist: Sphinx>=7.4.7; extra == "doc"
47
+ Requires-Dist: sphinx-toolbox>=3.8.1; extra == "doc"
48
+ Requires-Dist: sphinx-tabs>=3.4.5; extra == "doc"
49
+ Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
50
+ Requires-Dist: sphinxcontrib-spelling>=8.0.0; extra == "doc"
51
+ Requires-Dist: sphinx-lint>=1.0.0; extra == "doc"
52
52
  Requires-Dist: restructuredtext-lint>=1.4.0; extra == "doc"
53
- Requires-Dist: nbsphinx>=0.8.10; extra == "doc"
53
+ Requires-Dist: nbsphinx>=0.9.5; extra == "doc"
54
54
  Provides-Extra: test
55
- Requires-Dist: deepdiff>=6.7.1; extra == "test"
56
- Requires-Dist: rich>=13.7.0; extra == "test"
55
+ Requires-Dist: deepdiff>=8.0.1; extra == "test"
56
+ Requires-Dist: rich>=13.9.4; extra == "test"
57
57
 
58
58
  jni
59
59
  ===
@@ -91,7 +91,7 @@ Installation
91
91
 
92
92
  Prerequisites:
93
93
 
94
- + Python 3.8 or higher
94
+ + Python 3.9 or higher
95
95
 
96
96
  * https://www.python.org/
97
97
  * Java 11 is a primary test environment.
@@ -141,7 +141,7 @@ or on development mode:
141
141
  License
142
142
  =======
143
143
 
144
- | Copyright (c) 2004-2024 Adam Karpierz
144
+ | |copyright|
145
145
  | Licensed under CC BY-NC-ND 4.0
146
146
  | Licensed under proprietary License
147
147
  | Please refer to the accompanying LICENSE file.
@@ -153,6 +153,7 @@ Authors
153
153
 
154
154
  .. |package| replace:: jni
155
155
  .. |package_bold| replace:: **jni**
156
+ .. |copyright| replace:: Copyright (c) 2004-2024 Adam Karpierz
156
157
  .. |respository| replace:: https://github.com/karpierz/jni.git
157
158
  .. _Development page: https://github.com/karpierz/jni
158
159
  .. _PyPI record: https://pypi.org/project/jni/
@@ -161,6 +162,15 @@ Authors
161
162
  Changelog
162
163
  =========
163
164
 
165
+ 1.1.0b5 (2024-11-08)
166
+ --------------------
167
+ - Add support for Python 3.13
168
+ - Drop support for Python 3.8
169
+ - jni.c and pvm.c (useful for embedded python applications) have been added.
170
+ - Unittest have been performed for much more JVMs.
171
+ - Setup fixes.
172
+ - Setup (dependencies) update.
173
+
164
174
  1.0.0b22 (2024-01-26)
165
175
  ---------------------
166
176
  - Tox configuration has been moved to pyproject.toml
@@ -34,7 +34,7 @@ Installation
34
34
 
35
35
  Prerequisites:
36
36
 
37
- + Python 3.8 or higher
37
+ + Python 3.9 or higher
38
38
 
39
39
  * https://www.python.org/
40
40
  * Java 11 is a primary test environment.
@@ -84,7 +84,7 @@ or on development mode:
84
84
  License
85
85
  =======
86
86
 
87
- | Copyright (c) 2004-2024 Adam Karpierz
87
+ | |copyright|
88
88
  | Licensed under CC BY-NC-ND 4.0
89
89
  | Licensed under proprietary License
90
90
  | Please refer to the accompanying LICENSE file.
@@ -96,6 +96,7 @@ Authors
96
96
 
97
97
  .. |package| replace:: jni
98
98
  .. |package_bold| replace:: **jni**
99
+ .. |copyright| replace:: Copyright (c) 2004-2024 Adam Karpierz
99
100
  .. |respository| replace:: https://github.com/karpierz/jni.git
100
101
  .. _Development page: https://github.com/karpierz/jni
101
102
  .. _PyPI record: https://pypi.org/project/jni/
@@ -34,7 +34,7 @@ release = about.__version__
34
34
 
35
35
  # If your documentation needs a minimal Sphinx version, state it here.
36
36
  #
37
- needs_sphinx = '3.4.3'
37
+ needs_sphinx = '7.4.7'
38
38
 
39
39
  # Add any Sphinx extension module names here, as strings. They can be
40
40
  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -48,6 +48,7 @@ extensions = [
48
48
  #'sphinx.ext.coverage',
49
49
  'sphinx.ext.ifconfig',
50
50
  'sphinx.ext.napoleon',
51
+ #'sphinx_toolbox',
51
52
  'sphinx_tabs.tabs',
52
53
  'sphinx_copybutton',
53
54
  'sphinxcontrib.spelling',
@@ -6,10 +6,10 @@ Installation
6
6
  Requirements
7
7
  ------------
8
8
 
9
- + Python 3.8 or higher
9
+ + Python 3.9 or higher
10
10
 
11
11
  * https://www.python.org/
12
- * Java 8 is a primary test environment.
12
+ * Java 11 is a primary test environment.
13
13
 
14
14
  + pip and setuptools
15
15
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  [build-system]
7
7
  build-backend = 'setuptools.build_meta'
8
- requires = ['setuptools>=68.2.2', 'wheel>=0.42.0', 'packaging>=23.2.0', 'tox>=4.11.3']
8
+ requires = ['setuptools>=75.3.0', 'wheel>=0.44.0', 'packaging>=24.2.0', 'tox>=4.23.2']
9
9
 
10
10
  [project]
11
11
  name = 'jni'
12
- version = '1.0.0b22'
12
+ version = '1.1.0b5'
13
13
  description = 'Python bridge for the Java Native Interface.'
14
14
  urls.Homepage = 'https://pypi.org/project/jni/'
15
15
  urls.Documentation = 'https://jni.readthedocs.io/'
@@ -36,11 +36,11 @@ classifiers = [
36
36
  'Natural Language :: Polish',
37
37
  'Programming Language :: Python',
38
38
  'Programming Language :: Python :: 3',
39
- 'Programming Language :: Python :: 3.8',
40
39
  'Programming Language :: Python :: 3.9',
41
40
  'Programming Language :: Python :: 3.10',
42
41
  'Programming Language :: Python :: 3.11',
43
42
  'Programming Language :: Python :: 3.12',
43
+ 'Programming Language :: Python :: 3.13',
44
44
  'Programming Language :: Python :: 3 :: Only',
45
45
  'Programming Language :: Python :: Implementation :: CPython',
46
46
  'Programming Language :: Python :: Implementation :: PyPy',
@@ -48,34 +48,34 @@ classifiers = [
48
48
  'Topic :: Software Development :: Libraries :: Python Modules',
49
49
  'Topic :: Software Development :: Libraries :: Java Libraries',
50
50
  ]
51
- requires-python = '>=3.8.1,<4.0.0'
51
+ requires-python = '>=3.9.0,<4.0.0'
52
52
  dependencies = [
53
53
  # mandatory
54
- 'setuptools>=68.2.2',
55
- 'pkg-about>=1.1.5',
54
+ 'setuptools>=75.3.0',
55
+ 'pkg-about>=1.2.2',
56
56
  # others
57
57
  ]
58
58
  dynamic = ['readme']
59
59
  [project.optional-dependencies]
60
60
  cffi = [
61
- 'cffi>=1.16.0',
61
+ 'cffi>=1.17.1',
62
62
  ]
63
63
  cython = [
64
- 'Cython>=3.0.8',
64
+ 'Cython>=3.0.11',
65
65
  ]
66
66
  doc = [
67
- 'Sphinx>=7.1.2',
68
- 'sphinx-toolbox>=3.5.0',
69
- 'sphinx-tabs>=3.4.1',
70
- 'sphinx-copybutton>=0.5.1',
71
- 'sphinxcontrib-spelling>=7.7.0',
72
- 'sphinx-lint>=0.6.7',
67
+ 'Sphinx>=7.4.7',
68
+ 'sphinx-toolbox>=3.8.1',
69
+ 'sphinx-tabs>=3.4.5', # don't touch! sphinx-toolbox requires <3.4.7
70
+ 'sphinx-copybutton>=0.5.2',
71
+ 'sphinxcontrib-spelling>=8.0.0',
72
+ 'sphinx-lint>=1.0.0',
73
73
  'restructuredtext-lint>=1.4.0',
74
- 'nbsphinx>=0.8.10',
74
+ 'nbsphinx>=0.9.5',
75
75
  ]
76
76
  test = [
77
- 'deepdiff>=6.7.1',
78
- 'rich>=13.7.0',
77
+ 'deepdiff>=8.0.1',
78
+ 'rich>=13.9.4',
79
79
  ]
80
80
 
81
81
  [project.scripts]
@@ -107,12 +107,17 @@ where = ['src']
107
107
  [tool.setuptools.package-data]
108
108
  jni = [
109
109
  'jni.cfg',
110
+ 'jni.c',
111
+ 'pvm.c',
110
112
  ]
111
113
 
112
114
  [tool.setuptools.exclude-package-data]
113
- '*' = ['*.c','*.h','*.cpp','*.hpp','*.cxx','*.hxx','*.pyx','*.pxd',
114
- '*.txt']
115
- jni = [
115
+ '*' = ['*.h','*.cpp','*.hpp','*.cxx','*.hxx','*.pyx','*.pxd', '*.txt']
116
+ 'jni.capi' = [
117
+ 'jni.c',
118
+ ]
119
+ 'jni.cython' = [
120
+ 'jni.c',
116
121
  ]
117
122
 
118
123
  [tool.coverage.run]
@@ -182,44 +187,44 @@ count = true
182
187
  [tool.tox]
183
188
  legacy_tox_ini = """
184
189
  [tox]
185
- envlist = py{38,39,310,311,312}, pypy{39,310}, docs
190
+ env_list = py{39,310,311,312,313}, pypy{39,310}, docs
186
191
  labels =
187
- py = py{38,39,310,311,312}, pypy{39,310}
192
+ py = py{39,310,311,312,313}, pypy{39,310}
188
193
  prepare = prepare
189
194
  coverage = coverage
190
195
  lint = lint
191
196
  docs = docs
192
- build = py{38,39,310,311,312}, pypy{39,310}, docs, py{38,39,310,311,312}-build, pypy{39,310}-build, build
193
- deploy = py{38,39,310,311,312}, pypy{39,310}, docs, py{38,39,310,311,312}-build, pypy{39,310}-build, build, publish
194
- minversion = 4.11.3
197
+ build = py{39,310,311,312,313}, pypy{39,310}, docs, py{39,310,311,312,313}-build, pypy{39,310}-build, build
198
+ deploy = py{39,310,311,312,313}, pypy{39,310}, docs, py{39,310,311,312,313}-build, pypy{39,310}-build, build, publish
199
+ min_version = 4.23.2
195
200
  skip_missing_interpreters = true
196
201
  requires =
197
202
  {[base]deps}
198
- virtualenv>=20.25.0
199
- tox-backtick>=0.4.4
203
+ virtualenv>=20.27.1
204
+ tox-backtick>=0.5.2
200
205
  tox-tags>=0.2.0
201
206
 
202
207
  [base]
203
- basepython = python3.11
208
+ base_python = python3.12
204
209
  deps =
205
- pip>=23.3.2
206
- setuptools>=68.2.2
207
- wheel>=0.42.0
208
- packagesubdir = jni
210
+ pip>=24.3.1
211
+ setuptools>=75.3.0
212
+ wheel>=0.44.0
213
+ package_subdir = jni
209
214
 
210
215
  [testenv]
211
- passenv = WINDIR
212
- setenv =
216
+ pass_env = WINDIR, JAVA_HOME
217
+ set_env =
213
218
  PYTHONDONTWRITEBYTECODE = 1
214
219
  commands =
215
- {envpython} --version
216
- {envpython} -m tests {posargs}
220
+ {env_python} --version
221
+ {env_python} -m tests {posargs}
217
222
  extras = test, cffi, cython
218
223
  deps =
219
224
  {[base]deps}
220
225
 
221
226
  [testenv:prepare]
222
- basepython = {[base]basepython}
227
+ base_python = {[base]base_python}
223
228
  skip_install = true
224
229
  allowlist_externals =
225
230
  cmd
@@ -228,77 +233,77 @@ commands =
228
233
  cmd /C if exist .build.cmd .build.cmd
229
234
 
230
235
  [testenv:coverage]
231
- basepython = {[base]basepython}
236
+ base_python = {[base]base_python}
232
237
  commands =
233
- {envpython} -m coverage erase
234
- -{envpython} -m coverage run -m tests {posargs}
235
- {envpython} -m coverage report
236
- {envpython} -m coverage html
238
+ {env_python} -m coverage erase
239
+ -{env_python} -m coverage run -m tests {posargs}
240
+ {env_python} -m coverage report
241
+ {env_python} -m coverage html
237
242
  deps =
238
243
  {[testenv]deps}
239
- coverage>=7.4.0
244
+ coverage>=7.6.4
240
245
  covdefaults>=2.3.0
241
- diff-cover>=7.7.0
246
+ diff-cover>=9.2.0
242
247
 
243
248
  [testenv:docs]
244
- basepython = {[base]basepython}
249
+ base_python = {[base]base_python}
245
250
  commands =
246
- {envpython} -m sphinxlint --ignore .tox --ignore build --ignore dist
247
- #{envpython} -m sphinx.apidoc -f {envsitepackagesdir}/{[base]packagesubdir}
248
- {envpython} -m sphinx.cmd.build -W -a -b html -E ./docs ./build/docs/html
249
- {envpython} -m sphinx.cmd.build -W -a -b linkcheck ./docs ./build/docs/html
250
- {envpython} -m sphinx.cmd.build -W -a -b doctest ./docs ./build/docs/html
251
+ {env_python} -m sphinxlint --ignore .tox --ignore build --ignore dist
252
+ #{env_python} -m sphinx.apidoc -f {envsitepackagesdir}/{[base]package_subdir}
253
+ {env_python} -m sphinx.cmd.build -W -a -b html -E ./docs ./build/docs/html
254
+ {env_python} -m sphinx.cmd.build -W -a -b linkcheck ./docs ./build/docs/html
255
+ {env_python} -m sphinx.cmd.build -W -a -b doctest ./docs ./build/docs/html
251
256
  extras = doc
252
257
  deps =
253
258
 
254
- [testenv:py{38,39,310,311,312}-build,pypy{39,310}-build]
259
+ [testenv:py{39,310,311,312,313}-build,pypy{39,310}-build]
255
260
  #depends = {envname}
256
- setenv =
257
- {[testenv]setenv}
258
- PKG_PVER=`{envpython} -W ignore -c "import platform ; print(''.join(platform.python_version_tuple()[:2]), end='')" 2> nul`
259
- PKG_NAME=`{envpython} -W ignore -c "import setuptools ; setuptools._distutils.core._setup_stop_after='config' ; print(setuptools.setup().metadata.get_name(), end='')" 2> nul`
260
- PKG_DIST=`{envpython} -W ignore -c "import setuptools ; setuptools._distutils.core._setup_stop_after='config' ; print(setuptools.setup().metadata.get_fullname(), end='')" 2> nul`
261
+ set_env =
262
+ {[testenv]set_env}
263
+ PKG_PVER=`{env_python} -W ignore -c "import platform ; print(''.join(platform.python_version_tuple()[:2]), end='')" 2> nul`
264
+ PKG_NAME=`{env_python} -W ignore -c "import setuptools ; setuptools._distutils.core._setup_stop_after='config' ; print(setuptools.setup().metadata.get_name(), end='')" 2> nul`
265
+ PKG_DIST=`{env_python} -W ignore -c "import setuptools ; setuptools._distutils.core._setup_stop_after='config' ; print(setuptools.setup().metadata.get_fullname(), end='')" 2> nul`
261
266
  commands =
262
- #{envpython} -W ignore setup.py --quiet bdist_wheel --python-tag py{env:PKG_PVER}
263
- {envpython} -W ignore setup.py --quiet bdist_wheel
264
- #{envpython} -m pyc_wheel --quiet "dist/{env:PKG_DIST}*.whl"
267
+ #{env_python} -W ignore setup.py --quiet bdist_wheel --python-tag py{env:PKG_PVER}
268
+ {env_python} -W ignore setup.py --quiet bdist_wheel
269
+ #{env_python} -m pyc_wheel --quiet "dist/{env:PKG_DIST}*.whl"
265
270
  deps =
266
271
  {[testenv]deps}
267
- #pyc-wheel>=1.2.7
272
+ #pyc-wheel>=1.3.0
268
273
 
269
274
  [testenv:build]
270
- depends = py{38,39,310,311,312}, pypy{39,310}, docs, py{38,39,310,311,312}-build, pypy{39,310}-build
271
- basepython = {[base]basepython}
275
+ depends = py{39,310,311,312,313}, pypy{39,310}, docs, py{39,310,311,312,313}-build, pypy{39,310}-build
276
+ base_python = {[base]base_python}
272
277
  commands =
273
- {envpython} -W ignore setup.py --quiet sdist --formats=zip
278
+ {env_python} -W ignore setup.py --quiet sdist --formats=zip
274
279
  # check out for PyPi
275
- {envpython} -m twine check dist/*
280
+ {env_python} -m twine check dist/*
276
281
  deps =
277
282
  {[testenv]deps}
278
- twine>=4.0.2
283
+ twine>=5.1.1
279
284
 
280
285
  [testenv:publish]
281
286
  depends = build
282
- basepython = {[base]basepython}
287
+ base_python = {[base]base_python}
283
288
  skip_install = true
284
289
  commands =
285
290
  # publish on PyPi
286
- {envpython} -m twine upload dist/*
291
+ {env_python} -m twine upload dist/*
287
292
  extras =
288
293
  deps =
289
- twine>=4.0.2
294
+ twine>=5.1.1
290
295
 
291
296
  [testenv:lint]
292
- basepython = {[base]basepython}
297
+ base_python = {[base]base_python}
293
298
  commands =
294
- {envpython} -m flake8 {envsitepackagesdir}/{[base]packagesubdir}/
299
+ {env_python} -m flake8 {envsitepackagesdir}/{[base]package_subdir}/
295
300
  extras =
296
301
  deps =
297
302
  {[testenv]deps}
298
- flake8>=7.0.0
303
+ flake8>=7.1.1
299
304
  flake8-pyproject>=1.2.3
300
305
  flake8-docstrings>=1.7.0
301
- pep8-naming>=0.13.3
302
- flake8-builtins>=2.2.0
306
+ pep8-naming>=0.14.1
307
+ flake8-builtins>=2.5.0
303
308
  flake8-deprecated>=2.2.1
304
309
  """
@@ -1,6 +1,5 @@
1
1
  # Copyright (c) 2016 Adam Karpierz
2
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
2
+ # SPDX-License-Identifier: Zlib
4
3
 
5
4
  __all__ = ('make_config',)
6
5
 
@@ -1,7 +1,6 @@
1
1
  # Copyright (c) 2011 Adam Karpierz
2
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
4
- #
2
+ # SPDX-License-Identifier: Zlib
3
+
5
4
  # Strictly based on Thomas Heller's recipe.
6
5
  # https://sourceforge.net/p/ctypes/mailman/message/22650014/
7
6
 
@@ -27,7 +26,7 @@ def c_ptr_add(ptr, other):
27
26
  b'foobar'
28
27
  >>>
29
28
  """
30
- from ctypes import c_void_p, cast # , sizeof
29
+ from ctypes import c_void_p, cast, sizeof
31
30
  try:
32
31
  offset = other.__index__()
33
32
  except AttributeError:
@@ -65,8 +64,8 @@ def c_ptr_sub(ptr, other):
65
64
  0
66
65
  >>>
67
66
  """
68
- from ctypes import c_void_p, cast # , sizeof
69
- if type(ptr) == type(other):
67
+ from ctypes import c_void_p, cast, sizeof
68
+ if type(ptr) is type(other):
70
69
  return cast(ptr, c_void_p).value - cast(other, c_void_p).value
71
70
  else:
72
71
  try:
@@ -91,8 +90,7 @@ def c_ptr_iadd(ptr, other):
91
90
  b'bar'
92
91
  >>>
93
92
  """
94
- from ctypes import c_void_p, cast # , sizeof
95
- from ctypes import pointer, POINTER
93
+ from ctypes import c_void_p, cast, sizeof, pointer, POINTER
96
94
  try:
97
95
  offset = other.__index__()
98
96
  except AttributeError:
@@ -125,8 +123,7 @@ def c_ptr_isub(ptr, other):
125
123
  b'foobar'
126
124
  >>>
127
125
  """
128
- from ctypes import c_void_p, cast # , sizeof
129
- from ctypes import pointer, POINTER
126
+ from ctypes import c_void_p, cast, sizeof, pointer, POINTER
130
127
  try:
131
128
  offset = other.__index__()
132
129
  except AttributeError:
@@ -27,7 +27,7 @@ byref = lambda obj, offset=0, __cyth=cython: __ffi.new(POINTER(__ffi.typ
27
27
  addressof = lambda obj, __cyth=cython: __cyth.address(obj)
28
28
  cast = lambda obj, type, __cyth=cython: __cyth.cast(type, obj)
29
29
  sizeof = lambda obj_or_type, __cyth=cython: __cyth.sizeof(obj_or_type)
30
- #sizeof = lambda obj_or_type, __cyth=cython: __cyth.sizeof(obj_or_type)
30
+ # sizeof = lambda obj_or_type, __cyth=cython: __cyth.sizeof(obj_or_type)
31
31
  py_object = lambda obj, __cyth=cython: __ffi.new_handle(obj)
32
32
  memmove = lambda dst, src, count, __cyth=cython: __ffi.memmove(dst, src, count)
33
33
  obj = lambda type, init=__none, __cyth=cython: (__ffi.new(__ffi.getctype(type)+"*", None if init is __none else init)[0]
@@ -43,8 +43,8 @@ from_buffer = lambda data, __cyth=cython: __ffi.from_buffer(data)
43
43
 
44
44
  # null constant
45
45
 
46
- from cython import NULL
47
- isNULL = lambda jobj: jobj is NULL
46
+ NULL = cython.NULL
47
+ isNULL = lambda jobj, __NULL=NULL: jobj == __NULL # noqa: N816
48
48
 
49
49
  #
50
50
  # Decorator for defining Java native method in Python