Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit a42009b

Browse files
committed
update to PyWinRT v1.0.0-beta.5
1 parent 26f0f48 commit a42009b

1,126 files changed

Lines changed: 295869 additions & 82601 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Changed
88
- Update CppWinRT to 2.0.220607.4.
9+
- Update PyWinRT to [v1.0.0-beta.5](https://github.com/pywinrt/pywinrt/releases/tag/v1.0.0-beta.5).
910

1011
## [v1.0.0b4] - 2022-04-23
1112

generate.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
param ([switch]$skipNugetInstall)
22

3-
$pywinrt_version = '1.0.0-beta.4'
3+
$pywinrt_version = '1.0.0-beta.5'
44
$cppwinrt_version = '2.0.220607.4'
55
$windows_sdk_version = '10.0.22000.0'
66
$repoRootPath = (Get-Item $PSScriptRoot).FullName

pywinrt/winsdk/__init__.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.4
1+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.5
22

3-
from . import _winrt
4-
5-
def _import_ns_module(ns):
6-
import importlib.machinery
7-
import importlib.util
3+
from importlib.machinery import ExtensionFileLoader
4+
from importlib.util import spec_from_loader, module_from_spec
5+
from types import ModuleType
86

9-
try:
10-
module_name = f"_winsdk_{ns.replace('.', '_')}"
7+
from . import _winrt
118

12-
loader = importlib.machinery.ExtensionFileLoader(module_name, _winrt.__file__)
13-
spec = importlib.util.spec_from_loader(module_name, loader)
14-
module = importlib.util.module_from_spec(spec)
15-
loader.exec_module(module)
16-
return module
17-
except Exception:
18-
return None
9+
def _import_ns_module(ns: str) -> ModuleType:
10+
module_name = f"_winsdk_{ns.replace('.', '_')}"
11+
loader = ExtensionFileLoader(module_name, _winrt.__file__)
12+
spec = spec_from_loader(module_name, loader)
13+
assert spec is not None
14+
module = module_from_spec(spec)
15+
loader.exec_module(module)
16+
return module

pywinrt/winsdk/_winrt.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.4
1+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.5
22

33

44
import sys
5-
from typing import Iterable, Optional
65

76
if sys.version_info >= (3, 9):
87
from typing import Annotated
@@ -41,5 +40,4 @@ def uninit_apartment() -> None: ...
4140
def initialize_with_window(obj: Object, hwnd: int) -> None: ...
4241

4342
class Object:
44-
@classmethod
45-
def __init_subclass__(cls, /, interfaces: Optional[Iterable[type]] = None, **kwargs) -> None: ...
43+
pass

0 commit comments

Comments
 (0)