pycapnp 2.2.2__tar.gz → 2.2.3__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.
- {pycapnp-2.2.2 → pycapnp-2.2.3}/CHANGELOG.md +7 -0
- {pycapnp-2.2.2/pycapnp.egg-info → pycapnp-2.2.3}/PKG-INFO +56 -2
- {pycapnp-2.2.2 → pycapnp-2.2.3}/Pipfile +1 -2
- {pycapnp-2.2.2 → pycapnp-2.2.3}/README.md +47 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/_custom_build/backend.py +1 -3
- {pycapnp-2.2.2 → pycapnp-2.2.3}/buildutils/bundle.py +0 -1
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/__init__.py +0 -1
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/_gen.py +5 -19
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/lib/capnp.cpp +6746 -7046
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/lib/capnp.pyx +48 -11
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/lib/capnp_api.h +23 -23
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/version.py +2 -2
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_calculator_client.py +1 -3
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_calculator_server.py +1 -4
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_reconnecting_ssl_client.py +3 -9
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_server.py +1 -4
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_socket_message_server.py +1 -3
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_ssl_calculator_client.py +5 -14
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_ssl_calculator_server.py +3 -10
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_ssl_client.py +4 -10
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_ssl_server.py +3 -10
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/py_custom_message_builder.py +22 -7
- {pycapnp-2.2.2 → pycapnp-2.2.3/pycapnp.egg-info}/PKG-INFO +56 -2
- pycapnp-2.2.3/pyproject.toml +28 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/requirements.txt +1 -2
- {pycapnp-2.2.2 → pycapnp-2.2.3}/setup.py +3 -10
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_async_write_large_payload.py +2 -6
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_capability_context.py +1 -3
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_examples.py +3 -9
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_get_data_view.py +3 -5
- pycapnp-2.2.3/test/test_py_custom_message_builder.py +79 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_regression.py +11 -33
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_schema.py +2 -6
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_serialization.py +1 -3
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_struct.py +7 -21
- pycapnp-2.2.2/pyproject.toml +0 -7
- pycapnp-2.2.2/test/test_py_custom_message_builder.py +0 -48
- {pycapnp-2.2.2 → pycapnp-2.2.3}/LICENSE.md +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/MANIFEST.in +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/buildutils/__init__.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/buildutils/build.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/__init__.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/__init__.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/capabilityHelper.cpp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/capabilityHelper.h +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/checkCompiler.h +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/deserialize.h +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/fixMaybe.h +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/helpers.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/non_circular.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/rpcHelper.h +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/helpers/serialize.h +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/includes/PyCustomMessageBuilder.cpp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/includes/PyCustomMessageBuilder.h +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/includes/__init__.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/includes/capnp_cpp.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/includes/schema_cpp.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/includes/types.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/lib/__init__.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/lib/__init__.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/lib/capnp.pxd +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/lib/pickle_helper.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/templates/module.pyx +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/capnp/templates/setup.py.tmpl +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/addressbook.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/addressbook.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_client.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/async_socket_message_client.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/calculator.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/selfsigned.cert +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/selfsigned.key +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/examples/thread.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/pycapnp.egg-info/SOURCES.txt +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/pycapnp.egg-info/dependency_links.txt +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/pycapnp.egg-info/entry_points.txt +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/pycapnp.egg-info/top_level.txt +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/setup.cfg +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/addressbook with spaces.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/addressbook-with-dashes.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/addressbook.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/all-types.binary +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/all-types.packed +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/all-types.txt +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/all_types.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/annotations.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/bar.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/blob_test.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/foo.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/schemas/child.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/schemas/parent.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_blob_to_dict_base64.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_capability.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_capability.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_context_manager.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_large_read.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_large_read.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_load.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_memory_handling.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_object.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_response.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_response.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_rpc.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_rpc_calculator.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_structs_sequence.capnp +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/test/test_structs_sequence.py +0 -0
- {pycapnp-2.2.2 → pycapnp-2.2.3}/tox.ini +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## v2.2.3 (2026-05-30)
|
|
2
|
+
- Fix test failures on Python 3.14 (#394)
|
|
3
|
+
- Refine documentation for PyCustomMessageBuilder (#395)
|
|
4
|
+
- Replace black and flake8 with ruff for linting and formatting
|
|
5
|
+
- ci: deploy docs to gh-pages on tagged releases
|
|
6
|
+
- Add scripts/release-pypi.sh for downloading CI artifacts and uploading to PyPI
|
|
7
|
+
|
|
1
8
|
## v2.2.2 (2026-01-16)
|
|
2
9
|
- Revert Data fields to bytes and add get_data_as_view for zero-copy access (#390)
|
|
3
10
|
- Fix use-after-free in async write causing corruption with large payloads (#392)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pycapnp
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: A cython wrapping of the C++ Cap'n Proto library
|
|
5
5
|
Home-page: https://github.com/capnproto/pycapnp
|
|
6
|
-
Download-URL: https://github.com/haata/pycapnp/archive/v2.2.
|
|
6
|
+
Download-URL: https://github.com/haata/pycapnp/archive/v2.2.3.zip
|
|
7
7
|
Author: Jacob Alexander
|
|
8
8
|
Author-email: haata@kiibohd.com
|
|
9
9
|
License: BSD-2-Clause
|
|
@@ -140,6 +140,53 @@ Building a Python wheel distributiion
|
|
|
140
140
|
pip wheel .
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
|
|
144
|
+
### Releasing to PyPI
|
|
145
|
+
|
|
146
|
+
Wheels and the sdist are built by the `Build` GitHub Actions workflow
|
|
147
|
+
(`.github/workflows/wheels.yml`) for every push, including tag pushes. The
|
|
148
|
+
`scripts/release-pypi.sh` helper downloads those artifacts for a given tag (or
|
|
149
|
+
explicit run ID) and uploads them to PyPI via `twine`.
|
|
150
|
+
|
|
151
|
+
Typical release flow:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
git tag v2.2.1
|
|
155
|
+
git push origin v2.2.1
|
|
156
|
+
# wait for the "Build" workflow run to finish successfully on GitHub
|
|
157
|
+
|
|
158
|
+
# Download artifacts and upload to PyPI (creates dist_221/ by default).
|
|
159
|
+
scripts/release-pypi.sh v2.2.1
|
|
160
|
+
|
|
161
|
+
# Or, target a specific Actions run id:
|
|
162
|
+
scripts/release-pypi.sh 1234567890
|
|
163
|
+
|
|
164
|
+
# Dry run: upload to TestPyPI (https://test.pypi.org) instead of real PyPI.
|
|
165
|
+
# Useful for validating the release flow end-to-end before pushing to
|
|
166
|
+
# production. Requires a TestPyPI account + API token configured in
|
|
167
|
+
# ~/.pypirc under a [testpypi] section. See
|
|
168
|
+
# https://packaging.python.org/en/latest/guides/using-testpypi/ .
|
|
169
|
+
scripts/release-pypi.sh v2.2.1 --test
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Requirements on the release machine:
|
|
173
|
+
|
|
174
|
+
- `gh` CLI, authenticated (`gh auth login`)
|
|
175
|
+
- `python3` (the script creates `.venv-release/` and installs `twine` into it)
|
|
176
|
+
- PyPI credentials available to `twine`, e.g. `TWINE_USERNAME=__token__` and
|
|
177
|
+
`TWINE_PASSWORD=<api-token>`, or a configured `~/.pypirc`
|
|
178
|
+
|
|
179
|
+
The script:
|
|
180
|
+
|
|
181
|
+
1. Resolves the latest successful `wheels.yml` run for the tag (or uses the
|
|
182
|
+
given run ID).
|
|
183
|
+
2. Downloads `cibw-*` artifacts and flattens all `*.whl` / `*.tar.gz` files
|
|
184
|
+
into the output directory (default `dist_<digits>` for tags,
|
|
185
|
+
`dist_run_<id>` for run IDs; pass a second arg to override, and `--force`
|
|
186
|
+
to reuse a non-empty directory).
|
|
187
|
+
3. Runs `twine check`, prints the file list, and prompts before running
|
|
188
|
+
`twine upload`.
|
|
189
|
+
|
|
143
190
|
## Documentation/Example
|
|
144
191
|
|
|
145
192
|
There is some basic documentation [here](http://capnproto.github.io/pycapnp/).
|
|
@@ -259,6 +306,13 @@ if __name__ == '__main__':
|
|
|
259
306
|
|
|
260
307
|
Changelog
|
|
261
308
|
=============
|
|
309
|
+
## v2.2.3 (2026-05-30)
|
|
310
|
+
- Fix test failures on Python 3.14 (#394)
|
|
311
|
+
- Refine documentation for PyCustomMessageBuilder (#395)
|
|
312
|
+
- Replace black and flake8 with ruff for linting and formatting
|
|
313
|
+
- ci: deploy docs to gh-pages on tagged releases
|
|
314
|
+
- Add scripts/release-pypi.sh for downloading CI artifacts and uploading to PyPI
|
|
315
|
+
|
|
262
316
|
## v2.2.2 (2026-01-16)
|
|
263
317
|
- Revert Data fields to bytes and add get_data_as_view for zero-copy access (#390)
|
|
264
318
|
- Fix use-after-free in async write causing corruption with large payloads (#392)
|
|
@@ -100,6 +100,53 @@ Building a Python wheel distributiion
|
|
|
100
100
|
pip wheel .
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
|
|
104
|
+
### Releasing to PyPI
|
|
105
|
+
|
|
106
|
+
Wheels and the sdist are built by the `Build` GitHub Actions workflow
|
|
107
|
+
(`.github/workflows/wheels.yml`) for every push, including tag pushes. The
|
|
108
|
+
`scripts/release-pypi.sh` helper downloads those artifacts for a given tag (or
|
|
109
|
+
explicit run ID) and uploads them to PyPI via `twine`.
|
|
110
|
+
|
|
111
|
+
Typical release flow:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
git tag v2.2.1
|
|
115
|
+
git push origin v2.2.1
|
|
116
|
+
# wait for the "Build" workflow run to finish successfully on GitHub
|
|
117
|
+
|
|
118
|
+
# Download artifacts and upload to PyPI (creates dist_221/ by default).
|
|
119
|
+
scripts/release-pypi.sh v2.2.1
|
|
120
|
+
|
|
121
|
+
# Or, target a specific Actions run id:
|
|
122
|
+
scripts/release-pypi.sh 1234567890
|
|
123
|
+
|
|
124
|
+
# Dry run: upload to TestPyPI (https://test.pypi.org) instead of real PyPI.
|
|
125
|
+
# Useful for validating the release flow end-to-end before pushing to
|
|
126
|
+
# production. Requires a TestPyPI account + API token configured in
|
|
127
|
+
# ~/.pypirc under a [testpypi] section. See
|
|
128
|
+
# https://packaging.python.org/en/latest/guides/using-testpypi/ .
|
|
129
|
+
scripts/release-pypi.sh v2.2.1 --test
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Requirements on the release machine:
|
|
133
|
+
|
|
134
|
+
- `gh` CLI, authenticated (`gh auth login`)
|
|
135
|
+
- `python3` (the script creates `.venv-release/` and installs `twine` into it)
|
|
136
|
+
- PyPI credentials available to `twine`, e.g. `TWINE_USERNAME=__token__` and
|
|
137
|
+
`TWINE_PASSWORD=<api-token>`, or a configured `~/.pypirc`
|
|
138
|
+
|
|
139
|
+
The script:
|
|
140
|
+
|
|
141
|
+
1. Resolves the latest successful `wheels.yml` run for the tag (or uses the
|
|
142
|
+
given run ID).
|
|
143
|
+
2. Downloads `cibw-*` artifacts and flattens all `*.whl` / `*.tar.gz` files
|
|
144
|
+
into the output directory (default `dist_<digits>` for tags,
|
|
145
|
+
`dist_run_<id>` for run IDs; pass a second arg to override, and `--force`
|
|
146
|
+
to reuse a non-empty directory).
|
|
147
|
+
3. Runs `twine check`, prints the file list, and prompts before running
|
|
148
|
+
`twine upload`.
|
|
149
|
+
|
|
103
150
|
## Documentation/Example
|
|
104
151
|
|
|
105
152
|
There is some basic documentation [here](http://capnproto.github.io/pycapnp/).
|
|
@@ -21,9 +21,7 @@ class _CustomBuildMetaBackend(backend_class):
|
|
|
21
21
|
sys.argv = sys.argv[:1] + ["build_ext"] + flags + sys.argv[1:]
|
|
22
22
|
return super().run_setup(setup_script)
|
|
23
23
|
|
|
24
|
-
def build_wheel(
|
|
25
|
-
self, wheel_directory, config_settings=None, metadata_directory=None
|
|
26
|
-
):
|
|
24
|
+
def build_wheel(self, wheel_directory, config_settings=None, metadata_directory=None):
|
|
27
25
|
self.config_settings = config_settings
|
|
28
26
|
return super().build_wheel(wheel_directory, config_settings, metadata_directory)
|
|
29
27
|
|
|
@@ -21,21 +21,13 @@ def main():
|
|
|
21
21
|
|
|
22
22
|
code = schema_capnp.CodeGeneratorRequest.read(sys.stdin)
|
|
23
23
|
code = code.to_dict()
|
|
24
|
-
code["nodes"] = [
|
|
25
|
-
node for node in code["nodes"] if "struct" in node and node["scopeId"] != 0
|
|
26
|
-
]
|
|
24
|
+
code["nodes"] = [node for node in code["nodes"] if "struct" in node and node["scopeId"] != 0]
|
|
27
25
|
for node in code["nodes"]:
|
|
28
26
|
displayName = node["displayName"]
|
|
29
27
|
parent, path = displayName.split(":")
|
|
30
|
-
node["module_path"] = (
|
|
31
|
-
parent.replace(".", "_")
|
|
32
|
-
+ "."
|
|
33
|
-
+ ".".join([x[0].upper() + x[1:] for x in path.split(".")])
|
|
34
|
-
)
|
|
28
|
+
node["module_path"] = parent.replace(".", "_") + "." + ".".join([x[0].upper() + x[1:] for x in path.split(".")])
|
|
35
29
|
node["module_name"] = path.replace(".", "_")
|
|
36
|
-
node["c_module_path"] = "::".join(
|
|
37
|
-
[x[0].upper() + x[1:] for x in path.split(".")]
|
|
38
|
-
)
|
|
30
|
+
node["c_module_path"] = "::".join([x[0].upper() + x[1:] for x in path.split(".")])
|
|
39
31
|
node["schema"] = "_{}_Schema".format(node["module_name"])
|
|
40
32
|
is_union = False
|
|
41
33
|
for field in node["struct"]["fields"]:
|
|
@@ -63,18 +55,12 @@ def main():
|
|
|
63
55
|
filename = f["filename"].replace(".", "_") + "_cython.pyx"
|
|
64
56
|
|
|
65
57
|
file_code = dict(code)
|
|
66
|
-
file_code["nodes"] = [
|
|
67
|
-
node
|
|
68
|
-
for node in file_code["nodes"]
|
|
69
|
-
if node["displayName"].startswith(f["filename"])
|
|
70
|
-
]
|
|
58
|
+
file_code["nodes"] = [node for node in file_code["nodes"] if node["displayName"].startswith(f["filename"])]
|
|
71
59
|
with open(filename, "w") as out:
|
|
72
60
|
out.write(module.render(code=file_code, file=f, include_dir=include_dir))
|
|
73
61
|
|
|
74
62
|
setup = env.get_template("setup.py.tmpl")
|
|
75
63
|
with open("setup_capnp.py", "w") as out:
|
|
76
64
|
out.write(setup.render(code=code))
|
|
77
|
-
print(
|
|
78
|
-
"You now need to build the cython module by running `python setup_capnp.py build_ext --inplace`."
|
|
79
|
-
)
|
|
65
|
+
print("You now need to build the cython module by running `python setup_capnp.py build_ext --inplace`.")
|
|
80
66
|
print()
|