Some breaking changes were made in this release for better consistency in the language projection and for performance.
Static properties
Static properties are now projected as class attributes instead of class methods. Any uses of ClassName.get_property_name() must be replaced with ClassName.property_name.
Arrays
A new winsdk.system.Array type was introduced for any APIs that involve arrays. The WinRT type system has 3 types of array parameters, PassArray, FillArray and ReceiveArray (docs). The changes affect each type differently.
For PassArray, you must now use an object that supports the buffer protocol with the appropriate type instead of a list. Lists in existing code can be converted using new_array = winrt.system.Array(ClassName, old_list). However, if you are using a basic type like bytes or integers, it is strongly recommended to pass a python bytes or array.array directly instead for better performance.
For FillArray the projection has changed to take the array as an argument instead of the size of the array. The array is now filled in place instead of returning a new array. So if you had code like old_list = instance.method(size), it needs to be replaced with new_array = winsdk.system.Array(ClassName, size) and instance.method(new_array). Also, the same advice for basic types like bytes and ints applies here. For example, you can pass a bytearray instance and it will be filled without needing to convert to/from WinRT types. It is even possible to use numpy arrays for structures of basic types, like points and rectangles.
For ReceiveArray, the return value is now a winsdk.system.Array instead of a list. You probably won't need to change any code here unless you were using list methods not also supported by the new array type.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps winsdk from 1.0.0b6 to 1.0.0b9.
Release notes
Sourced from winsdk's releases.
Changelog
Sourced from winsdk's changelog.
Commits
4490b5f
v1.0.0b917f79ae
update PyWinRT to v1.0.0-beta.9e4beecf
CMakeLists: merge changes from PyWinRT3ada378
pyproject: update scikit-build version76c3e8c
github: fix building arm6458d5067
CMakeLists.txt: fix find_package(Python ...)d70e9bb
CMakeLists: add /MP compiler optione695f8a
CMakeLists: simplify headers globc853932
github: use matrix for parallel builds20800a2
use cibuildwheelDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)