From 7ad5a78cffb7fb9ea61c6a1161a5bdc885553af7 Mon Sep 17 00:00:00 2001 From: Sebastian Hellgren Date: Wed, 21 Oct 2026 00:00:19 +0200 Subject: [PATCH] Release 0.2.0 Collect the news fragments into release_notes/0.2.0.md and bump the version. Co-Authored-By: Claude Opus 5.5 --- pyproject.toml | 2 +- release_notes/0.2.0.md | 24 ++++++++++++++++++++++++ release_notes/news.d/11.feature.md | 1 - release_notes/news.d/12.breaking.md | 1 - release_notes/news.d/12.feature.md | 1 - release_notes/news.d/13.bugfix.md | 1 - release_notes/news.d/13.feature.md | 1 - release_notes/news.d/16.breaking.md | 1 - release_notes/news.d/24.feature.md | 1 - release_notes/news.d/26.breaking.md | 1 - release_notes/news.d/29.bugfix.md | 1 - release_notes/news.d/34.feature.md | 1 - release_notes/news.d/36.misc.md | 1 - release_notes/news.d/9.breaking.md | 1 - 14 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 release_notes/0.2.0.md delete mode 100644 release_notes/news.d/11.feature.md delete mode 100644 release_notes/news.d/12.breaking.md delete mode 100644 release_notes/news.d/12.feature.md delete mode 100644 release_notes/news.d/13.bugfix.md delete mode 100644 release_notes/news.d/13.feature.md delete mode 100644 release_notes/news.d/16.breaking.md delete mode 100644 release_notes/news.d/24.feature.md delete mode 100644 release_notes/news.d/26.breaking.md delete mode 100644 release_notes/news.d/29.bugfix.md delete mode 100644 release_notes/news.d/34.feature.md delete mode 100644 release_notes/news.d/36.misc.md delete mode 100644 release_notes/news.d/9.breaking.md diff --git a/pyproject.toml b/pyproject.toml index ceb9dd8..65c1e94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "vunit-python-bridge" -version = "0.1.0" +version = "0.2.0" description = "A VUnit package making Python callable from VHDL." urls = {homepage = "https://github.com/VUnit/vunit-python-bridge"} readme = "README.md" diff --git a/release_notes/0.2.0.md b/release_notes/0.2.0.md new file mode 100644 index 0000000..287c159 --- /dev/null +++ b/release_notes/0.2.0.md @@ -0,0 +1,24 @@ + +## Breaking changes + +- `import_module_from_file` resolves a relative path against the directory of the testbench file, like `exec_file`, rather than against the working directory of the simulator. It must be called after `test_runner_setup`. Callers that relied on a path relative to the working directory must pass an absolute path instead. See #7. (#9) +- A relative file name given to `exec_file` or `import_module_from_file` before `test_runner_setup` has completed is reported as a failure, instead of being taken from the working directory of the simulator. (#12) +- `arg(value : string)` and `kwarg(kw, value : string)` now produce a valid Python string literal: quotes, backslashes and control characters in the text are escaped. Callers that escaped the text themselves (for example passing `\n` to get a newline) now get that text escaped again, and must pass the plain text instead. (#16) +- An `integer_array_t` is indexed in NumPy like in VUnit, `get(a, x, y, z)` being `a[x, y, z]` with shape `(width, height, depth)`, instead of `a[y, x, z]` with shape `(height, width, depth)`. This applies to arguments and returned arrays. Code indexing 2D or 3D arrays in Python must swap its first two indices, and an array from an image library, which index rows first, needs `a.swapaxes(0, 1)`. (#26) + +## Features + +- VUnit's `dict_t` is supported in both directions: `eval_dict` and `call_dict`, aliased `eval` and `call`, return a Python dict as a new `dict_t`, and `arg(dict_t)` and `kwarg(kw, dict_t)` pass a `dict_t` to Python as a dict. Values are integers, reals, strings, booleans, integer vectors, `integer_array_t` (NumPy arrays) and nested dicts. It needs `get_key` and `get_value_type` of `dict_pkg`, so VUnit 5.0.0.dev15 or later is required. (#11) +- `base_path` returns a base directory set with `vunit_python_bridge.set_relative_file_base()` or `VUNIT_PYTHON_BRIDGE_FILE_BASE`, for file names that work at any time, for example in verification components. (#12) +- The bridge library is no longer built in or copied to the VUnit output path, which may not allow executing files, but to `~/.vunit-python-bridge` in the home directory of the user, on every platform. This includes the prebuilt Windows DLLs. `VUNIT_PYTHON_BRIDGE_LIBRARY_DIR` selects another directory on every platform. When the directory cannot be written, the setup fails and asks for the variable to be set. (#13) +- Python 3.15 is supported, with a prebuilt bridge DLL for Windows. (#24) +- conda-forge Pythons are supported: their `python` executable links Python statically, but the bridge now uses the shared `libpython` they also ship. (#34) + +## Bug fixes + +- A library directory the simulator cannot load the bridge library from is reported as such when the package is set up: on Linux and macOS one on a file system mounted `noexec`, e.g. a tmpfs in a container, and on Windows one where an execution policy (AppLocker, Windows Defender Application Control) blocks the library. The simulator only reports that it failed to load it. Any other reason the library does not load is reported by the setup with the reason the system gives, rather than by NVC or GHDL as "cannot load VHPIDIRECT shared library" with no reason. (#13) +- An `integer_array_t` argument made before `test_runner_setup`, for example in a constant during elaboration, is reported as a failure naming the call, instead of crashing the simulator (NVC: "foreign function vpy_push_array not found", GHDL: CONSTRAINT_ERROR). See #17. (#29) + +## Miscellaneous + +- The package manifest uses the `requires` expression of VUnit 5.0.0.dev15 instead of the deprecated `requires-vunit` and `requires-vhdl` fields. (#36) diff --git a/release_notes/news.d/11.feature.md b/release_notes/news.d/11.feature.md deleted file mode 100644 index 2402771..0000000 --- a/release_notes/news.d/11.feature.md +++ /dev/null @@ -1 +0,0 @@ -VUnit's `dict_t` is supported in both directions: `eval_dict` and `call_dict`, aliased `eval` and `call`, return a Python dict as a new `dict_t`, and `arg(dict_t)` and `kwarg(kw, dict_t)` pass a `dict_t` to Python as a dict. Values are integers, reals, strings, booleans, integer vectors, `integer_array_t` (NumPy arrays) and nested dicts. It needs `get_key` and `get_value_type` of `dict_pkg`, so VUnit 5.0.0.dev15 or later is required. diff --git a/release_notes/news.d/12.breaking.md b/release_notes/news.d/12.breaking.md deleted file mode 100644 index 48e99cd..0000000 --- a/release_notes/news.d/12.breaking.md +++ /dev/null @@ -1 +0,0 @@ -A relative file name given to `exec_file` or `import_module_from_file` before `test_runner_setup` has completed is reported as a failure, instead of being taken from the working directory of the simulator. diff --git a/release_notes/news.d/12.feature.md b/release_notes/news.d/12.feature.md deleted file mode 100644 index c9b3397..0000000 --- a/release_notes/news.d/12.feature.md +++ /dev/null @@ -1 +0,0 @@ -`base_path` returns a base directory set with `vunit_python_bridge.set_relative_file_base()` or `VUNIT_PYTHON_BRIDGE_FILE_BASE`, for file names that work at any time, for example in verification components. diff --git a/release_notes/news.d/13.bugfix.md b/release_notes/news.d/13.bugfix.md deleted file mode 100644 index af89335..0000000 --- a/release_notes/news.d/13.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -A library directory the simulator cannot load the bridge library from is reported as such when the package is set up: on Linux and macOS one on a file system mounted `noexec`, e.g. a tmpfs in a container, and on Windows one where an execution policy (AppLocker, Windows Defender Application Control) blocks the library. The simulator only reports that it failed to load it. Any other reason the library does not load is reported by the setup with the reason the system gives, rather than by NVC or GHDL as "cannot load VHPIDIRECT shared library" with no reason. diff --git a/release_notes/news.d/13.feature.md b/release_notes/news.d/13.feature.md deleted file mode 100644 index 0f60d6a..0000000 --- a/release_notes/news.d/13.feature.md +++ /dev/null @@ -1 +0,0 @@ -The bridge library is no longer built in or copied to the VUnit output path, which may not allow executing files, but to `~/.vunit-python-bridge` in the home directory of the user, on every platform. This includes the prebuilt Windows DLLs. `VUNIT_PYTHON_BRIDGE_LIBRARY_DIR` selects another directory on every platform. When the directory cannot be written, the setup fails and asks for the variable to be set. diff --git a/release_notes/news.d/16.breaking.md b/release_notes/news.d/16.breaking.md deleted file mode 100644 index e4ef7d3..0000000 --- a/release_notes/news.d/16.breaking.md +++ /dev/null @@ -1 +0,0 @@ -`arg(value : string)` and `kwarg(kw, value : string)` now produce a valid Python string literal: quotes, backslashes and control characters in the text are escaped. Callers that escaped the text themselves (for example passing `\n` to get a newline) now get that text escaped again, and must pass the plain text instead. diff --git a/release_notes/news.d/24.feature.md b/release_notes/news.d/24.feature.md deleted file mode 100644 index 6a3dbd1..0000000 --- a/release_notes/news.d/24.feature.md +++ /dev/null @@ -1 +0,0 @@ -Python 3.15 is supported, with a prebuilt bridge DLL for Windows. diff --git a/release_notes/news.d/26.breaking.md b/release_notes/news.d/26.breaking.md deleted file mode 100644 index 569004f..0000000 --- a/release_notes/news.d/26.breaking.md +++ /dev/null @@ -1 +0,0 @@ -An `integer_array_t` is indexed in NumPy like in VUnit, `get(a, x, y, z)` being `a[x, y, z]` with shape `(width, height, depth)`, instead of `a[y, x, z]` with shape `(height, width, depth)`. This applies to arguments and returned arrays. Code indexing 2D or 3D arrays in Python must swap its first two indices, and an array from an image library, which index rows first, needs `a.swapaxes(0, 1)`. diff --git a/release_notes/news.d/29.bugfix.md b/release_notes/news.d/29.bugfix.md deleted file mode 100644 index 981f56c..0000000 --- a/release_notes/news.d/29.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -An `integer_array_t` argument made before `test_runner_setup`, for example in a constant during elaboration, is reported as a failure naming the call, instead of crashing the simulator (NVC: "foreign function vpy_push_array not found", GHDL: CONSTRAINT_ERROR). See #17. diff --git a/release_notes/news.d/34.feature.md b/release_notes/news.d/34.feature.md deleted file mode 100644 index ede6f94..0000000 --- a/release_notes/news.d/34.feature.md +++ /dev/null @@ -1 +0,0 @@ -conda-forge Pythons are supported: their `python` executable links Python statically, but the bridge now uses the shared `libpython` they also ship. diff --git a/release_notes/news.d/36.misc.md b/release_notes/news.d/36.misc.md deleted file mode 100644 index f00e5f9..0000000 --- a/release_notes/news.d/36.misc.md +++ /dev/null @@ -1 +0,0 @@ -The package manifest uses the `requires` expression of VUnit 5.0.0.dev15 instead of the deprecated `requires-vunit` and `requires-vhdl` fields. diff --git a/release_notes/news.d/9.breaking.md b/release_notes/news.d/9.breaking.md deleted file mode 100644 index c41329f..0000000 --- a/release_notes/news.d/9.breaking.md +++ /dev/null @@ -1 +0,0 @@ -`import_module_from_file` resolves a relative path against the directory of the testbench file, like `exec_file`, rather than against the working directory of the simulator. It must be called after `test_runner_setup`. Callers that relied on a path relative to the working directory must pass an absolute path instead. See #7.