Changes
0.2.1 (2023-XX-XX)
FEATURE: Added support for fixed-length arrays of function pointers (for callback functions). Similar to individual function pointers in zugbruecke, the pointers can not be overwritten by DLL functions.
FIX: By value simple type members of structs passed as pointer / by reference were not synchronized correctly. This includes scalar integers and floats, individual
c_charandc_wcharobjects as well asc_charandc_wchararrays, i.e. strings.FIX: The type parser’s cache could, under certain circumstances, confuse fixed-length struct array types with their scalar base types.
FIX: Indicate Python 3.11 support in
pyproject.toml.DOCS: Updated benchmarks.
DOCS: Added notes on known CentOS issues.
DOCS: Added information on known symbolic link issues with certain versions of Wine, recently staging >=7.18, see #94.
DOCS: Many small fixes.
DEV: Added test for light-weight pointers,
ctypes.byref. Those were previously supported but remained untested.
0.2.0 (2022-12-29)
CAUTION: A number changes at least partially BREAK BACKWARDS COMPATIBILITY for certain use and edge cases.
The datatype parser and definition code was rewritten completely. It should work as before in almost all instances although unexpected breakages may occur.
If entire struct objects are synced via memsync directives, the struct types now have to be specified directly instead of their names as strings as before, breaking backwards compatibility for those use cases.
zugbruecke now follows the Python’s logging module’s log levels. Maximum logging output can now be achieved via logging.DEBUG or 10 as opposed to 100 in earlier versions. Log level 0 remains as “no logs” as per logging.NOTSET. This change may break debugging and development workflows.
This RELEASE FIXES A CRITICAL BUG where zugbruecke was falsely translating 64 bit integer types from the Unix side to 32 bit integer types on the Wine side.
FEATURE: Improved performance. With logging disabled, function calls carry 10% less overhead on average.
FEATURE: In
memsyncdirectives,ctypestypes do not need to be specified by their name as strings anymore - plainctypesfundamental types and structure types can be used instead. Strings remain valid specifications (only) for fundamentalctypestypes for compatibility though.FEATURE:
memsyncdirectives allow for more descriptive parameter names while the old single-character names remain valid for compatibility.FEATURE: Added support for CPython 3.11, see #86 and #87.
FEATURE: Logging now relies on Python’s
loggingmodule’s log levels, i.e.NOTSET,DEBUG,INFO,WARNING,ERRORandCRITICAL. This change serves to work towards #84.FEATURE: Log output has been divided into log levels, see #9.
FIX: Argtypes and restype would translate
c_int64,c_uint64,c_longandc_ulongfrom the Unix side to their 32-bit equivalents,c_int32andc_uint32, on the Wine side. This was due toc_longandc_ulongbeing 8 bytes long on Unix-like systems while they are 4 bytes long on Window, see #95.FIX: Fixed-length
c_charandc_wcharbuffers passed by value within structures were not handled correctly, see #93.FIX: The new
argtypesandrestypeparser does not suffer from #61 anymore where earlier different structure types from different name spaces but with identical names would cause problems.FIX: CI revealed that an issue similar to #50 returned as packages on Wine side can sometimes not be imported if they are symlinked. The new
copy_modulesconfiguration parameter can be used to indicate that a copy instead of symlinks is required. This problem is caused by Wine bug #54228 in Wine Staging >= 7.18, see #94.FIX: If
zugbruecke(andwenv) were installed into user site-packages, the installation would break, see #88.FIX: If writing of logs to disk (
log_write) was set toTrueduring run-time,zugbrueckewould crash, see #77.FIX: Syncing entire structs via
memsyncwas broken, see #92.FIX:
restypewas explicitly assumed to bec_int. Now, if a user does not specify it, assumptions about it are left toctypeson the Wine side, potentially getting closer toctypesoriginal behaviour.FIX:
restypewould not throw an exception when by accident set to a list or tuple like originalctypesdoes.DEPRECATED: Single-character parameter names in memsync directives.
DEPRECATED:
ctypesfundamental types specified by name as strings inmemsyncdirectives.DOCS: More detailed explanation of
memsync, where it is needed and where it is not, among other improvements.DOCS: Added explanation of handling of long integer types.
DOCS: Added explanation of handling of floating point types and the lack of “long double” as well as “half precision” support.
DOCS: Updated benchmarks.
DOCS: Removed old
examplesfolder from project as its code was more than outdated and can now be found in the documentation, the test suite and/or the newly added benchmarks.DEV: Added tests on custom types and
array.arrayobjects (standard library) as well asnumpy.ndarrayobjects.DEV: Added tests for 64 bit integer limits / overflows for win64.
DEV: Added tests on
restypeconfiguration errors.DEV: Cleaned and clarified all tests. Renamed all tests to more meaningful names referring to the features that they are testing.
DEV: Test support library cleaned up, documented and typed.
DEV: New benchmark infrastructure similar to the test suite, allowing to easily add benchmarks. Their results now get automatically included into the project documentation.
0.1.0 (2022-09-11)
CAUTION: The module layout changed, effectively BREAKING BACKWARDS COMPATIBILITY for all use-cases!
OLD |
NEW |
|
|---|---|---|
default session |
|
|
default session member |
|
|
ctypes session class |
|
|
Wine Python |
|
|
Wine Pip |
|
|
Wine Pytest |
|
|
Wine Python shebang |
|
|
configuration |
|
|
Significant changes were mandatory for allowing to cleanup a lot of old code and to remove long-standing bugs. The main issue was that importing zugbruecke would implicitly start a new session. This could not be prohibited. With the new package layout, it becomes possible to import sub-modules of zugbruecke without implicitly starting a session. One of the more significant added benefits therefore is that this also allows much more fine-grained tests.
zugbruecke will use semantic versioning from now on. Breaking changes will be indicated by increasing the second version number, the minor version. Going for example from 0.0.x to 0.1.y or going from 0.1.x to 0.2.y therefore indicates a breaking change. For as long as zugbruecke has development status “alpha”, please expect more breaking changes to come.
CLI: The shell scripts
wine-python,wine-pipandwine-pytesthave been consolidated into a new Python package called wenv. One can now callwenv python,wenv pipandwenv pytest. This change was necessary for allowing a more generic interface to entry points of arbitrary third party packages. Runwenv helpfor more information. Changes related towenvare now being tracked in wenv’s change log.wenvhas considerably more features and configuration options compared to the previously provided shell scripts.API:
zugbruecke.current_sessionis no longer available.zugbruecke.ctypeson its own is now the default session. Besides, the classzugbruecke.sessionwas renamed intozugbruecke.CtypesSessionand has now a fully compatiblectypesdrop-in replacement API as well. Both,zugbruecke.ctypesand custom sessions constructed fromzugbruecke.CtypesSessionnow have methods and properties prefixed withzb_for manipulating their configuration, termination and Wine-related tasks.API: Configuration provided via environment variables is consistently preferred over everything else.
API: The
set_parametermethod, now renamed intozb_set_parameter, only accepts a single key-value pair instead of a dictionary.API: The
versionconfiguration parameter for controlling the version of Wine Python has been renamed topythonversion.FEATURE: All configuration parameters can be overridden with individual environment variables.
FEATURE: Introduced new exception types specific to
zugbruecke. Meaningful exception are now raised throughout the package.FEATURE: Timeouts for start and stop of the server component can be configured.
FEATURE: Added support for CPython 3.10, see #75.
FEATURE: Added support for CPython 3.9, see #74.
FEATURE: Added support for CPython 3.8, see #56.
FEATURE: Dropped support for CPython <= 3.6.
FEATURE: Added support for Wine >= 6.0.
FEATURE: Dropped support for Wine <= 5, most prominently Wine 4.
FEATURE:
zugbruecke.CtypesSessionobjects can be managed by context manager statements (with).FIX:
zugbrueckedid not capture and forward data coming from Windows DLLs and binaries throughstdoutandstderr(running with Wine) most of the time.FIX: A proper
TimeoutErroris raised (instead of aSyntaxError) ifzugbruecke’s server component does not start.FIX:
zugbrueckedid not actually check properly if its server component had terminated when a session was terminated. The reliability of relevant termination code has been significantly improved.FIX: Methods from
zugbruecke.ctypes.util(previouslyzugbruecke.util) are faster and a lot less error-prone, see #52.FIX:
zugbruecke.ctypes.CDLLdoes no longer fall back to Unix libraries if no corresponding DLL file could be found. For attaching to Unix libraries please use the originalctypesmodule instead, see #53.FIX: Different structure types from different name spaces BUT identical names caused crashes, see #61.
FIX:
zugbrueckeraisedTypeErrorif too many arguments were given to a configuredcdllfunction (ctypesdoes not), see #62.FIX: If a struct type was used in a function call with
memsyncfirst (before use in a function call withoutmemsync), configuring (and calling) the function failed, see #63.FIX: Path conversion would fail for Wine 5.13 and later.
FIX: Memory leak - sessions would collect all log data for as long as they were running, see #76.
DOCS: Hugely improved.
DOCS: Project mailing list and chat room.
DEV: New
makefilestructure.DEV: All code is tested for both, 32bit (
win32) and 64bit (win64) DLLs, see #58. Previously, only 32bit (win32) DLLs received regular testing.DEV: All code is tested for both, the
cdll/cdeclandwindll/stdcallcalling conventions (previously onlywindll/stdcallreceived regular testing), see #60.DEV:
zugbrueckeis tested across all supported versions of CPython, both on Unix and on Wine side.DEV: The configuration module was refactored and made clearer and faster, allowing to implement new options.
DEV: New debug mode, can be activated by setting the environment variable
ZUGBRUECKE_DEBUGto1.DEV: Development dependency switch from unmaintained
python-language-servertopython-lsp-server.DEV: Both code and branch coverage of
zugbrueckecan now be analyzed withcoverage.DEV: Moved from
setuptoolsfor packaging topyproject.tomlviaflit.DEV: Cleanup of
docsfolder structure.DEV: Include logo in repo.
0.0.15 (2020-07-10)
FIX: CI tests failed due to dependency issue in Python 3.4, see issue #72.
0.0.14 (2019-05-21)
FIX: CI tests failed due to dependency link feature being dropped from
pip, see issue #45.
0.0.13 (2019-02-03)
FIX: Documentation could (sometimes) not be built on
readthedocs.org.
0.0.12 (2019-02-02)
FEATURE: Added support for CPython 3.7.
FEATURE: Added support for Wine 4.
FIX: Build folder was not automatically cleaned up before wheels were build, therefore they sometimes contained obsolete files & code.
FIX: Travis configuration was missing new Wine repository key, which was breaking builds.
DOCS: Lots of fixes in documentation.
DEV: New test script for easier development of new tests and features.
0.0.11 (2018-04-10)
CAUTION: This release features a significant re-implementation (with additional, new functionality) of the memory synchronization protocol, memsync.
As a part of it, overcoming old limitations, its syntax changed - effectively BREAKING BACKWARDS COMPATIBILITY in almost all cases.
Please check the updated documentation, examples and tests for details.
API:
memsyncsyntax for custom length functions has been changed._fbecomes obsolete.fexpects a string, which can be parsed into a function.API:
memsyncsyntax for NULL-terminated strings (bothc_charandc_wchar, i.e. Unicode, buffers) has been simplified:nmust be set toTrueindicating a NULL-terminated string.lbecomes optional in this context.API:
memsyncsyntax for Unicode strings (buffers) has been simplified:wmust be set toTrueinstead of the length ofctypes.c_wchar.FEATURE:
memsynccan handle pointers to memory, which was allocated by a DLL, see issue #37.FEATURE:
memsynccan target return values or elements within, see issue #40.FEATURE:
memsynccan be applied to callback functions, see issue #41 - support at this stage is largely untested.FEATURE:
memsyncbecame more memory efficient and slightly faster.
0.0.10 (2018-03-23)
FEATURE: Support for functions calculating the length of memory sections in
memsyncprotocol, see issue #33.FEATURE: Support for string buffers (and null-terminated strings), see issue #7.
FIX:
memsyncdefinition sometimes lost information during first call of function, second call subsequently failed, see issue #36.
0.0.9 (2018-03-21)
CAUTION: This release introduces a change in configuration parameter naming, BREAKING BACKWARDS COMPATIBILITY in rare cases.
API: Renamed
logwriteparameter & command line option intolog_write.FIX: Arch
win64was broken because of wrong download URL for embedded CPython for win64/amd64, see issue #27.FIX: Function pointers in struct types were not handled, see issue #28.
FIX:
memsyncdirectives pointing to elements within structs were not handled properly, see issue #29.FIX: Missing DLLs of type
windllandoledllnow raiseOSErroras expected, see issue #30.FIX: Missing routines in DLLs now raise
AttributeErroras expected, see issue #31.FIX: Wrong or unconfigured
argtypesas well as wrong number of arguments do raise appropriate errors (ValueError,ArgumentErrororTypeError), see issue #32.DEV: Isolated argument packing and unpacking code, preparing to solve issue #25.
DEV: Reduced number of RPC servers to one per side (Unix and Wine).
0.0.8 (2018-03-18)
FEATURE: Support for structures and pointers as return values, see issue #14.
FEATURE: (Limited) support for call back functions (function pointers) as DLL argument types, see issues #3 and #4.
FIX:
argtypesdefinitions (with one single argument) were not raising aTypeErrorlikectypesdoes if not passed as a tuple or list, see issue #21.
0.0.7 (2018-03-05)
FIX: Wine Python environment sometimes did, unintentionally, fall back to Python 2 and crash, see issue #20.
Confirmed: Support for Mac OS X, see issue #16.
0.0.6 (2017-12-06)
FEATURE: Remote-Procedure-Call (RPC) speedup due to removal of extra pickling step.
FIX: Added workaround for CPython issue 24960 (embedded zip file extracted into library folder) - was triggered by latest version of
pluggy(dependency ofpytest).FIX: Preexisting installation of
wine-pythonis now always being removed completely when required due to update or new installation.DEV: Moved definition of development dependencies into
setup.py.
0.0.5 (2017-11-13)
FEATURE: Support for light-weight pointers (
ctypes.byref)FIX: Elements within structures are properly synchronized even if they are not a pointer on their own.
FIX: Structure objects in arrays of structures are properly initialized.
FIX: Links in
README.rstwork when rendered on PyPI.
0.0.4 (2017-11-05)
FEATURE: Full support for multidimensional fixed length arrays.
0.0.3 (2017-11-02)
FEATURE: Fixed length 1D arrays.
DOCS: Lots of typos and grammar issues in documentation fixed.
DEV: Refactored argument packing and unpacking code.
DEV: Introduced Python’s
anyfunctions in a number of places.DEV: Plenty of cleanups based on static code analysis.
0.0.2 (2017-07-28)
FEATURE: Added and confirmed CPython 3.4 compatibility.
DOCS: Added installation instructions to documentation.
0.0.1 (2017-07-28)
First official (pre-) release of
zugbruecke.